diff --git a/src/block/BlockFactory.php b/src/block/BlockFactory.php index 1e022136d..1a88083b2 100644 --- a/src/block/BlockFactory.php +++ b/src/block/BlockFactory.php @@ -875,6 +875,8 @@ class BlockFactory{ //in java this can be acquired using any tool - seems to be a parity issue in bedrock $this->register(new Opaque(new BID(Ids::AMETHYST), "Amethyst", new BreakInfo(1.5, ToolType::PICKAXE, ToolTier::WOOD()->getHarvestLevel()))); + $this->register(new Opaque(new BID(Ids::CALCITE), "Calcite", new BreakInfo(0.75, ToolType::PICKAXE, ToolTier::WOOD()->getHarvestLevel()))); + $this->register(new Opaque(new BID(Ids::RAW_COPPER), "Raw Copper Block", new BreakInfo(5, ToolType::PICKAXE, ToolTier::STONE()->getHarvestLevel()))); $this->register(new Opaque(new BID(Ids::RAW_GOLD), "Raw Gold Block", new BreakInfo(5, ToolType::PICKAXE, ToolTier::IRON()->getHarvestLevel()))); $this->register(new Opaque(new BID(Ids::RAW_IRON), "Raw Iron Block", new BreakInfo(5, ToolType::PICKAXE, ToolTier::STONE()->getHarvestLevel()))); diff --git a/src/block/BlockTypeIds.php b/src/block/BlockTypeIds.php index 589d6634b..eddb34a55 100644 --- a/src/block/BlockTypeIds.php +++ b/src/block/BlockTypeIds.php @@ -589,6 +589,7 @@ final class BlockTypeIds{ public const RAW_COPPER = 10562; public const RAW_GOLD = 10563; public const RAW_IRON = 10564; + public const CALCITE = 10565; - public const FIRST_UNUSED_BLOCK_ID = 10565; + public const FIRST_UNUSED_BLOCK_ID = 10566; } diff --git a/src/block/VanillaBlocks.php b/src/block/VanillaBlocks.php index 2b45c1d7d..509c2a5eb 100644 --- a/src/block/VanillaBlocks.php +++ b/src/block/VanillaBlocks.php @@ -104,6 +104,7 @@ use pocketmine\utils\CloningRegistryTrait; * @method static BrownMushroomBlock BROWN_MUSHROOM_BLOCK() * @method static Cactus CACTUS() * @method static Cake CAKE() + * @method static Opaque CALCITE() * @method static Carpet CARPET() * @method static Carrot CARROTS() * @method static CarvedPumpkin CARVED_PUMPKIN() @@ -665,6 +666,7 @@ final class VanillaBlocks{ self::register("brown_mushroom_block", $factory->get(Ids::BROWN_MUSHROOM_BLOCK, 10)); self::register("cactus", $factory->get(Ids::CACTUS, 0)); self::register("cake", $factory->get(Ids::CAKE, 0)); + self::register("calcite", $factory->get(Ids::CALCITE, 0)); self::register("carpet", $factory->get(Ids::CARPET, 14)); self::register("carrots", $factory->get(Ids::CARROTS, 0)); self::register("carved_pumpkin", $factory->get(Ids::CARVED_PUMPKIN, 0)); diff --git a/src/data/bedrock/block/convert/BlockObjectToBlockStateSerializer.php b/src/data/bedrock/block/convert/BlockObjectToBlockStateSerializer.php index 6eb2a5d90..eb78550ef 100644 --- a/src/data/bedrock/block/convert/BlockObjectToBlockStateSerializer.php +++ b/src/data/bedrock/block/convert/BlockObjectToBlockStateSerializer.php @@ -385,6 +385,7 @@ final class BlockObjectToBlockStateSerializer implements BlockStateSerializer{ return Writer::create(Ids::CAKE) ->writeInt(StateNames::BITE_COUNTER, $block->getBites()); }); + $this->mapSimple(Blocks::CALCITE(), Ids::CALCITE); $this->map(Blocks::CARPET(), function(Carpet $block) : Writer{ return Writer::create(Ids::CARPET) ->writeColor($block->getColor()); diff --git a/src/data/bedrock/block/convert/BlockStateToBlockObjectDeserializer.php b/src/data/bedrock/block/convert/BlockStateToBlockObjectDeserializer.php index 04717200c..dc20af369 100644 --- a/src/data/bedrock/block/convert/BlockStateToBlockObjectDeserializer.php +++ b/src/data/bedrock/block/convert/BlockStateToBlockObjectDeserializer.php @@ -211,6 +211,7 @@ final class BlockStateToBlockObjectDeserializer implements BlockStateDeserialize return Blocks::CAKE() ->setBites($in->readBoundedInt(StateNames::BITE_COUNTER, 0, 6)); }); + $this->map(Ids::CALCITE, fn() => Blocks::CALCITE()); $this->map(Ids::CARPET, function(Reader $in) : Block{ return Blocks::CARPET() ->setColor($in->readColor()); diff --git a/src/item/StringToItemParser.php b/src/item/StringToItemParser.php index 5f1d7b2b4..d2c1385e5 100644 --- a/src/item/StringToItemParser.php +++ b/src/item/StringToItemParser.php @@ -166,6 +166,7 @@ final class StringToItemParser extends StringToTParser{ $result->registerBlock("cactus", fn() => Blocks::CACTUS()); $result->registerBlock("cake", fn() => Blocks::CAKE()); $result->registerBlock("cake_block", fn() => Blocks::CAKE()); + $result->registerBlock("calcite", fn() => Blocks::CALCITE()); $result->registerBlock("carpet", fn() => Blocks::CARPET()); $result->registerBlock("carrot_block", fn() => Blocks::CARROTS()); $result->registerBlock("carrots", fn() => Blocks::CARROTS());