mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-13 09:19:42 +00:00
BlockFactory: fix failing test
This commit is contained in:
parent
7af7783cc8
commit
f671da99a6
@ -464,6 +464,9 @@ class BlockFactory{
|
|||||||
throw new \InvalidArgumentException("Block variant collides with state bitmask");
|
throw new \InvalidArgumentException("Block variant collides with state bitmask");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!$override and self::isRegistered($id, $variant)){
|
||||||
|
throw new \InvalidArgumentException("Block registration conflicts with an existing block");
|
||||||
|
}
|
||||||
self::fillStaticArrays(($id << 4) | $variant, $block); //register default state mapped to variant, for blocks which don't use 0 as valid state
|
self::fillStaticArrays(($id << 4) | $variant, $block); //register default state mapped to variant, for blocks which don't use 0 as valid state
|
||||||
|
|
||||||
for($m = $variant + 1; $m <= ($variant | $stateMask); ++$m){
|
for($m = $variant + 1; $m <= ($variant | $stateMask); ++$m){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user