mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
38 lines
1.1 KiB
Java
38 lines
1.1 KiB
Java
package api.hbm.energy;
|
|
|
|
import java.util.List;
|
|
|
|
/**
|
|
* Not mandatory to use, but making your cables IPowerNet-compliant will allow them to connect to NTM cables.
|
|
* Cables will still work without it as long as they implement IEnergyConductor (or even IEnergyConnector) + self-built network code
|
|
* @author hbm
|
|
*/
|
|
public interface IPowerNet {
|
|
|
|
public void joinNetworks(IPowerNet network);
|
|
|
|
public IPowerNet joinLink(IEnergyConductor conductor);
|
|
public void leaveLink(IEnergyConductor conductor);
|
|
|
|
public void subscribe(IEnergyConnector connector);
|
|
public void unsubscribe(IEnergyConnector connector);
|
|
public boolean isSubscribed(IEnergyConnector connector);
|
|
|
|
public void destroy();
|
|
|
|
/**
|
|
* When a link is removed, instead of destroying the network, causing it to be recreated from currently loaded conductors,
|
|
* we re-evaluate it, creating new nets based on the previous links.
|
|
*
|
|
* NYI
|
|
*/
|
|
public void reevaluate();
|
|
|
|
public boolean isValid();
|
|
|
|
public List<IEnergyConductor> getLinks();
|
|
public List<IEnergyConnector> getSubscribers();
|
|
|
|
public long transferPower(long power);
|
|
}
|