mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 19:49:44 +00:00
tnt will not regenerate you now + will add knockback to players
This commit is contained in:
parent
a10c6a1d57
commit
2678243d8b
4 changed files with 50 additions and 32 deletions
|
|
@ -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()){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue