From 2e9e44ba05eecd03335e58ad11ed7fda6f4d124e Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Tue, 12 Jun 2018 18:49:18 +0100 Subject: [PATCH] Moved JSON blobs to submodule --- .gitmodules | 3 +++ src/pocketmine/inventory/CraftingManager.php | 2 +- src/pocketmine/item/Item.php | 2 +- src/pocketmine/resources/vanilla | 1 + 4 files changed, 6 insertions(+), 2 deletions(-) create mode 160000 src/pocketmine/resources/vanilla diff --git a/.gitmodules b/.gitmodules index 8dc22a2d7..2a18da0ae 100644 --- a/.gitmodules +++ b/.gitmodules @@ -10,3 +10,6 @@ [submodule "tests/plugins/PocketMine-TesterPlugin"] path = tests/plugins/PocketMine-TesterPlugin url = https://github.com/pmmp/PocketMine-TesterPlugin.git +[submodule "src/pocketmine/resources/vanilla"] + path = src/pocketmine/resources/vanilla + url = https://github.com/pmmp/BedrockData.git diff --git a/src/pocketmine/inventory/CraftingManager.php b/src/pocketmine/inventory/CraftingManager.php index e3420f939..c18dd05dd 100644 --- a/src/pocketmine/inventory/CraftingManager.php +++ b/src/pocketmine/inventory/CraftingManager.php @@ -47,7 +47,7 @@ class CraftingManager{ } public function init() : void{ - $recipes = new Config(\pocketmine\RESOURCE_PATH . "recipes.json", Config::JSON, []); + $recipes = new Config(\pocketmine\RESOURCE_PATH . "vanilla" . DIRECTORY_SEPARATOR . "recipes.json", Config::JSON, []); foreach($recipes->getAll() as $recipe){ switch($recipe["type"]){ diff --git a/src/pocketmine/item/Item.php b/src/pocketmine/item/Item.php index e2d07dd70..e28cbd680 100644 --- a/src/pocketmine/item/Item.php +++ b/src/pocketmine/item/Item.php @@ -119,7 +119,7 @@ class Item implements ItemIds, \JsonSerializable{ public static function initCreativeItems(){ self::clearCreativeItems(); - $creativeItems = new Config(\pocketmine\RESOURCE_PATH . "creativeitems.json", Config::JSON, []); + $creativeItems = new Config(\pocketmine\RESOURCE_PATH . "vanilla" . DIRECTORY_SEPARATOR . "creativeitems.json", Config::JSON, []); foreach($creativeItems->getAll() as $data){ $item = Item::jsonDeserialize($data); diff --git a/src/pocketmine/resources/vanilla b/src/pocketmine/resources/vanilla new file mode 160000 index 000000000..0c00c4f3b --- /dev/null +++ b/src/pocketmine/resources/vanilla @@ -0,0 +1 @@ +Subproject commit 0c00c4f3b9de1b6b0866cab79a66a91182ae5405