Search in sources :

Example 1 with IEnergyTile

use of ic2.api.energy.tile.IEnergyTile in project Binnie by ForestryMC.

the class ComponentPowerReceptor method do_addToEnergyNet.

@Optional.Method(modid = "ic2")
private void do_addToEnergyNet() {
    MinecraftForge.EVENT_BUS.post(new EnergyTileLoadEvent((IEnergyTile) this.getMachine().getTileEntity()));
    this.registeredToIC2EnergyNet = true;
}
Also used : IEnergyTile(ic2.api.energy.tile.IEnergyTile) EnergyTileLoadEvent(ic2.api.energy.event.EnergyTileLoadEvent)

Example 2 with IEnergyTile

use of ic2.api.energy.tile.IEnergyTile in project Binnie by ForestryMC.

the class ComponentPowerReceptor method do_removeFromEnergyNet.

@Optional.Method(modid = "ic2")
private void do_removeFromEnergyNet() {
    MinecraftForge.EVENT_BUS.post(new EnergyTileUnloadEvent((IEnergyTile) this.getMachine().getTileEntity()));
    this.registeredToIC2EnergyNet = false;
}
Also used : EnergyTileUnloadEvent(ic2.api.energy.event.EnergyTileUnloadEvent) IEnergyTile(ic2.api.energy.tile.IEnergyTile)

Aggregations

IEnergyTile (ic2.api.energy.tile.IEnergyTile)2 EnergyTileLoadEvent (ic2.api.energy.event.EnergyTileLoadEvent)1 EnergyTileUnloadEvent (ic2.api.energy.event.EnergyTileUnloadEvent)1