mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-20 16:00:20 +00:00
Implemented chiseled deepslate, chiseled nether brick and cracked nether brick
This commit is contained in:
parent
4acf7aadbd
commit
e302e5a85f
@ -261,6 +261,9 @@ class BlockFactory{
|
||||
$this->register(new Fence(new BID(Ids::NETHER_BRICK_FENCE), "Nether Brick Fence", $netherBrickBreakInfo));
|
||||
$this->register(new Stair(new BID(Ids::NETHER_BRICK_STAIRS), "Nether Brick Stairs", $netherBrickBreakInfo));
|
||||
$this->register(new Stair(new BID(Ids::RED_NETHER_BRICK_STAIRS), "Red Nether Brick Stairs", $netherBrickBreakInfo));
|
||||
$this->register(new Opaque(new BID(Ids::CHISELED_NETHER_BRICKS), "Chiseled Nether Bricks", $netherBrickBreakInfo));
|
||||
$this->register(new Opaque(new BID(Ids::CRACKED_NETHER_BRICKS), "Cracked Nether Bricks", $netherBrickBreakInfo));
|
||||
|
||||
$this->register(new NetherPortal(new BID(Ids::NETHER_PORTAL), "Nether Portal", BreakInfo::indestructible(0.0)));
|
||||
$this->register(new NetherQuartzOre(new BID(Ids::NETHER_QUARTZ_ORE), "Nether Quartz Ore", new BreakInfo(3.0, ToolType::PICKAXE, ToolTier::WOOD()->getHarvestLevel())));
|
||||
$this->register(new NetherReactor(new BID(Ids::NETHER_REACTOR_CORE), "Nether Reactor Core", new BreakInfo(3.0, ToolType::PICKAXE, ToolTier::WOOD()->getHarvestLevel())));
|
||||
@ -886,6 +889,9 @@ class BlockFactory{
|
||||
$deepslateBreakInfo = new BreakInfo(3, ToolType::PICKAXE, ToolTier::WOOD()->getHarvestLevel());
|
||||
$this->register(new SimplePillar(new BID(Ids::DEEPSLATE), "Deepslate", $deepslateBreakInfo));
|
||||
|
||||
//TODO: parity issue here - in Java this has a hardness of 3.0, but in bedrock it's 3.5
|
||||
$this->register(new Opaque(new BID(Ids::CHISELED_DEEPSLATE), "Chiseled Deepslate", new BreakInfo(3.5, ToolType::PICKAXE, ToolTier::WOOD()->getHarvestLevel())));
|
||||
|
||||
//TODO: check blast resistance
|
||||
$deepslateBrickBreakInfo = new BreakInfo(3.5, ToolType::PICKAXE, ToolTier::WOOD()->getHarvestLevel());
|
||||
$this->register(new Opaque(new BID(Ids::DEEPSLATE_BRICKS), "Deepslate Bricks", $deepslateBrickBreakInfo));
|
||||
|
@ -610,6 +610,9 @@ final class BlockTypeIds{
|
||||
public const POLISHED_DEEPSLATE_STAIRS = 10583;
|
||||
public const POLISHED_DEEPSLATE_WALL = 10584;
|
||||
public const QUARTZ_BRICKS = 10585;
|
||||
public const CHISELED_DEEPSLATE = 10586;
|
||||
public const CHISELED_NETHER_BRICKS = 10587;
|
||||
public const CRACKED_NETHER_BRICKS = 10588;
|
||||
|
||||
public const FIRST_UNUSED_BLOCK_ID = 10586;
|
||||
public const FIRST_UNUSED_BLOCK_ID = 10589;
|
||||
}
|
||||
|
@ -110,6 +110,8 @@ use pocketmine\utils\CloningRegistryTrait;
|
||||
* @method static CarvedPumpkin CARVED_PUMPKIN()
|
||||
* @method static ChemicalHeat CHEMICAL_HEAT()
|
||||
* @method static Chest CHEST()
|
||||
* @method static Opaque CHISELED_DEEPSLATE()
|
||||
* @method static Opaque CHISELED_NETHER_BRICKS()
|
||||
* @method static Opaque CHISELED_POLISHED_BLACKSTONE()
|
||||
* @method static SimplePillar CHISELED_QUARTZ()
|
||||
* @method static Opaque CHISELED_RED_SANDSTONE()
|
||||
@ -137,6 +139,7 @@ use pocketmine\utils\CloningRegistryTrait;
|
||||
* @method static Flower CORNFLOWER()
|
||||
* @method static Opaque CRACKED_DEEPSLATE_BRICKS()
|
||||
* @method static Opaque CRACKED_DEEPSLATE_TILES()
|
||||
* @method static Opaque CRACKED_NETHER_BRICKS()
|
||||
* @method static Opaque CRACKED_POLISHED_BLACKSTONE_BRICKS()
|
||||
* @method static Opaque CRACKED_STONE_BRICKS()
|
||||
* @method static CraftingTable CRAFTING_TABLE()
|
||||
@ -692,6 +695,8 @@ final class VanillaBlocks{
|
||||
self::register("carved_pumpkin", $factory->get(Ids::CARVED_PUMPKIN, 0));
|
||||
self::register("chemical_heat", $factory->get(Ids::CHEMICAL_HEAT, 0));
|
||||
self::register("chest", $factory->get(Ids::CHEST, 0));
|
||||
self::register("chiseled_deepslate", $factory->get(Ids::CHISELED_DEEPSLATE, 0));
|
||||
self::register("chiseled_nether_bricks", $factory->get(Ids::CHISELED_NETHER_BRICKS, 0));
|
||||
self::register("chiseled_polished_blackstone", $factory->get(Ids::CHISELED_POLISHED_BLACKSTONE, 0));
|
||||
self::register("chiseled_quartz", $factory->get(Ids::CHISELED_QUARTZ, 2));
|
||||
self::register("chiseled_red_sandstone", $factory->get(Ids::CHISELED_RED_SANDSTONE, 0));
|
||||
@ -719,6 +724,7 @@ final class VanillaBlocks{
|
||||
self::register("cornflower", $factory->get(Ids::CORNFLOWER, 0));
|
||||
self::register("cracked_deepslate_bricks", $factory->get(Ids::CRACKED_DEEPSLATE_BRICKS, 0));
|
||||
self::register("cracked_deepslate_tiles", $factory->get(Ids::CRACKED_DEEPSLATE_TILES, 0));
|
||||
self::register("cracked_nether_bricks", $factory->get(Ids::CRACKED_NETHER_BRICKS, 0));
|
||||
self::register("cracked_polished_blackstone_bricks", $factory->get(Ids::CRACKED_POLISHED_BLACKSTONE_BRICKS, 0));
|
||||
self::register("cracked_stone_bricks", $factory->get(Ids::CRACKED_STONE_BRICKS, 0));
|
||||
self::register("crafting_table", $factory->get(Ids::CRAFTING_TABLE, 0));
|
||||
|
@ -400,6 +400,8 @@ final class BlockObjectToBlockStateSerializer implements BlockStateSerializer{
|
||||
return Writer::create(Ids::CHEST)
|
||||
->writeHorizontalFacing($block->getFacing());
|
||||
});
|
||||
$this->mapSimple(Blocks::CHISELED_DEEPSLATE(), Ids::CHISELED_DEEPSLATE);
|
||||
$this->mapSimple(Blocks::CHISELED_NETHER_BRICKS(), Ids::CHISELED_NETHER_BRICKS);
|
||||
$this->mapSimple(Blocks::CHISELED_POLISHED_BLACKSTONE(), Ids::CHISELED_POLISHED_BLACKSTONE);
|
||||
$this->map(Blocks::CHISELED_QUARTZ(), fn(SimplePillar $block) => Helper::encodeQuartz(StringValues::CHISEL_TYPE_CHISELED, $block->getAxis()));
|
||||
$this->map(Blocks::CHISELED_RED_SANDSTONE(), fn() => Helper::encodeSandstone(Ids::RED_SANDSTONE, StringValues::SAND_STONE_TYPE_HEIROGLYPHS));
|
||||
@ -453,6 +455,7 @@ final class BlockObjectToBlockStateSerializer implements BlockStateSerializer{
|
||||
$this->map(Blocks::CORNFLOWER(), fn() => Helper::encodeRedFlower(StringValues::FLOWER_TYPE_CORNFLOWER));
|
||||
$this->mapSimple(Blocks::CRACKED_DEEPSLATE_BRICKS(), Ids::CRACKED_DEEPSLATE_BRICKS);
|
||||
$this->mapSimple(Blocks::CRACKED_DEEPSLATE_TILES(), Ids::CRACKED_DEEPSLATE_TILES);
|
||||
$this->mapSimple(Blocks::CRACKED_NETHER_BRICKS(), Ids::CRACKED_NETHER_BRICKS);
|
||||
$this->mapSimple(Blocks::CRACKED_POLISHED_BLACKSTONE_BRICKS(), Ids::CRACKED_POLISHED_BLACKSTONE_BRICKS);
|
||||
$this->map(Blocks::CRACKED_STONE_BRICKS(), fn() => Helper::encodeStoneBricks(StringValues::STONE_BRICK_TYPE_CRACKED));
|
||||
$this->mapSimple(Blocks::CRAFTING_TABLE(), Ids::CRAFTING_TABLE);
|
||||
|
@ -235,6 +235,8 @@ final class BlockStateToBlockObjectDeserializer implements BlockStateDeserialize
|
||||
return Blocks::CHEST()
|
||||
->setFacing($in->readHorizontalFacing());
|
||||
});
|
||||
$this->map(Ids::CHISELED_DEEPSLATE, fn() => Blocks::CHISELED_DEEPSLATE());
|
||||
$this->map(Ids::CHISELED_NETHER_BRICKS, fn() => Blocks::CHISELED_NETHER_BRICKS());
|
||||
$this->map(Ids::CHISELED_POLISHED_BLACKSTONE, fn() => Blocks::CHISELED_POLISHED_BLACKSTONE());
|
||||
$this->map(Ids::CLAY, fn() => Blocks::CLAY());
|
||||
$this->map(Ids::COAL_BLOCK, fn() => Blocks::COAL());
|
||||
@ -295,6 +297,7 @@ final class BlockStateToBlockObjectDeserializer implements BlockStateDeserialize
|
||||
});
|
||||
$this->map(Ids::CRACKED_DEEPSLATE_BRICKS, fn() => Blocks::CRACKED_DEEPSLATE_BRICKS());
|
||||
$this->map(Ids::CRACKED_DEEPSLATE_TILES, fn() => Blocks::CRACKED_DEEPSLATE_TILES());
|
||||
$this->map(Ids::CRACKED_NETHER_BRICKS, fn() => Blocks::CRACKED_NETHER_BRICKS());
|
||||
$this->map(Ids::CRACKED_POLISHED_BLACKSTONE_BRICKS, fn() => Blocks::CRACKED_POLISHED_BLACKSTONE_BRICKS());
|
||||
$this->map(Ids::CRAFTING_TABLE, fn() => Blocks::CRAFTING_TABLE());
|
||||
$this->map(Ids::CYAN_GLAZED_TERRACOTTA, fn(Reader $in) => Helper::decodeGlazedTerracotta(DyeColor::CYAN(), $in));
|
||||
|
@ -176,6 +176,8 @@ final class StringToItemParser extends StringToTParser{
|
||||
$result->registerBlock("chemistry_table", fn() => Blocks::COMPOUND_CREATOR());
|
||||
$result->registerBlock("chest", fn() => Blocks::CHEST());
|
||||
$result->registerBlock("chipped_anvil", fn() => Blocks::ANVIL()->setDamage(1));
|
||||
$result->registerBlock("chiseled_deepslate", fn() => Blocks::CHISELED_DEEPSLATE());
|
||||
$result->registerBlock("chiseled_nether_bricks", fn() => Blocks::CHISELED_NETHER_BRICKS());
|
||||
$result->registerBlock("chiseled_polished_blackstone", fn() => Blocks::CHISELED_POLISHED_BLACKSTONE());
|
||||
$result->registerBlock("chiseled_quartz", fn() => Blocks::CHISELED_QUARTZ());
|
||||
$result->registerBlock("chiseled_red_sandstone", fn() => Blocks::CHISELED_RED_SANDSTONE());
|
||||
@ -219,6 +221,7 @@ final class StringToItemParser extends StringToTParser{
|
||||
$result->registerBlock("cornflower", fn() => Blocks::CORNFLOWER());
|
||||
$result->registerBlock("cracked_deepslate_bricks", fn() => Blocks::CRACKED_DEEPSLATE_BRICKS());
|
||||
$result->registerBlock("cracked_deepslate_tiles", fn() => Blocks::CRACKED_DEEPSLATE_TILES());
|
||||
$result->registerBlock("cracked_nether_bricks", fn() => Blocks::CRACKED_NETHER_BRICKS());
|
||||
$result->registerBlock("cracked_polished_blackstone_bricks", fn() => Blocks::CRACKED_POLISHED_BLACKSTONE_BRICKS());
|
||||
$result->registerBlock("cracked_stone_bricks", fn() => Blocks::CRACKED_STONE_BRICKS());
|
||||
$result->registerBlock("crafting_table", fn() => Blocks::CRAFTING_TABLE());
|
||||
|
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user