fixed packet spam, removed item merging, various fixes

This commit is contained in:
GameHerobrine 2024-02-14 04:22:20 +03:00
parent dee744e709
commit 908cff1317
7 changed files with 46 additions and 24 deletions

View file

@ -94,7 +94,7 @@ class ItemEntity extends Entity{
$this->speedZ = (lcg_value() - lcg_value()) * 0.2;
}
$this->searchForOtherItemsNearby(); //not in vanilla 0.8.1
//$this->searchForOtherItemsNearby(); //not in vanilla 0.8.1, TODO reenable after fixing not correct count in inv
}
if($this->closed) return;
@ -112,6 +112,10 @@ class ItemEntity extends Entity{
if($this->onGround) $this->speedY *= -0.5;
if(abs($this->speedX) < self::MIN_POSSIBLE_SPEED) $this->speedX = 0;
if(abs($this->speedZ) < self::MIN_POSSIBLE_SPEED) $this->speedZ = 0;
if(abs($this->speedY) < self::MIN_POSSIBLE_SPEED) $this->speedY = 0;
++$this->age;
//TODO despawn after age >= 6000 ?;
}