public override void OnBlockClicked(net.minecraft.src.World world, int i, int j, int k, net.minecraft.src.EntityPlayer entityplayer) { if (world.singleplayerWorld) { return; } else { net.minecraft.src.TileEntityNote tileentitynote = (net.minecraft.src.TileEntityNote )world.GetBlockTileEntity(i, j, k); tileentitynote.TriggerNote(world, i, j, k); return; } }
public override bool BlockActivated(net.minecraft.src.World world, int i, int j, int k, net.minecraft.src.EntityPlayer entityplayer) { if (world.singleplayerWorld) { return(true); } else { net.minecraft.src.TileEntityNote tileentitynote = (net.minecraft.src.TileEntityNote )world.GetBlockTileEntity(i, j, k); tileentitynote.ChangePitch(); tileentitynote.TriggerNote(world, i, j, k); return(true); } }
public override void OnNeighborBlockChange(net.minecraft.src.World world, int i, int j, int k, int l) { if (l > 0 && net.minecraft.src.Block.blocksList[l].CanProvidePower()) { bool flag = world.IsBlockGettingPowered(i, j, k); net.minecraft.src.TileEntityNote tileentitynote = (net.minecraft.src.TileEntityNote )world.GetBlockTileEntity(i, j, k); if (tileentitynote.previousRedstoneState != flag) { if (flag) { tileentitynote.TriggerNote(world, i, j, k); } tileentitynote.previousRedstoneState = flag; } } }