Change projectile behaviour with reinforced to not hit stuff multiple times and teleport around #1520

This commit is contained in:
Bernhard Bonigl committed 2015-04-13 09:09:52 +02:00
1 parent 8018cd4527
commit 992b2a893a
1 file changed
+8 -3
@@ -294,10 +294,15 @@ public abstract class ProjectileBase extends EntityArrow implements IEntityAddit
this.setDead();
else
{
this.motionX = 0;
this.motionY = 0;
this.motionZ = 0;
this.motionX = Math.max(-0.1,Math.min(0.1, -motionX));
this.motionY = 0.2;
this.motionZ = Math.max(-0.1,Math.min(0.1, -motionZ));
this.ticksInAir = 0;
this.posX = movingobjectposition.entityHit.posX;
this.posY = movingobjectposition.entityHit.posY + movingobjectposition.entityHit.height/2d;
this.posZ = movingobjectposition.entityHit.posZ;
this.defused = true;
//this.shootingEntity = movingobjectposition.entityHit;
}
}
}