SpoutDev/Spout — Issue #776: CustomBlocks destroyed indirectly stick around invisibly?
Author: NerdyCast
Created: 2011-10-22 04:32:07+00:00
State: open

I was messing around with Custom Block making, and I made one that explodes at onBlockDestroyed().
This plugin uses a player movement listener to do certain things, for example play smoke or lightning, when the player gets close to the custom block.
The player movement listener checks for the block like this:

SpoutManager.getMaterialManager().isCustomBlock(to.getRelative(BlockFace.NORTH))

or any BlockFace.(direction) value.

That check returns false for a CustomBlock destroyed (and exploded) due to a player destroying it, but if the explosion sets off a chain reaction and destroys other nearby Custom blocks, the air created after said destruction for some reason causes the check to return true and the effects to play if the player gets near to where the block used to be.

Please help, thank you!