better fall dmg, tweaks to tnt motion, spam remove

This commit is contained in:
GameHerobrine 2024-03-05 04:44:09 +03:00
parent 9ee4b08657
commit f3a0705c66
5 changed files with 8 additions and 8 deletions

View file

@ -859,7 +859,7 @@ class Entity extends Position
$clz::fallOn($this->level, $x, $y, $z, $this, floor($this->fallStart - $this->y)); $clz::fallOn($this->level, $x, $y, $z, $this, floor($this->fallStart - $this->y));
} }
$dmg = floor($this->fallStart - $this->y) - 3; $dmg = ceil($this->fallStart - $this->y - 3);
if($dmg > 0){ if($dmg > 0){
$this->harm($dmg, "fall"); $this->harm($dmg, "fall");
} }

View file

@ -26,7 +26,7 @@ abstract class Living extends Entity implements Pathfindable{
//if(self::$despawnMobs) $this->server->schedule(self::$despawnTimer, [$this, "close"]); //900*20 //if(self::$despawnMobs) $this->server->schedule(self::$despawnTimer, [$this, "close"]); //900*20
} }
public function fall(){ public function fall(){
$dmg = floor($this->fallDistance - 3); $dmg = ceil($this->fallDistance - 3);
if($dmg > 0){ if($dmg > 0){
$this->harm($dmg, "fall"); $this->harm($dmg, "fall");
} }

View file

@ -43,8 +43,8 @@ class PrimedTNT extends Entity{
$this->speedZ *= 0.98; $this->speedZ *= 0.98;
if($this->onGround){ if($this->onGround){
$this->speedX *= 0.6; $this->speedX *= 0.7;
$this->speedZ *= 0.6; $this->speedZ *= 0.7;
$this->speedY *= -0.5; $this->speedY *= -0.5;
} }

View file

@ -92,7 +92,7 @@ class MobSpawner{
if($e instanceof Entity){ if($e instanceof Entity){
$this->server->api->entity->spawnToAll($e); $this->server->api->entity->spawnToAll($e);
console("[DEBUG] $type spawned at $x, $y, $z"); //ConsoleAPI::debug("$type spawned at $x, $y, $z");
} }
if(!isset($this->playerAffectedEIDS[$player->entity->eid])){ if(!isset($this->playerAffectedEIDS[$player->entity->eid])){
$this->playerAffectedEIDS[$player->entity->eid] = [$e->eid => true]; $this->playerAffectedEIDS[$player->entity->eid] = [$e->eid => true];