Guest User

Untitled

a guest
Jan 16th, 2019
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.93 KB | None | 0 0
  1. List list = worldObj.getEntitiesWithinAABBExcludingEntity(this, boundingBox.expand(12D, 12D, 12D));
  2.  
  3. for (int i = 0; i < list.size(); i++)
  4. {
  5. Entity entitycheck = (Entity)list.get(i);
  6. if (entitycheck instanceof EntityPlayer)
  7. {
  8. logdestroy1 = true;
  9. }
  10. if (entitycheck instanceof EntityGoldenRam||
  11. entitycheck instanceof EntityGoldArrow)
  12. {
  13. golden = true;
  14. }
  15. }
  16.  
  17.  
  18. int xx=(int)Math.floor(posX);
  19. int yy=(int)Math.floor(posY);
  20. int zz=(int)Math.floor(posZ);
  21. int id=worldObj.getBlockId(xx,yy,zz);
  22.  
  23. if (!golden)
  24. {
  25. for (int destroyx = -2; destroyx <=2; destroyx++)
  26. {
  27. int graveldestroy1 = rand.nextInt(30);
  28.  
  29. for (int destroyy = -1; destroyy <=3; destroyy++)
  30. {
  31. if (graveldestroy1 == 0)
  32. {
  33. graveldestroy = rand.nextBoolean();
  34. logdestroy = rand.nextBoolean();
  35. }
  36. for (int destroyz = -2; destroyz <=2; destroyz++)
  37. {
  38. if(worldObj.getBlockId(xx + destroyx, yy + destroyy, zz + destroyz) == Block.leaves.blockID)
  39. {
  40. worldObj.setBlockWithNotify(xx + destroyx, yy + destroyy, zz + destroyz, Block.gravel.blockID);
  41. worldObj.spawnParticle("spell", xx + destroyx, yy + destroyy + 1, zz + destroyz, 10F, 10F, 10F);
  42. worldObj.spawnParticle("spell", xx + destroyx+0.5, yy + destroyy + 1, zz + destroyz + 0.5, 10F, 10F, 10F);
  43. worldObj.spawnParticle("spell", xx + 0.5, yy , zz + 0.5, 10F, 10F, 10F);
  44. worldObj.spawnParticle("spell", xx + 0.5, yy + 1, zz + 0.5, 10F, 10F, 10F);
  45. }
  46. if(graveldestroy && worldObj.getBlockId(xx + destroyx, yy + destroyy, zz + destroyz) == Block.gravel.blockID)
  47. {
  48. worldObj.setBlockWithNotify(xx + destroyx, yy + destroyy, zz + destroyz, 00);
  49. worldObj.spawnParticle("spell", xx + destroyx, yy + destroyy + 1, zz + destroyz, 10F, 10F, 10F);
  50. worldObj.spawnParticle("spell", xx + destroyx+0.5, yy + destroyy + 1, zz + destroyz + 0.5, 10F, 10F, 10F);
  51. worldObj.spawnParticle("spell", xx + 0.5, yy , zz + 0.5, 10F, 10F, 10F);
  52. worldObj.spawnParticle("spell", xx + 0.5, yy + 1, zz + 0.5, 10F, 10F, 10F);
  53. graveldestroy = false;
  54. graveldestroy1 = 1;
  55. }
  56. if(logdestroy && worldObj.getBlockId(xx + destroyx, yy + destroyy, zz + destroyz) == Block.wood.blockID && logdestroy1)
  57. {
  58. worldObj.setBlockWithNotify(xx + destroyx, yy + destroyy, zz + destroyz, 00);
  59. worldObj.spawnParticle("spell", xx + destroyx, yy + destroyy + 1, zz + destroyz, 10F, 10F, 10F);
  60. worldObj.spawnParticle("spell", xx + destroyx+0.5, yy + destroyy + 1, zz + destroyz + 0.5, 10F, 10F, 10F);
  61. worldObj.spawnParticle("spell", xx + 0.5, yy , zz + 0.5, 10F, 10F, 10F);
  62. worldObj.spawnParticle("spell", xx + 0.5, yy + 1, zz + 0.5, 10F, 10F, 10F);
  63. logdestroy = false;
  64. int heal = rand.nextInt(5);
  65. if (heal == 1)
  66. {
  67. health++;
  68. heal = 5;
  69. }
  70. }
  71. }
  72. }
  73. }
  74. }
Add Comment
Please, Sign In to add comment