BlockStateToObjectDeserializer: remove redundant helper

This commit is contained in:
Dylan K. Taylor 2023-05-08 22:16:55 +01:00
parent 1b452f3a88
commit 7b1a1e5a18
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D
2 changed files with 4 additions and 8 deletions

View File

@ -165,13 +165,6 @@ final class BlockStateDeserializerHelper{
->setRotation($in->readBoundedInt(BlockStateNames::GROUND_SIGN_DIRECTION, 0, 15));
}
/** @throws BlockStateDeserializeException */
public static function decodeGlazedTerracotta(DyeColor $color, BlockStateReader $in) : GlazedTerracotta{
return VanillaBlocks::GLAZED_TERRACOTTA()
->setColor($color)
->setFacing($in->readHorizontalFacing());
}
public static function decodeItemFrame(ItemFrame $block, BlockStateReader $in) : ItemFrame{
$in->todo(StateNames::ITEM_FRAME_PHOTO_BIT); //TODO: not sure what the point of this is
return $block

View File

@ -194,7 +194,10 @@ final class BlockStateToObjectDeserializer implements BlockStateDeserializer{
Ids::WHITE_GLAZED_TERRACOTTA => DyeColor::WHITE(),
Ids::YELLOW_GLAZED_TERRACOTTA => DyeColor::YELLOW(),
] as $id => $color){
$this->map($id, fn(Reader $in) => Helper::decodeGlazedTerracotta($color, $in));
$this->map($id, fn(Reader $in) => Blocks::GLAZED_TERRACOTTA()
->setColor($color)
->setFacing($in->readHorizontalFacing())
);
}
foreach([