fixed item insta-despawn

This commit is contained in:
Mini-Chiss 2015-08-12 09:27:05 +02:00
parent f19efb4a93
commit 860127631c

View File

@ -63,8 +63,7 @@ public class AnimationCarl extends Animation
Vector vel = new Vector(Math.sin(i * 9/5d), 0, Math.cos(i * 9/5d));
UtilAction.velocity(gem, vel, Math.abs(Math.sin(i * 12/3000d)), false, 0, 0.2 + Math.abs(Math.cos(i * 12/3000d))*0.6, 1, false);
UtilAction.velocity(coin, vel, Math.abs(Math.sin(UtilMath.r(i) * 30/3000d)), false, 0, 0.2 + Math.abs(Math.cos(UtilMath.r(i) * 30/3000d))*0.6, 1, false);
coin.setTicksLived(1160);
gem.setTicksLived(1160);
}
}
if(((String) _type).contentEquals("RANK"))
@ -76,7 +75,7 @@ public class AnimationCarl extends Animation
Vector vel = new Vector(Math.sin(UtilMath.r(i) * 7/5d), 0, Math.cos(UtilMath.r(i) * 7/5d));
UtilAction.velocity(coin, vel, Math.abs(Math.sin(UtilMath.r(i) * 7/3000d)), false, 0, 0.2 + Math.abs(Math.cos(UtilMath.r(i) * 7/3000d))*0.6, 1, false);
coin.setTicksLived(1160);
}
}
if(!((String) _type).contentEquals("DAILY")&& !((String) _type).contentEquals("RANK")&& !((String) _type).contentEquals("POLL"))
@ -87,7 +86,7 @@ public class AnimationCarl extends Animation
Vector vel = new Vector(Math.sin(64 * 8/5d), 0, Math.cos(64 * 8/5d));
UtilAction.velocity(paper, vel, Math.abs(Math.sin(64 * 9/3000d)), false, 0, 0.2 + Math.abs(Math.cos(64 + 9/3000d))*0.6, 1, false);
paper.setTicksLived(1160);
for (int i = 50; i < 60; i++)
{
Item gem = _creeper.getWorld().dropItem(_creeper.getLocation().add(0.5, 1.5, 0.5), ItemStackFactory.Instance.CreateStack(Material.EMERALD, (byte) 0, 1, " " + i));
@ -95,7 +94,7 @@ public class AnimationCarl extends Animation
Vector velo = new Vector(Math.sin(i * 8/5d), 0, Math.cos(i * 8/5d));
UtilAction.velocity(gem, velo, Math.abs(Math.sin(i * 8/3000d)), false, 0, 0.2 + Math.abs(Math.cos(i + 8/3000d))*0.6, 1, false);
gem.setTicksLived(1160);
}
}
finish();