mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-21 08:17:34 +00:00
Added calcite
This commit is contained in:
parent
b818ed0d08
commit
3f937605ac
@ -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())));
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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));
|
||||
|
@ -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());
|
||||
|
@ -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());
|
||||
|
@ -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());
|
||||
|
Loading…
x
Reference in New Issue
Block a user