Ported to 1.7

This commit is contained in:
AlgorithmX2
2014-02-08 19:34:52 -06:00
parent 30c1deb8cf
commit d50c7f6312
328 changed files with 2209 additions and 2311 deletions
+11 -13
View File
@@ -1,15 +1,15 @@
package appeng.core.sync;
import io.netty.buffer.ByteBuf;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.network.INetworkManager;
import net.minecraft.network.packet.Packet250CustomPayload;
import appeng.core.Configuration;
import appeng.core.sync.network.INetworkInfo;
import appeng.core.sync.network.NetworkHandler;
import cpw.mods.fml.common.network.internal.FMLProxyPacket;
public abstract class AppEngPacket
{
private Packet250CustomPayload p;
protected boolean isChunkDataPacket;
private ByteBuf p;
AppEngPacketHandlerBase.PacketTypes id;
@@ -18,26 +18,24 @@ public abstract class AppEngPacket
return AppEngPacketHandlerBase.PacketTypes.getID( this.getClass() ).ordinal();
}
public void serverPacketData(INetworkManager manager, AppEngPacket packet, EntityPlayer player)
public void serverPacketData(INetworkInfo manager, AppEngPacket packet, EntityPlayer player)
{
throw new RuntimeException( "This packet ( " + getPacketID() + " does not implement a server side handler." );
}
public void clientPacketData(INetworkManager network, AppEngPacket packet, EntityPlayer player)
public void clientPacketData(INetworkInfo network, AppEngPacket packet, EntityPlayer player)
{
throw new RuntimeException( "This packet ( " + getPacketID() + " does not implement a client side handler." );
}
public Packet250CustomPayload getPacket()
protected void configureWrite(ByteBuf data)
{
// / += p.getPacketSize();
return p;
p = data;
}
protected void configureWrite(byte[] par2ArrayOfByte)
public FMLProxyPacket getProxy()
{
p = new Packet250CustomPayload( Configuration.PACKET_CHANNEL, par2ArrayOfByte );
p.isChunkDataPacket = isChunkDataPacket;
return new FMLProxyPacket( p, NetworkHandler.instance.getChannel() );
}
}