Fixed Item vibration

This commit is contained in:
Shoghi Cervantes 2015-05-16 21:38:10 +02:00
parent 63a5269313
commit fb05636694
No known key found for this signature in database
GPG Key ID: 78464DB0A7837F89

View File

@ -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()){