Shorter packet channel, Robit packets now work
This commit is contained in:
parent
1b1853c8f6
commit
09e2be5833
3 changed files with 5 additions and 3 deletions
|
@ -78,7 +78,7 @@ import cpw.mods.fml.relauncher.SideOnly;
|
|||
*
|
||||
*/
|
||||
@Mod(modid = "Mekanism", name = "Mekanism", version = "5.5.6")
|
||||
@NetworkMod(channels = {"Mekanism"}, clientSideRequired = true, serverSideRequired = false, packetHandler = PacketHandler.class)
|
||||
@NetworkMod(channels = {"MEK"}, clientSideRequired = true, serverSideRequired = false, packetHandler = PacketHandler.class)
|
||||
public class Mekanism
|
||||
{
|
||||
/** Mekanism logger instance */
|
||||
|
|
|
@ -34,7 +34,7 @@ public class PacketHandler implements IPacketHandler
|
|||
ByteArrayDataInput dataStream = ByteStreams.newDataInput(packet.data);
|
||||
EntityPlayer entityplayer = (EntityPlayer)player;
|
||||
|
||||
if(packet.channel.equals("Mekanism"))
|
||||
if(packet.channel.equals("MEK"))
|
||||
{
|
||||
try {
|
||||
int packetIndex = dataStream.readInt();
|
||||
|
@ -165,7 +165,7 @@ public class PacketHandler implements IPacketHandler
|
|||
}
|
||||
|
||||
Packet250CustomPayload packet = new Packet250CustomPayload();
|
||||
packet.channel = "Mekanism";
|
||||
packet.channel = "MEK";
|
||||
packet.data = bytes.toByteArray();
|
||||
packet.length = packet.data.length;
|
||||
|
||||
|
|
|
@ -44,6 +44,8 @@ public class PacketRobit implements IMekanismPacket
|
|||
}
|
||||
}
|
||||
|
||||
public PacketRobit() {}
|
||||
|
||||
@Override
|
||||
public String getName()
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue