diff --git a/src/pocketmine/block/Block.php b/src/pocketmine/block/Block.php index ad3cc6fea..31c92bb3a 100644 --- a/src/pocketmine/block/Block.php +++ b/src/pocketmine/block/Block.php @@ -229,6 +229,11 @@ class Block extends Position implements Metadatable{ const HARDENED_CLAY = 172; const COAL_BLOCK = 173; + const FENCE_GATE_SPRUCE = 183; + const FENCE_GATE_BIRCH = 184; + const FENCE_GATE_JUNGLE = 185; + const FENCE_GATE_DARK_OAK = 186; + const FENCE_GATE_ACACIA = 187; const FENCE_SPRUCE = 188; const FENCE_BIRCH = 189; const FENCE_JUNGLE = 190; @@ -366,6 +371,11 @@ class Block extends Position implements Metadatable{ [Item::FENCE_DARK_OAK, 0], [Item::FENCE_JUNGLE, 0], [Item::FENCE_GATE, 0], + [Item::FENCE_GATE_BIRCH, 0], + [Item::FENCE_GATE_SPRUCE, 0], + [Item::FENCE_GATE_DARK_OAK, 0], + [Item::FENCE_GATE_JUNGLE, 0], + [Item::FENCE_GATE_ACACIA, 0], [Item::IRON_BARS, 0], [Item::BED, 0], [Item::BOOKSHELF, 0], @@ -674,10 +684,16 @@ class Block extends Position implements Metadatable{ self::HARDENED_CLAY => HardenedClay::class, self::COAL_BLOCK => Coal::class, + self::FENCE_GATE_SPRUCE => FenceGateSpruce::class, + self::FENCE_GATE_BIRCH => FenceGateBirch::class, + self::FENCE_GATE_JUNGLE => FenceGateJungle::class, + self::FENCE_GATE_DARK_OAK => FenceGateDarkOak::class, + self::FENCE_GATE_ACACIA => FenceGateAcacia::class, self::FENCE_SPRUCE => FenceSpruce::class, self::FENCE_BIRCH => FenceBirch::class, self::FENCE_DARK_OAK => FenceDarkOak::class, self::FENCE_JUNGLE => FenceJungle::class, + self::FENCE_ACACIA => FenceAcacia::class, self::PODZOL => Podzol::class, self::BEETROOT_BLOCK => Beetroot::class, diff --git a/src/pocketmine/block/FenceAcacia.php b/src/pocketmine/block/FenceAcacia.php new file mode 100644 index 000000000..0cc20e71f --- /dev/null +++ b/src/pocketmine/block/FenceAcacia.php @@ -0,0 +1,30 @@ +isFullBlock = false; + $this->hardness = 15; + } +} \ No newline at end of file diff --git a/src/pocketmine/block/FenceGate.php b/src/pocketmine/block/FenceGate.php index 2d8f6a235..3ca673b7a 100644 --- a/src/pocketmine/block/FenceGate.php +++ b/src/pocketmine/block/FenceGate.php @@ -27,7 +27,7 @@ use pocketmine\Player; class FenceGate extends Transparent{ public function __construct($meta = 0){ - parent::__construct(self::FENCE_GATE, $meta, "Fence Gate"); + parent::__construct(self::FENCE_GATE, $meta, "Oak Fence Gate"); $this->isActivable = true; if(($this->meta & 0x04) === 0x04){ $this->isFullBlock = true; diff --git a/src/pocketmine/block/FenceGateAcacia.php b/src/pocketmine/block/FenceGateAcacia.php new file mode 100644 index 000000000..af68a9f6a --- /dev/null +++ b/src/pocketmine/block/FenceGateAcacia.php @@ -0,0 +1,36 @@ +isActivable = true; + if(($this->meta & 0x04) === 0x04){ + $this->isFullBlock = true; + }else{ + $this->isFullBlock = false; + } + $this->hardness = 15; + } +} \ No newline at end of file diff --git a/src/pocketmine/block/FenceGateBirch.php b/src/pocketmine/block/FenceGateBirch.php new file mode 100644 index 000000000..b549dd1cd --- /dev/null +++ b/src/pocketmine/block/FenceGateBirch.php @@ -0,0 +1,36 @@ +isActivable = true; + if(($this->meta & 0x04) === 0x04){ + $this->isFullBlock = true; + }else{ + $this->isFullBlock = false; + } + $this->hardness = 15; + } +} \ No newline at end of file diff --git a/src/pocketmine/block/FenceGateDarkOak.php b/src/pocketmine/block/FenceGateDarkOak.php new file mode 100644 index 000000000..810501025 --- /dev/null +++ b/src/pocketmine/block/FenceGateDarkOak.php @@ -0,0 +1,36 @@ +isActivable = true; + if(($this->meta & 0x04) === 0x04){ + $this->isFullBlock = true; + }else{ + $this->isFullBlock = false; + } + $this->hardness = 15; + } +} \ No newline at end of file diff --git a/src/pocketmine/block/FenceGateJungle.php b/src/pocketmine/block/FenceGateJungle.php new file mode 100644 index 000000000..87f66d576 --- /dev/null +++ b/src/pocketmine/block/FenceGateJungle.php @@ -0,0 +1,36 @@ +isActivable = true; + if(($this->meta & 0x04) === 0x04){ + $this->isFullBlock = true; + }else{ + $this->isFullBlock = false; + } + $this->hardness = 15; + } +} \ No newline at end of file diff --git a/src/pocketmine/block/FenceGateSpruce.php b/src/pocketmine/block/FenceGateSpruce.php new file mode 100644 index 000000000..cc12ec6e3 --- /dev/null +++ b/src/pocketmine/block/FenceGateSpruce.php @@ -0,0 +1,36 @@ +isActivable = true; + if(($this->meta & 0x04) === 0x04){ + $this->isFullBlock = true; + }else{ + $this->isFullBlock = false; + } + $this->hardness = 15; + } +} \ No newline at end of file diff --git a/src/pocketmine/inventory/CraftingManager.php b/src/pocketmine/inventory/CraftingManager.php index ce2403a1a..b31df140a 100644 --- a/src/pocketmine/inventory/CraftingManager.php +++ b/src/pocketmine/inventory/CraftingManager.php @@ -71,13 +71,18 @@ class CraftingManager{ $this->registerRecipe((new BigShapelessRecipe(Item::get(Item::BED, 0, 1)))->addIngredient(Item::get(Item::WOOL, null, 3))->addIngredient(Item::get(Item::WOODEN_PLANK, null, 3))); $this->registerRecipe((new BigShapelessRecipe(Item::get(Item::CHEST, 0, 1)))->addIngredient(Item::get(Item::WOODEN_PLANK, null, 8))); - $this->registerRecipe((new BigShapelessRecipe(Item::get(Item::FENCE, 0, 3)))->addIngredient(Item::get(Item::STICK, 0, 4))->addIngredient(Item::get(Item::WOODEN_PLANK, 0, 2))); - $this->registerRecipe((new BigShapelessRecipe(Item::get(Item::FENCE_SPRUCE, 0, 3)))->addIngredient(Item::get(Item::STICK, 0, 4))->addIngredient(Item::get(Item::WOODEN_PLANK, 1, 2))); - $this->registerRecipe((new BigShapelessRecipe(Item::get(Item::FENCE_BIRCH, 0, 3)))->addIngredient(Item::get(Item::STICK, 0, 4))->addIngredient(Item::get(Item::WOODEN_PLANK, 2, 2))); - $this->registerRecipe((new BigShapelessRecipe(Item::get(Item::FENCE_JUNGLE, 0, 3)))->addIngredient(Item::get(Item::STICK, 0, 4))->addIngredient(Item::get(Item::WOODEN_PLANK, 3, 2))); - $this->registerRecipe((new BigShapelessRecipe(Item::get(Item::FENCE_ACACIA, 0, 3)))->addIngredient(Item::get(Item::STICK, 0, 4))->addIngredient(Item::get(Item::WOODEN_PLANK, 4, 2))); - $this->registerRecipe((new BigShapelessRecipe(Item::get(Item::FENCE_DARK_OAK, 0, 3)))->addIngredient(Item::get(Item::STICK, 0, 4))->addIngredient(Item::get(Item::WOODEN_PLANK, 5, 2))); - $this->registerRecipe((new BigShapelessRecipe(Item::get(Item::FENCE_GATE, 0, 1)))->addIngredient(Item::get(Item::STICK, 0, 4))->addIngredient(Item::get(Item::WOODEN_PLANK, null, 2))); + $this->registerRecipe((new BigShapelessRecipe(Item::get(Item::FENCE, 0, 3)))->addIngredient(Item::get(Item::STICK, 0, 4))->addIngredient(Item::get(Item::WOODEN_PLANK, Planks::OAK, 2))); + $this->registerRecipe((new BigShapelessRecipe(Item::get(Item::FENCE_SPRUCE, 0, 3)))->addIngredient(Item::get(Item::STICK, 0, 2))->addIngredient(Item::get(Item::WOODEN_PLANK, Planks::SPRUCE, 4))); + $this->registerRecipe((new BigShapelessRecipe(Item::get(Item::FENCE_BIRCH, 0, 3)))->addIngredient(Item::get(Item::STICK, 0, 2))->addIngredient(Item::get(Item::WOODEN_PLANK, Planks::BIRCH, 4))); + $this->registerRecipe((new BigShapelessRecipe(Item::get(Item::FENCE_JUNGLE, 0, 3)))->addIngredient(Item::get(Item::STICK, 0, 2))->addIngredient(Item::get(Item::WOODEN_PLANK, Planks::JUNGLE, 4))); + $this->registerRecipe((new BigShapelessRecipe(Item::get(Item::FENCE_ACACIA, 0, 3)))->addIngredient(Item::get(Item::STICK, 0, 2))->addIngredient(Item::get(Item::WOODEN_PLANK, Planks::ACACIA, 4))); + $this->registerRecipe((new BigShapelessRecipe(Item::get(Item::FENCE_DARK_OAK, 0, 3)))->addIngredient(Item::get(Item::STICK, 0, 2))->addIngredient(Item::get(Item::WOODEN_PLANK, Planks::DARK_OAK, 4))); + $this->registerRecipe((new BigShapelessRecipe(Item::get(Item::FENCE_GATE, 0, 1)))->addIngredient(Item::get(Item::STICK, 0, 4))->addIngredient(Item::get(Item::WOODEN_PLANK, Planks::OAK, 2))->addIngredient(Item::get(Item::STICK, 0, 4))); + $this->registerRecipe((new BigShapelessRecipe(Item::get(Item::FENCE_GATE_SPRUCE, 0, 1)))->addIngredient(Item::get(Item::STICK, 0, 4))->addIngredient(Item::get(Item::WOODEN_PLANK, Planks::SPRUCE, 2))->addIngredient(Item::get(Item::STICK, 0, 4))); + $this->registerRecipe((new BigShapelessRecipe(Item::get(Item::FENCE_GATE_BIRCH, 0, 1)))->addIngredient(Item::get(Item::STICK, 0, 4))->addIngredient(Item::get(Item::WOODEN_PLANK, Planks::BIRCH, 2))->addIngredient(Item::get(Item::STICK, 0, 4))); + $this->registerRecipe((new BigShapelessRecipe(Item::get(Item::FENCE_GATE_JUNGLE, 0, 1)))->addIngredient(Item::get(Item::STICK, 0, 4))->addIngredient(Item::get(Item::WOODEN_PLANK, Planks::JUNGLE, 2))->addIngredient(Item::get(Item::STICK, 0, 4))); + $this->registerRecipe((new BigShapelessRecipe(Item::get(Item::FENCE_GATE_DARK_OAK, 0, 1)))->addIngredient(Item::get(Item::STICK, 0, 4))->addIngredient(Item::get(Item::WOODEN_PLANK, Planks::DARK_OAK, 2))->addIngredient(Item::get(Item::STICK, 0, 4))); + $this->registerRecipe((new BigShapelessRecipe(Item::get(Item::FENCE_GATE_ACACIA, 0, 1)))->addIngredient(Item::get(Item::STICK, 0, 4))->addIngredient(Item::get(Item::WOODEN_PLANK, Planks::ACACIA, 2))->addIngredient(Item::get(Item::STICK, 0, 4))); $this->registerRecipe((new BigShapelessRecipe(Item::get(Item::FURNACE, 0, 1)))->addIngredient(Item::get(Item::COBBLESTONE, 0, 8))); $this->registerRecipe((new BigShapelessRecipe(Item::get(Item::GLASS_PANE, 0, 16)))->addIngredient(Item::get(Item::GLASS, 0, 6))); $this->registerRecipe((new BigShapelessRecipe(Item::get(Item::LADDER, 0, 2)))->addIngredient(Item::get(Item::STICK, 0, 7))); diff --git a/src/pocketmine/item/Item.php b/src/pocketmine/item/Item.php index 694b5855e..037d76c80 100644 --- a/src/pocketmine/item/Item.php +++ b/src/pocketmine/item/Item.php @@ -220,6 +220,11 @@ class Item{ const HARDENED_CLAY = 172; const COAL_BLOCK = 173; + const FENCE_GATE_SPRUCE = 183; + const FENCE_GATE_BIRCH = 184; + const FENCE_GATE_JUNGLE = 185; + const FENCE_GATE_DARK_OAK = 186; + const FENCE_GATE_ACACIA = 187; const FENCE_SPRUCE = 188; const FENCE_BIRCH = 189; const FENCE_JUNGLE = 190;