Advertisement
Guest User

Untitled

a guest
Oct 27th, 2016
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.02 KB | None | 0 0
  1. public void m()
  2. {
  3. if (getItemStack() == null)
  4. {
  5. die();
  6. }
  7. else
  8. {
  9. super.m();
  10.  
  11. int elapsedTicks = MinecraftServer.currentTick - this.lastTick;
  12. if (this.pickupDelay != 32767) {
  13. this.pickupDelay -= elapsedTicks;
  14. }
  15. if (this.age != 32768) {
  16. this.age += elapsedTicks;
  17. }
  18. this.lastTick = MinecraftServer.currentTick;
  19.  
  20. this.lastX = this.locX;
  21. this.lastY = this.locY;
  22. this.lastZ = this.locZ;
  23. this.motY -= 0.03999999910593033D;
  24. this.noclip = j(this.locX, (getBoundingBox().b + getBoundingBox().e) / 2.0D, this.locZ);
  25. move(this.motX, this.motY, this.motZ);
  26. boolean flag = ((int)this.lastX != (int)this.locX) || ((int)this.lastY != (int)this.locY) || ((int)this.lastZ != (int)this.locZ);
  27. if ((flag) || (this.ticksLived % 25 == 0))
  28. {
  29. if (this.world.getType(new BlockPosition(this)).getMaterial() == Material.LAVA)
  30. {
  31. this.motY = 0.20000000298023224D;
  32. this.motX = ((this.random.nextFloat() - this.random.nextFloat()) * 0.2F);
  33. this.motZ = ((this.random.nextFloat() - this.random.nextFloat()) * 0.2F);
  34. a(SoundEffects.bA, 0.4F, 2.0F + this.random.nextFloat() * 0.4F);
  35. }
  36. if (!this.world.isClientSide) {
  37. x();
  38. }
  39. }
  40. float f = 0.98F;
  41. if (this.onGround) {
  42. f = this.world.getType(new BlockPosition(MathHelper.floor(this.locX), MathHelper.floor(getBoundingBox().b) - 1, MathHelper.floor(this.locZ))).getBlock().frictionFactor * 0.98F;
  43. }
  44. this.motX *= f;
  45. this.motY *= 0.9800000190734863D;
  46. this.motZ *= f;
  47. if (this.onGround) {
  48. this.motY *= -0.5D;
  49. }
  50. aj();
  51. if ((!this.world.isClientSide) && (this.age >= this.world.spigotConfig.itemDespawnRate))
  52. {
  53. if (CraftEventFactory.callItemDespawnEvent(this).isCancelled())
  54. {
  55. this.age = 0;
  56. return;
  57. }
  58. die();
  59. }
  60. }
  61. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement