Examples of EnergyTileUnloadEvent


Examples of ic2.api.energy.event.EnergyTileUnloadEvent

       
        if (this.initialized)
        {
            if (Loader.isModLoaded("IC2"))
            {
                MinecraftForge.EVENT_BUS.post(new EnergyTileUnloadEvent(this));
            }
        }
    }
View Full Code Here

Examples of ic2.api.energy.event.EnergyTileUnloadEvent

        super.invalidate();
       
        if (this.ticks > 0L)
            if (Loader.isModLoaded("IC2"))
            {
                MinecraftForge.EVENT_BUS.post(new EnergyTileUnloadEvent(this));
            }
    }
View Full Code Here

Examples of ic2.api.energy.event.EnergyTileUnloadEvent

   * Forward for the TileEntity's invalidate(), used for destroying the energy net link.
   * Both onInvalidate and onOnChunkUnload have to be used.
   */
  public void onInvalidate() {
    if (addedToEnet) {
      MinecraftForge.EVENT_BUS.post(new EnergyTileUnloadEvent(this));

      addedToEnet = false;
    }
  }
View Full Code Here

Examples of ic2.api.energy.event.EnergyTileUnloadEvent

   * Forward for the TileEntity's invalidate(), used for destroying the energy net link.
   * Both onInvalidate and onOnChunkUnload have to be used.
   */
  public void onInvalidate() {
    if (addedToEnet) {
      MinecraftForge.EVENT_BUS.post(new EnergyTileUnloadEvent(this));

      addedToEnet = false;
    }
  }
View Full Code Here

Examples of ic2.api.energy.event.EnergyTileUnloadEvent

    {
        super.invalidate();
       
        if (this.initialized && Loader.isModLoaded("IC2"))
        {
            MinecraftForge.EVENT_BUS.post(new EnergyTileUnloadEvent(this));
        }
    }
View Full Code Here

Examples of ic2.api.energy.event.EnergyTileUnloadEvent

     */
    @Override
    public void onChunkUnload() {
        if (addedToEnet &&
                Info.isIc2Available()) {
            MinecraftForge.EVENT_BUS.post(new EnergyTileUnloadEvent(this));

            addedToEnet = false;
        }
    }
View Full Code Here

Examples of ic2.api.energy.event.EnergyTileUnloadEvent

     */
    @Override
    public void onChunkUnload() {
        if (addedToEnet &&
                Info.isIc2Available()) {
            MinecraftForge.EVENT_BUS.post(new EnergyTileUnloadEvent(this));

            addedToEnet = false;
        }
    }
View Full Code Here

Examples of ic2.api.energy.event.EnergyTileUnloadEvent

*/
public class IndustrialcraftUnloadHelper {

    public static void removeFromIC2EnergyNet(TileTransvectorInterface tileEntity) {
        if ((tileEntity.addedToICEnergyNet && !tileEntity.getWorldObj().isRemote)) {
            MinecraftForge.EVENT_BUS.post(new EnergyTileUnloadEvent((IEnergySink) tileEntity));
            tileEntity.addedToICEnergyNet = false;
        }
    }
View Full Code Here

Examples of ic2.api.energy.event.EnergyTileUnloadEvent

  @Override
  public void invalidate()
  {
    if (worldObj != null && initialized)
    {
      EnergyTileUnloadEvent unloadEvent = new EnergyTileUnloadEvent(this);
      MinecraftForge.EVENT_BUS.post(unloadEvent);
    }
    super.invalidate();
  }
View Full Code Here

Examples of ic2.api.energy.event.EnergyTileUnloadEvent

    case 18:
    case 19:
    case 20:
    case 21:
      //TODO How can we make IC2 check the new emit/accept values without doing a reload?
      if (initialized) MinecraftForge.EVENT_BUS.post(new EnergyTileUnloadEvent(this));
      initialized = false;
      sideSettings[id - 16] ^= 1;
      MinecraftForge.EVENT_BUS.post(new EnergyTileLoadEvent(this));
      initialized = true;
      //worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.