Posted March 11, 201312 yr Hi community I'm creating a mod for which I need to explode blocks if they don't are surounded with specific other blocks. I did it with the onBlockAdded methob: public void onBlockAdded(WorldProvider par5wp, World par1World,int par2, int par3, int par4, int par6) { super.onBlockAdded(par1World, par2, par3, par4); if (par1World.getBlockId(par2, par3 - 1, par4) != (255|574) & par1World.getBlockId(par2 - 1, par3, par4) != (255|574) & par1World.getBlockId(par2, par3, par4-1) != (255|574) & par1World.getBlockId(par2 + 1, par3, par4) != (255|574) & par1World.getBlockId(par2, par3+1, par4) != (255|574) & par1World.getBlockId(par2, par3, par4 + 1) != (255|574)) { if (par1World.isRemote) { par1World.newExplosion((Entity)null, (double)((float)par2 + 0.5F), (double)((float)par3 + 0.5F), (double)((float)par4 + 0.5F), 5.0F, true, true); } } But it doesn't explode!! Whats wrong here?
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.