when I use setBlock the block appears then disappears. this is my code ...
public boolean onCast(EntityPlayer player, int x, int y, int z) {
y += 1;
World world = player.worldObj;
if (world.getBlock(x, y, z) == Blocks.water) {
world.setBlock(x, y, z, Blocks.ice);
return true;
}
return false;
}
the x, y, z is the block the player right clicks.