ladder breaks if it is in the air

This commit is contained in:
GameHerobrine 2022-05-10 02:34:25 +03:00
parent b805470416
commit be0ed7590b
2 changed files with 23 additions and 16 deletions

View file

@ -636,7 +636,9 @@ class Entity extends Position{
}
$d[16]["value"] = (($this->data["Sheared"] == 1 ? 1:0) << 4) | ($this->data["Color"] & 0x0F);
}elseif($this->type === OBJECT_PRIMEDTNT){
$d[16]["value"] = (int) max(0, $this->data["fuse"] - (microtime(true) - $this->spawntime) * 20);
if(isset($this->data["fuse"])){ //ladder fix
$d[16]["value"] = (int) max(0, $this->data["fuse"] - (microtime(true) - $this->spawntime) * 20);
}
}elseif($this->class === ENTITY_PLAYER){
if($this->player->isSleeping !== false){
$d[16]["value"] = 2;