Ignore coral_hang_type_bit on coral_fan_hang3

it's always written, but never used.
This commit is contained in:
Dylan K. Taylor 2022-07-13 16:38:37 +01:00
parent 2ba51567d8
commit 32f9fcd4e9
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -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)
->setCoralType($in->readBool(StateNames::CORAL_HANG_TYPE_BIT) ? CoralType::FIRE() : CoralType::BUBBLE()));
$this->map(Ids::CORAL_FAN_HANG3, function(Reader $in) : Block{
if($in->readBool(StateNames::CORAL_HANG_TYPE_BIT)){
throw $in->badValueException(StateNames::CORAL_HANG_TYPE_BIT, "1", "This should always be zero for hang3");
}
$in->ignored(StateNames::CORAL_HANG_TYPE_BIT); //the game always writes this, even though it's not used
return Helper::decodeWallCoralFan(Blocks::WALL_CORAL_FAN(), $in)
->setCoralType(CoralType::HORN());
});