예제 #1
0
 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;
     }
 }
예제 #2
0
 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);
     }
 }
예제 #3
0
 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;
         }
     }
 }