SubChunk: Fixed constant redefinition on worker threads when autoloading

this happens when workers inherit constants but not classes.
This commit is contained in:
Dylan K. Taylor 2018-11-17 16:29:53 +00:00
parent f8bfbc107d
commit a02f422d85

View File

@ -23,7 +23,11 @@ declare(strict_types=1);
namespace pocketmine\level\format;
define(__NAMESPACE__ . '\ZERO_NIBBLE_ARRAY', str_repeat("\x00", 2048));
$name = __NAMESPACE__ . '\ZERO_NIBBLE_ARRAY';
if(!defined($name)){
define($name, str_repeat("\x00", 2048));
}
unset($name);
class SubChunk implements SubChunkInterface{
protected $ids;