sic energy source, 1000 EU buffer, tier 1 (32 EU/t, LV) private BasicSource ic2EnergySource = new BasicSource(this, 1000, 1);
@Override public void invalidate() { ic2EnergySource.onInvalidate(); // notify the energy source ... super.invalidate(); // this is important for mc! }
@Override public void onChunkUnload() { ic2EnergySource.onOnChunkUnload(); // notify the energy source ... }
@Override public void readFromNBT(NBTTagCompound tag) { super.readFromNBT(tag); ic2EnergySource.onReadFromNbt(tag); ... }
@Override public void writeToNBT(NBTTagCompound tag) { super.writeToNBT(tag); ic2EnergySource.onWriteToNbt(tag); ... }
@Override public void updateEntity() { ic2EnergySource.onUpdateEntity(); // notify the energy source ... ic2EnergySource.addEnergy(5); // add 5 eu to the source's buffer this tick ... } ... }
@endcode
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.