Package ic2.api.energy.tile

Examples of ic2.api.energy.tile.IEnergySink


    {
      energyBuffer += outputRate;
      EnergyNet net = EnergyNet.getForWorld(worldObj);
      while (energyBuffer >= packetSize)
      {
        EnergyTileSourceEvent sourceEvent = new EnergyTileSourceEvent(this, packetSize);
        MinecraftForge.EVENT_BUS.post(sourceEvent);
        //        net.emitEnergyFrom(this, packetSize); // No reason to save any surplus. Output is always the same.
        energyBuffer -= packetSize;
      }
    }
View Full Code Here


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

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

   * 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

   * 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

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

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

            addedToEnet = false;
        }
    }
View Full Code Here

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

            addedToEnet = false;
        }
    }
View Full Code Here

*/
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

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

TOP

Related Classes of ic2.api.energy.tile.IEnergySink

Copyright © 2018 www.massapicom. 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.