mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 03:59:43 +00:00
fixed packet spam, removed item merging, various fixes
This commit is contained in:
parent
dee744e709
commit
908cff1317
7 changed files with 46 additions and 24 deletions
|
|
@ -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 ?;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue