Mekanism-tilera-Edition/src/minecraft/mekanism/api/ITileNetwork.java

35 lines
903 B
Java
Raw Normal View History

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();
}