ca3018b5b7
*Fixed incorrect repo location. *Formatting. *Fixed minor bugs in Metallurgic Infuser. *Fixed unobtainable machines.
34 lines
903 B
Java
34 lines
903 B
Java
package mekanism.api;
|
|
|
|
import net.minecraft.entity.player.EntityPlayer;
|
|
import net.minecraft.network.INetworkManager;
|
|
import net.minecraft.network.packet.Packet250CustomPayload;
|
|
|
|
import com.google.common.io.ByteArrayDataInput;
|
|
|
|
/**
|
|
* Implement this in your TileEntity class if you plan to have your machine send and receive packets. Send packets sparingly!
|
|
* @author AidanBrady
|
|
*
|
|
*/
|
|
public interface ITileNetwork
|
|
{
|
|
/**
|
|
* Called when a networked machine receives a packet.
|
|
* @param network
|
|
* @param packet
|
|
* @param player
|
|
* @param dataStream
|
|
*/
|
|
public void handlePacketData(INetworkManager network, Packet250CustomPayload packet, EntityPlayer player, ByteArrayDataInput dataStream);
|
|
|
|
/**
|
|
* Sends a tile entity packet to the server.
|
|
*/
|
|
public void sendPacket();
|
|
|
|
/**
|
|
* Sends a tile entity packet to the server with a defined range.
|
|
*/
|
|
public void sendPacketWithRange();
|
|
}
|