mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-13 05:15:13 +00:00
Merge branch 'master' of https://github.com/pmmp/pocketmine-mp
This commit is contained in:
commit
00b567e397
@ -1,3 +1,9 @@
|
|||||||
|
---
|
||||||
|
name: Bug report
|
||||||
|
about: Report a bug in PocketMine-MP (not plugins)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
### Issue description
|
### Issue description
|
||||||
<!---
|
<!---
|
||||||
THIS ISSUE TRACKER IS FOR BUG REPORTING, NOT FOR HELP & SUPPORT. If you need help, use the links below.
|
THIS ISSUE TRACKER IS FOR BUG REPORTING, NOT FOR HELP & SUPPORT. If you need help, use the links below.
|
@ -467,9 +467,8 @@ class BlockFactory{
|
|||||||
if(!$override and self::isRegistered($id, $variant)){
|
if(!$override and self::isRegistered($id, $variant)){
|
||||||
throw new \InvalidArgumentException("Block registration conflicts with an existing block");
|
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
|
|
||||||
|
|
||||||
for($m = $variant + 1; $m <= ($variant | $stateMask); ++$m){
|
for($m = $variant; $m <= ($variant | $stateMask); ++$m){
|
||||||
if(($m & ~$stateMask) !== $variant){
|
if(($m & ~$stateMask) !== $variant){
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -486,6 +485,10 @@ class BlockFactory{
|
|||||||
self::fillStaticArrays($index, $v);
|
self::fillStaticArrays($index, $v);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!self::isRegistered($id, $variant)){
|
||||||
|
self::fillStaticArrays(($id << 4) | $variant, $block); //register default state mapped to variant, for blocks which don't use 0 as valid state
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static function fillStaticArrays(int $index, Block $block) : void{
|
private static function fillStaticArrays(int $index, Block $block) : void{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user