mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-14 23:45:34 +00:00
Ignore coral_hang_type_bit on coral_fan_hang3
it's always written, but never used.
This commit is contained in:
parent
2ba51567d8
commit
32f9fcd4e9
@ -295,9 +295,7 @@ final class BlockStateToBlockObjectDeserializer implements BlockStateDeserialize
|
|||||||
$this->map(Ids::CORAL_FAN_HANG2, fn(Reader $in) => Helper::decodeWallCoralFan(Blocks::WALL_CORAL_FAN(), $in)
|
$this->map(Ids::CORAL_FAN_HANG2, fn(Reader $in) => Helper::decodeWallCoralFan(Blocks::WALL_CORAL_FAN(), $in)
|
||||||
->setCoralType($in->readBool(StateNames::CORAL_HANG_TYPE_BIT) ? CoralType::FIRE() : CoralType::BUBBLE()));
|
->setCoralType($in->readBool(StateNames::CORAL_HANG_TYPE_BIT) ? CoralType::FIRE() : CoralType::BUBBLE()));
|
||||||
$this->map(Ids::CORAL_FAN_HANG3, function(Reader $in) : Block{
|
$this->map(Ids::CORAL_FAN_HANG3, function(Reader $in) : Block{
|
||||||
if($in->readBool(StateNames::CORAL_HANG_TYPE_BIT)){
|
$in->ignored(StateNames::CORAL_HANG_TYPE_BIT); //the game always writes this, even though it's not used
|
||||||
throw $in->badValueException(StateNames::CORAL_HANG_TYPE_BIT, "1", "This should always be zero for hang3");
|
|
||||||
}
|
|
||||||
return Helper::decodeWallCoralFan(Blocks::WALL_CORAL_FAN(), $in)
|
return Helper::decodeWallCoralFan(Blocks::WALL_CORAL_FAN(), $in)
|
||||||
->setCoralType(CoralType::HORN());
|
->setCoralType(CoralType::HORN());
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user