mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-11 04:17:48 +00:00
BlockStateToObjectDeserializer: remove redundant helper
This commit is contained in:
parent
1b452f3a88
commit
7b1a1e5a18
@ -165,13 +165,6 @@ final class BlockStateDeserializerHelper{
|
|||||||
->setRotation($in->readBoundedInt(BlockStateNames::GROUND_SIGN_DIRECTION, 0, 15));
|
->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{
|
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
|
$in->todo(StateNames::ITEM_FRAME_PHOTO_BIT); //TODO: not sure what the point of this is
|
||||||
return $block
|
return $block
|
||||||
|
@ -194,7 +194,10 @@ final class BlockStateToObjectDeserializer implements BlockStateDeserializer{
|
|||||||
Ids::WHITE_GLAZED_TERRACOTTA => DyeColor::WHITE(),
|
Ids::WHITE_GLAZED_TERRACOTTA => DyeColor::WHITE(),
|
||||||
Ids::YELLOW_GLAZED_TERRACOTTA => DyeColor::YELLOW(),
|
Ids::YELLOW_GLAZED_TERRACOTTA => DyeColor::YELLOW(),
|
||||||
] as $id => $color){
|
] 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([
|
foreach([
|
||||||
|
Loading…
x
Reference in New Issue
Block a user