Example #1
0
  public void onBlockClicked(World worldIn, BlockPos pos, EntityPlayer playerIn) {
    if (!worldIn.isRemote) {
      TileEntity var4 = worldIn.getTileEntity(pos);

      if (var4 instanceof TileEntityNote) {
        ((TileEntityNote) var4).func_175108_a(worldIn, pos);
      }
    }
  }
Example #2
0
  public void onNeighborBlockChange(
      World worldIn, BlockPos pos, IBlockState state, Block neighborBlock) {
    boolean var5 = worldIn.isBlockPowered(pos);
    TileEntity var6 = worldIn.getTileEntity(pos);

    if (var6 instanceof TileEntityNote) {
      TileEntityNote var7 = (TileEntityNote) var6;

      if (var7.previousRedstoneState != var5) {
        if (var5) {
          var7.func_175108_a(worldIn, pos);
        }

        var7.previousRedstoneState = var5;
      }
    }
  }
Example #3
0
  public boolean onBlockActivated(
      World worldIn,
      BlockPos pos,
      IBlockState state,
      EntityPlayer playerIn,
      EnumFacing side,
      float hitX,
      float hitY,
      float hitZ) {
    if (worldIn.isRemote) {
      return true;
    } else {
      TileEntity var9 = worldIn.getTileEntity(pos);

      if (var9 instanceof TileEntityNote) {
        TileEntityNote var10 = (TileEntityNote) var9;
        var10.changePitch();
        var10.func_175108_a(worldIn, pos);
      }

      return true;
    }
  }