blob: 74a35f4ce948f9adf93c2b5043e4d4b5b55e8c94 [file] [log] [blame] [raw]
package obsidian.api;
import net.minecraft.src.EntityPlayer;
import net.minecraft.src.INetworkManager;
import net.minecraft.src.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();
}