@Override
 public void onNeighborBlockChange(World world, int x, int y, int z, Block block) {
   try {
     TileEntity tile = world.getTileEntity(x, y, z);
     if ((tile instanceof TileDigitalReceiverBox)) {
       TileDigitalReceiverBox structure = (TileDigitalReceiverBox) tile;
       if ((structure.getSignalType().needsSupport())
           && (!world.isSideSolid(x, y - 1, z, ForgeDirection.UP))
           && !(Mods.isLoaded(Mods.OpenComputers)
               && world.getTileEntity(x, y - 1, z) instanceof Environment)) {
         world.func_147480_a(x, y, z, true);
       } else {
         structure.onNeighborBlockChange(block);
       }
     }
   } catch (StackOverflowError error) {
     Computronics.log.error("Error in BlockDigitalReceiverBox.onNeighborBlockChange()");
     throw error;
   }
 }
예제 #2
0
 @Override
 public Collection<IActionExternal> getExternalActions(ForgeDirection side, TileEntity tile) {
   LinkedList<IActionExternal> actions = new LinkedList<IActionExternal>();
   if (tile != null) {
     if (Mods.isLoaded(Mods.OpenComputers) && tile instanceof Case) {
       actions.add(Actions.Computer_Start);
       actions.add(Actions.Computer_Stop);
     }
     if (tile instanceof TileTapeDrive) {
       actions.add(Actions.TapeDrive_Start);
       actions.add(Actions.TapeDrive_Stop);
       actions.add(Actions.TapeDrive_Rewind);
       actions.add(Actions.TapeDrive_Forward);
     }
     if (tile instanceof TileColorfulLamp) {
       actions.add(Actions.Lamp_SetColor);
       actions.add(Actions.Lamp_ResetColor);
     }
   }
   return actions;
 }