register honeycomb blocks properly

This commit is contained in:
Dylan K. Taylor 2022-07-05 21:03:27 +01:00
parent e5b038ebcd
commit a8dae96bb0
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D
3 changed files with 3 additions and 0 deletions

View File

@ -742,6 +742,7 @@ final class BlockObjectToBlockStateSerializer implements BlockStateSerializer{
->writeInt(StateNames::DEPRECATED, 0)
->writePillarAxis($block->getAxis());
});
$this->mapSimple(Blocks::HONEYCOMB(), Ids::HONEYCOMB_BLOCK);
$this->map(Blocks::HOPPER(), function(Hopper $block) : Writer{
return Writer::create(Ids::HOPPER)
->writeBool(StateNames::TOGGLE_BIT, $block->isPowered())

View File

@ -602,6 +602,7 @@ final class BlockStateToBlockObjectDeserializer implements BlockStateDeserialize
return Blocks::HAY_BALE()->setAxis($in->readPillarAxis());
});
$this->map(Ids::HEAVY_WEIGHTED_PRESSURE_PLATE, fn(Reader $in) => Helper::decodeWeightedPressurePlate(Blocks::WEIGHTED_PRESSURE_PLATE_HEAVY(), $in));
$this->map(Ids::HONEYCOMB_BLOCK, fn() => Blocks::HONEYCOMB());
$this->map(Ids::HOPPER, function(Reader $in) : Block{
return Blocks::HOPPER()
->setFacing($in->readFacingWithoutUp())

View File

@ -616,6 +616,7 @@ final class StringToItemParser extends StringToTParser{
$result->registerBlock("hay_bale", fn() => Blocks::HAY_BALE());
$result->registerBlock("hay_block", fn() => Blocks::HAY_BALE());
$result->registerBlock("heavy_weighted_pressure_plate", fn() => Blocks::WEIGHTED_PRESSURE_PLATE_HEAVY());
$result->registerBlock("honeycomb_block", fn() => Blocks::HONEYCOMB());
$result->registerBlock("hopper", fn() => Blocks::HOPPER());
$result->registerBlock("hopper_block", fn() => Blocks::HOPPER());
$result->registerBlock("ice", fn() => Blocks::ICE());