tnt will not regenerate you now + will add knockback to players

This commit is contained in:
GameHerobrine 2024-03-26 06:26:32 +03:00
parent a10c6a1d57
commit 2678243d8b
4 changed files with 50 additions and 32 deletions

View file

@ -494,8 +494,15 @@ class Level{
}
$this->totalMobsAmount = 0;
$post = [];
//console($this->getName());
foreach($this->entityList as $k => $e){
if(!($e instanceof Entity)){
unset($this->entityList[$k]);
unset($this->server->entities[$k]);
//TODO try to remove from $entityListPositioned?
continue;
}
$dd = CORRECT_ENTITY_CLASSES[$e->class] ?? false;
if($dd === false || ($dd !== true && !isset($dd[$e->type]))){
ConsoleAPI::warn("Entity $k has invalid entity! {$e->class} {$e->type}");
@ -514,13 +521,6 @@ class Level{
continue;
}
if(!($e instanceof Entity)){
unset($this->entityList[$k]);
unset($this->server->entities[$k]);
//TODO try to remove from $entityListPositioned?
continue;
}
$curChunkX = (int)$e->x >> 4;
$curChunkZ = (int)$e->z >> 4;
if($e->class === ENTITY_MOB && !$e->isPlayer()){