mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-13 17:29:44 +00:00
Fixed Item vibration
This commit is contained in:
parent
63a5269313
commit
fb05636694
@ -103,6 +103,7 @@ class Item extends Entity{
|
||||
$this->motionY -= $this->gravity;
|
||||
|
||||
$this->checkObstruction($this->x, $this->y, $this->z);
|
||||
|
||||
$this->move($this->motionX, $this->motionY, $this->motionZ);
|
||||
|
||||
$friction = 1 - $this->drag;
|
||||
@ -115,12 +116,12 @@ class Item extends Entity{
|
||||
$this->motionY *= 1 - $this->drag;
|
||||
$this->motionZ *= $friction;
|
||||
|
||||
$this->updateMovement();
|
||||
|
||||
if($this->onGround){
|
||||
$this->motionY *= -0.5;
|
||||
}
|
||||
|
||||
$this->updateMovement();
|
||||
|
||||
if($this->age > 6000){
|
||||
$this->server->getPluginManager()->callEvent($ev = new ItemDespawnEvent($this));
|
||||
if($ev->isCancelled()){
|
||||
|
Loading…
x
Reference in New Issue
Block a user