}
public void handleRedstoneForBlock(Block block, int oldLevel, int newLevel) {
World world = block.getWorld();
BlockWorldVector v = BukkitUtil.toWorldVector(block);
// Give the method a BlockWorldVector instead of a Block
boolean wasOn = oldLevel >= 1;
boolean isOn = newLevel >= 1;
boolean wasChange = wasOn != isOn;
// For efficiency reasons, we're only going to consider changes between
// off and on state, and ignore simple current changes (i.e. 15->13)
if (!wasChange) return;
LocalWorld w = BukkitUtil.getLocalWorld(world);
int x = v.getBlockX();
int y = v.getBlockY();
int z = v.getBlockZ();
// When this hook has been called, the level in the world has not
// yet been updated, so we're going to do this very ugly thing of
// faking the value with the new one whenever the data value of this
// block is requested -- it is quite ugly