コード例 #1
0
 @Override
 public void invalidate() {
   FrequencyGrid.getWorldMap(this.worldObj)
       .getControlSystem()
       .remove(Integer.valueOf(getDeviceID()));
   super.invalidate();
 }
コード例 #2
0
 @Override
 public void invalidate() {
   if (this.addedToEnergyNet) {
     MinecraftForge.EVENT_BUS.post(new EnergyTileUnloadEvent(this));
     this.addedToEnergyNet = false;
   }
   FrequencyGrid.getWorldMap(this.worldObj).getConverter().remove(Integer.valueOf(getDeviceID()));
   super.invalidate();
 }
コード例 #3
0
 @Override
 public TileEntitySecurityStation getLinkedSecurityStation() {
   TileEntityCapacitor cap =
       (TileEntityCapacitor)
           FrequencyGrid.getWorldMap(this.worldObj)
               .getCapacitor()
               .get(Integer.valueOf(getPowerSourceID()));
   if (cap != null) {
     TileEntitySecurityStation sec = cap.getLinkedSecurityStation();
     if (sec != null) {
       return sec;
     }
   }
   return null;
 }
コード例 #4
0
 private TileEntityMFFS getTargetMaschine(int slot) {
   if ((getStackInSlot(slot) != null)
       && ((getStackInSlot(slot).getItem() instanceof ItemCardDataLink))) {
     int DeviceID = 0;
     NBTTagCompound tag = NBTTagCompoundHelper.getTAGfromItemstack(getStackInSlot(slot));
     if (tag.hasKey("DeviceID")) {
       DeviceID = tag.getInteger("DeviceID");
     }
     if (DeviceID != 0) {
       TileEntityMFFS device =
           FrequencyGrid.getWorldMap(this.worldObj)
               .getTileEntityMachines(
                   ItemCardDataLink.getDeviceTyp(getStackInSlot(slot)), DeviceID);
       if (device != null) {
         return device;
       }
     }
     setInventorySlotContents(slot, new ItemStack(ModularForceFieldSystem.itemCardEmpty));
   }
   return null;
 }