AE2 First Commit, the dawn of 1.7 hast arrived.

This commit is contained in:
algorithmx2
2013-12-27 16:59:59 -06:00
commit e9acdcbee2
468 changed files with 47440 additions and 0 deletions
+43
View File
@@ -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;
}
}