public function __construct(FullChunk $chunk, CompoundTag $nbt)
{
parent::__construct($chunk, $nbt);
if (!isset($nbt->EntityId)) {
$nbt->EntityId = new IntTag("EntityId", 0);
}
if (!isset($nbt->SpawnCount)) {
$nbt->SpawnCount = new IntTag("SpawnCount", 4);
}
if (!isset($nbt->SpawnRange)) {
$nbt->SpawnRange = new IntTag("SpawnRange", 4);
}
if (!isset($nbt->MinSpawnDelay)) {
$nbt->MinSpawnDelay = new IntTag("MinSpawnDelay", 200);
}
if (!isset($nbt->MaxSpawnDelay)) {
$nbt->MaxSpawnDelay = new IntTag("MaxSpawnDelay", 799);
}
if (!isset($nbt->Delay)) {
$nbt->Delay = new IntTag("Delay", mt_rand($nbt->MinSpawnDelay->getValue(), $nbt->MaxSpawnDelay->getValue()));
}
if ($this->getEntityId() > 0) {
$this->scheduleUpdate();
}
}