2013-08-27 00:49:32 +02:00
|
|
|
package mekanism.api.transmitters;
|
2013-08-18 22:51:47 +02:00
|
|
|
|
2013-08-19 03:32:47 +02:00
|
|
|
import net.minecraft.tileentity.TileEntity;
|
|
|
|
|
2013-08-18 22:51:47 +02:00
|
|
|
public interface ITransmitter<N>
|
|
|
|
{
|
|
|
|
/**
|
2013-08-21 21:26:47 +02:00
|
|
|
* Get the transmitter's transmission type
|
|
|
|
*
|
|
|
|
* @return TransmissionType this transmitter uses
|
|
|
|
*/
|
|
|
|
public TransmissionType getTransmissionType();
|
|
|
|
|
|
|
|
/**
|
2013-08-18 22:51:47 +02:00
|
|
|
* Gets the network currently in use by this transmitter segment.
|
|
|
|
* @return network this transmitter is using
|
|
|
|
*/
|
2013-08-27 01:04:00 +02:00
|
|
|
public N getTransmitterNetwork();
|
2013-08-18 22:51:47 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Gets the network currently in use by this transmitter segment.
|
|
|
|
* @param createIfNull - If true, the transmitter will try and connect to an
|
|
|
|
* adjacent network, merging several if necessary, or creating a new one
|
|
|
|
* if none is available
|
|
|
|
* @return network this transmitter is using
|
|
|
|
*/
|
2013-08-27 01:04:00 +02:00
|
|
|
public N getTransmitterNetwork(boolean createIfNull);
|
2013-08-18 22:51:47 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Sets this transmitter segment's network to a new value.
|
|
|
|
* @param network - network to set to
|
|
|
|
*/
|
2013-08-27 01:04:00 +02:00
|
|
|
public void setTransmitterNetwork(N network);
|
2013-08-18 22:51:47 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Refreshes the transmitter's network.
|
|
|
|
*/
|
2013-08-27 01:04:00 +02:00
|
|
|
public void refreshTransmitterNetwork();
|
2013-08-18 22:51:47 +02:00
|
|
|
|
2013-11-02 00:14:02 +01:00
|
|
|
/**
|
|
|
|
* Called when the chunk this transmitter is in is loaded.
|
|
|
|
*/
|
|
|
|
public void chunkLoad();
|
|
|
|
|
2013-08-18 22:51:47 +02:00
|
|
|
/**
|
|
|
|
* Remove this transmitter from its network.
|
|
|
|
*/
|
2013-08-27 01:04:00 +02:00
|
|
|
public void removeFromTransmitterNetwork();
|
2013-08-18 22:51:47 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Call this if you're worried a transmitter's network is messed up and you want
|
|
|
|
* it to try and fix itself.
|
|
|
|
*/
|
2013-08-27 01:04:00 +02:00
|
|
|
public void fixTransmitterNetwork();
|
2013-08-19 03:32:47 +02:00
|
|
|
|
2013-08-27 01:04:00 +02:00
|
|
|
public boolean areTransmitterNetworksEqual(TileEntity tileEntity);
|
2013-08-23 20:23:08 +02:00
|
|
|
|
2013-08-27 01:04:00 +02:00
|
|
|
public int getTransmitterNetworkSize();
|
2013-08-23 20:23:08 +02:00
|
|
|
|
2013-08-27 01:04:00 +02:00
|
|
|
public int getTransmitterNetworkAcceptorSize();
|
2013-08-23 20:23:08 +02:00
|
|
|
|
2013-08-27 01:04:00 +02:00
|
|
|
public String getTransmitterNetworkNeeded();
|
2013-08-23 20:23:08 +02:00
|
|
|
|
2013-08-27 01:04:00 +02:00
|
|
|
public String getTransmitterNetworkFlow();
|
2013-08-18 22:51:47 +02:00
|
|
|
}
|