mirror of
https://github.com/ViaVersion/ViaVersion.git
synced 2025-01-16 04:21:31 +01:00
Don't send place block twice (1.9 will use use_item to handle items), fixes #244 (may fix more)
This commit is contained in:
parent
9adf6040fa
commit
6c8ccb1b1e
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user