Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- List list = worldObj.getEntitiesWithinAABBExcludingEntity(this, boundingBox.expand(12D, 12D, 12D));
- for (int i = 0; i < list.size(); i++)
- {
- Entity entitycheck = (Entity)list.get(i);
- if (entitycheck instanceof EntityPlayer)
- {
- logdestroy1 = true;
- }
- if (entitycheck instanceof EntityGoldenRam||
- entitycheck instanceof EntityGoldArrow)
- {
- golden = true;
- }
- }
- int xx=(int)Math.floor(posX);
- int yy=(int)Math.floor(posY);
- int zz=(int)Math.floor(posZ);
- int id=worldObj.getBlockId(xx,yy,zz);
- if (!golden)
- {
- for (int destroyx = -2; destroyx <=2; destroyx++)
- {
- int graveldestroy1 = rand.nextInt(30);
- for (int destroyy = -1; destroyy <=3; destroyy++)
- {
- if (graveldestroy1 == 0)
- {
- graveldestroy = rand.nextBoolean();
- logdestroy = rand.nextBoolean();
- }
- for (int destroyz = -2; destroyz <=2; destroyz++)
- {
- if(worldObj.getBlockId(xx + destroyx, yy + destroyy, zz + destroyz) == Block.leaves.blockID)
- {
- worldObj.setBlockWithNotify(xx + destroyx, yy + destroyy, zz + destroyz, Block.gravel.blockID);
- worldObj.spawnParticle("spell", xx + destroyx, yy + destroyy + 1, zz + destroyz, 10F, 10F, 10F);
- worldObj.spawnParticle("spell", xx + destroyx+0.5, yy + destroyy + 1, zz + destroyz + 0.5, 10F, 10F, 10F);
- worldObj.spawnParticle("spell", xx + 0.5, yy , zz + 0.5, 10F, 10F, 10F);
- worldObj.spawnParticle("spell", xx + 0.5, yy + 1, zz + 0.5, 10F, 10F, 10F);
- }
- if(graveldestroy && worldObj.getBlockId(xx + destroyx, yy + destroyy, zz + destroyz) == Block.gravel.blockID)
- {
- worldObj.setBlockWithNotify(xx + destroyx, yy + destroyy, zz + destroyz, 00);
- worldObj.spawnParticle("spell", xx + destroyx, yy + destroyy + 1, zz + destroyz, 10F, 10F, 10F);
- worldObj.spawnParticle("spell", xx + destroyx+0.5, yy + destroyy + 1, zz + destroyz + 0.5, 10F, 10F, 10F);
- worldObj.spawnParticle("spell", xx + 0.5, yy , zz + 0.5, 10F, 10F, 10F);
- worldObj.spawnParticle("spell", xx + 0.5, yy + 1, zz + 0.5, 10F, 10F, 10F);
- graveldestroy = false;
- graveldestroy1 = 1;
- }
- if(logdestroy && worldObj.getBlockId(xx + destroyx, yy + destroyy, zz + destroyz) == Block.wood.blockID && logdestroy1)
- {
- worldObj.setBlockWithNotify(xx + destroyx, yy + destroyy, zz + destroyz, 00);
- worldObj.spawnParticle("spell", xx + destroyx, yy + destroyy + 1, zz + destroyz, 10F, 10F, 10F);
- worldObj.spawnParticle("spell", xx + destroyx+0.5, yy + destroyy + 1, zz + destroyz + 0.5, 10F, 10F, 10F);
- worldObj.spawnParticle("spell", xx + 0.5, yy , zz + 0.5, 10F, 10F, 10F);
- worldObj.spawnParticle("spell", xx + 0.5, yy + 1, zz + 0.5, 10F, 10F, 10F);
- logdestroy = false;
- int heal = rand.nextInt(5);
- if (heal == 1)
- {
- health++;
- heal = 5;
- }
- }
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment