Replaced ints with shorts in liquid packet

This commit is contained in:
CovertJaguar 2012-11-27 03:55:20 -08:00
parent 4db1a27d4f
commit 8a36fbda50
2 changed files with 20 additions and 22 deletions

View file

@ -1,8 +1,18 @@
package buildcraft.transport.network;
import buildcraft.core.network.PacketCoordinates;
import buildcraft.core.network.PacketIds;
import buildcraft.core.network.PacketSlotChange;
import buildcraft.core.network.PacketUpdate;
import buildcraft.transport.PipeTransportItems;
import buildcraft.transport.PipeTransportPower;
import buildcraft.transport.TileGenericPipe;
import buildcraft.transport.gui.ContainerGateInterface;
import buildcraft.transport.pipes.PipeLogicDiamond;
import cpw.mods.fml.common.network.IPacketHandler;
import cpw.mods.fml.common.network.Player;
import java.io.ByteArrayInputStream;
import java.io.DataInputStream;
import net.minecraft.src.Container;
import net.minecraft.src.EntityPlayer;
import net.minecraft.src.EntityPlayerMP;
@ -10,18 +20,6 @@ import net.minecraft.src.INetworkManager;
import net.minecraft.src.Packet250CustomPayload;
import net.minecraft.src.TileEntity;
import net.minecraft.src.World;
import buildcraft.core.network.PacketCoordinates;
import buildcraft.core.network.PacketIds;
import buildcraft.core.network.PacketSlotChange;
import buildcraft.core.network.PacketUpdate;
import buildcraft.transport.PipeTransportItems;
import buildcraft.transport.PipeTransportLiquids;
import buildcraft.transport.PipeTransportPower;
import buildcraft.transport.TileGenericPipe;
import buildcraft.transport.gui.ContainerGateInterface;
import buildcraft.transport.pipes.PipeLogicDiamond;
import cpw.mods.fml.common.network.IPacketHandler;
import cpw.mods.fml.common.network.Player;
public class PacketHandlerTransport implements IPacketHandler {

View file

@ -64,13 +64,13 @@ public class PacketLiquidUpdate extends PacketCoordinates {
}
if (delta.get(dir.ordinal() * 3 + 0)) {
renderCache[dir.ordinal()].itemID = data.readInt();
renderCache[dir.ordinal()].itemID = data.readShort();
}
if (delta.get(dir.ordinal() * 3 + 1)) {
renderCache[dir.ordinal()].itemMeta = data.readInt();
renderCache[dir.ordinal()].itemMeta = data.readShort();
}
if (delta.get(dir.ordinal() * 3 + 2)) {
renderCache[dir.ordinal()].amount = data.readInt();
renderCache[dir.ordinal()].amount = data.readShort();
}
}
}
@ -88,23 +88,23 @@ public class PacketLiquidUpdate extends PacketCoordinates {
if (delta.get(dir.ordinal() * 3 + 0)) {
if (liquid != null) {
data.writeInt(liquid.itemID);
data.writeShort(liquid.itemID);
} else {
data.writeInt(0);
data.writeShort(0);
}
}
if (delta.get(dir.ordinal() * 3 + 1)) {
if (liquid != null) {
data.writeInt(liquid.itemMeta);
data.writeShort(liquid.itemMeta);
} else {
data.writeInt(0);
data.writeShort(0);
}
}
if (delta.get(dir.ordinal() * 3 + 2)) {
if (liquid != null) {
data.writeInt(liquid.amount);
data.writeShort(liquid.amount);
} else {
data.writeInt(0);
data.writeShort(0);
}
}
}