AE2 First Commit, the dawn of 1.7 hast arrived.
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
package appeng.core.sync;
|
||||
|
||||
import net.minecraft.network.INetworkManager;
|
||||
import net.minecraft.network.packet.Packet250CustomPayload;
|
||||
import appeng.core.Configuration;
|
||||
import cpw.mods.fml.common.network.Player;
|
||||
|
||||
public abstract class AppEngPacket
|
||||
{
|
||||
|
||||
private Packet250CustomPayload p;
|
||||
protected boolean isChunkDataPacket;
|
||||
|
||||
AppEngPacketHandlerBase.PacketTypes id;
|
||||
|
||||
final public int getPacketID()
|
||||
{
|
||||
return AppEngPacketHandlerBase.PacketTypes.getID( this.getClass() ).ordinal();
|
||||
}
|
||||
|
||||
public void serverPacketData(INetworkManager manager, AppEngPacket packet, Player player)
|
||||
{
|
||||
throw new RuntimeException( "This packet ( " + getPacketID() + " does not implement a server side handler." );
|
||||
}
|
||||
|
||||
public void clientPacketData(INetworkManager network, AppEngPacket packet, Player player)
|
||||
{
|
||||
throw new RuntimeException( "This packet ( " + getPacketID() + " does not implement a client side handler." );
|
||||
}
|
||||
|
||||
public Packet250CustomPayload getPacket()
|
||||
{
|
||||
// / += p.getPacketSize();
|
||||
return p;
|
||||
}
|
||||
|
||||
protected void configureWrite(byte[] par2ArrayOfByte)
|
||||
{
|
||||
p = new Packet250CustomPayload( Configuration.PACKET_CHANNEL, par2ArrayOfByte );
|
||||
p.isChunkDataPacket = isChunkDataPacket;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user