fixed missing packet ids transmission
This commit is contained in:
parent
8f7f8d31ad
commit
ef400b1d92
3 changed files with 4 additions and 10 deletions
|
@ -18,9 +18,7 @@ public class PacketCoordinates extends BuildCraftPacket {
|
|||
}
|
||||
|
||||
public PacketCoordinates(int id, int x, int y, int z) {
|
||||
|
||||
this.id = id;
|
||||
|
||||
this.posX = x;
|
||||
this.posY = y;
|
||||
this.posZ = z;
|
||||
|
@ -28,7 +26,7 @@ public class PacketCoordinates extends BuildCraftPacket {
|
|||
|
||||
@Override
|
||||
public void writeData(ByteBuf data) {
|
||||
|
||||
data.writeByte(id);
|
||||
data.writeInt(posX);
|
||||
data.writeInt(posY);
|
||||
data.writeInt(posZ);
|
||||
|
@ -36,16 +34,14 @@ public class PacketCoordinates extends BuildCraftPacket {
|
|||
|
||||
@Override
|
||||
public void readData(ByteBuf data) {
|
||||
|
||||
id = data.readByte ();
|
||||
posX = data.readInt();
|
||||
posY = data.readInt();
|
||||
posZ = data.readInt();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getID() {
|
||||
return id;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -23,7 +23,6 @@ public class PacketNBT extends PacketCoordinates {
|
|||
|
||||
@Override
|
||||
public void writeData(ByteBuf data) {
|
||||
|
||||
super.writeData(data);
|
||||
|
||||
try {
|
||||
|
@ -38,7 +37,6 @@ public class PacketNBT extends PacketCoordinates {
|
|||
|
||||
@Override
|
||||
public void readData(ByteBuf data) {
|
||||
|
||||
super.readData(data);
|
||||
|
||||
short length = data.readShort();
|
||||
|
|
|
@ -21,9 +21,9 @@ public class PacketPowerUpdate extends PacketCoordinates {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void readData(ByteBuf data) {
|
||||
displayPower = new short[] { 0, 0, 0, 0, 0, 0 };
|
||||
public void readData(ByteBuf data) {
|
||||
super.readData(data);
|
||||
displayPower = new short[] { 0, 0, 0, 0, 0, 0 };
|
||||
overload = data.readBoolean();
|
||||
for (int i = 0; i < displayPower.length; i++) {
|
||||
displayPower[i] = data.readByte();
|
||||
|
|
Loading…
Add table
Reference in a new issue