3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-09-17 01:23:43 +02:00

Don't send place block twice (1.9 will use use_item to handle items), fixes #244 (may fix more)

Dieser Commit ist enthalten in:
Myles 2016-03-23 13:37:45 +00:00
Ursprung 9adf6040fa
Commit 6c8ccb1b1e

Datei anzeigen

@ -35,6 +35,7 @@ public class IncomingTransformer {
if (packet.getPacketID() != -1) {
packetID = packet.getPacketID();
}
if (plugin.isDebug()) {
if (packet != PacketType.PLAY_PLAYER_POSITION_LOOK_REQUEST && packet != PacketType.PLAY_KEEP_ALIVE_REQUEST && packet != PacketType.PLAY_PLAYER_POSITION_REQUEST && packet != PacketType.PLAY_PLAYER_LOOK_REQUEST) {
System.out.println("Direction " + packet.getDirection().name() + " Packet Type: " + packet + " New ID: " + packetID + " Original: " + original + " Size: " + input.readableBytes());
@ -293,6 +294,12 @@ public class IncomingTransformer {
} catch (Exception e) {
e.printStackTrace();
}
// Check item
if (inHand != null) {
if (!inHand.getType().isBlock()) {
throw new CancelException();
}
}
short curX = input.readUnsignedByte();
output.writeByte(curX);
short curY = input.readUnsignedByte();