use of ic2.api.energy.event.EnergyTileUnloadEvent in project Flux-Networks by SonarSonic.
the class TileFluxIC2 method onChunkUnload.
@Override
@Optional.Method(modid = "ic2")
public void onChunkUnload() {
super.onChunkUnload();
if (!this.getWorld().isRemote && IC2Connected) {
MinecraftForge.EVENT_BUS.post(new EnergyTileUnloadEvent(this));
IC2Connected = false;
}
}
use of ic2.api.energy.event.EnergyTileUnloadEvent in project Galacticraft by micdoodle8.
the class BasicSink method onChunkUnload.
/**
* Forward for the base TileEntity's onChunkUnload(), used for destroying the energy net link.
* Both invalidate and onChunkUnload have to be used.
*/
@Override
public void onChunkUnload() {
if (addedToEnet && Info.isIc2Available()) {
MinecraftForge.EVENT_BUS.post(new EnergyTileUnloadEvent(this));
addedToEnet = false;
}
}
use of ic2.api.energy.event.EnergyTileUnloadEvent in project Galacticraft by micdoodle8.
the class BasicSource method onChunkUnload.
/**
* Forward for the base TileEntity's onChunkUnload(), used for destroying the energy net link.
* Both invalidate and onChunkUnload have to be used.
*/
@Override
public void onChunkUnload() {
if (addedToEnet && Info.isIc2Available()) {
MinecraftForge.EVENT_BUS.post(new EnergyTileUnloadEvent(this));
addedToEnet = false;
}
}
use of ic2.api.energy.event.EnergyTileUnloadEvent in project RebornCore by TechReborn.
the class TileEnergyBase method onChunkUnload.
@Override
@Optional.Method(modid = "ic2")
public void onChunkUnload() {
super.onChunkUnload();
if (getPowerConfig().eu()) {
if (addedToEnet && Info.isIc2Available()) {
MinecraftForge.EVENT_BUS.post(new EnergyTileUnloadEvent(this));
addedToEnet = false;
}
}
}
use of ic2.api.energy.event.EnergyTileUnloadEvent 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;
}
Aggregations