entities will update every tick, fixed air(hopefully)

This commit is contained in:
GameHerobrine 2023-12-28 21:13:09 +03:00
parent 338902af19
commit a6f2c7e257
2 changed files with 10 additions and 14 deletions

View file

@ -1331,6 +1331,7 @@ class Player{
if(EventHandler::callEvent(new DataPacketReceiveEvent($this, $packet)) === BaseEvent::DENY){
return;
}
ConsoleAPI::debug("Got packet: {$packet->pid()}");
switch($packet->pid()){
case 0x01:
break;
@ -1917,7 +1918,7 @@ class Player{
$this->teleport($this->spawnPosition);
if($this->entity instanceof Entity){
$this->entity->fire = 0;
$this->entity->air = 300;
$this->entity->air = $this->entity->maxAir;
$this->entity->setHealth(20, "respawn", true);
$this->entity->updateMetadata();
}else{