mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 10:22:56 +00:00
Tighten validity checks for block metadata
This filters out over 200 invalid states which were previously considered just fine, including zero-width cakes, buttons with broken facing values, furnace/chest with crazy values, and more.
This commit is contained in:
@ -38,7 +38,7 @@ abstract class RedstoneRail extends BaseRail{
|
||||
$this->powered = ($meta & self::FLAG_POWERED) !== 0;
|
||||
}
|
||||
|
||||
protected function getConnectionsFromMeta(int $meta) : array{
|
||||
return self::CONNECTIONS[$meta & ~self::FLAG_POWERED] ?? [];
|
||||
protected function getConnectionsFromMeta(int $meta) : ?array{
|
||||
return self::CONNECTIONS[$meta & ~self::FLAG_POWERED] ?? null;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user