From 175606f320bad1513b1452b7b56a7b90f4417122 Mon Sep 17 00:00:00 2001 From: Myles Date: Sun, 20 Mar 2016 16:40:03 +0000 Subject: [PATCH 1/2] Version bump --- README.md | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 434339da3..f9a13602c 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# ViaVersion 0.6.6 +# ViaVersion 0.6.7 [![Build Status](https://travis-ci.org/MylesIsCool/ViaVersion.svg?branch=master)](https://travis-ci.org/MylesIsCool/ViaVersion) **Allows the connection of 1.9 clients to 1.8** diff --git a/pom.xml b/pom.xml index dc4cbd873..2be236da3 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ us.myles viaversion - 0.6.7-SNAPSHOT + 0.6.8-SNAPSHOT jar ViaVersion From 57931e7231215a473edea1f88bc2614b7b7645d5 Mon Sep 17 00:00:00 2001 From: Myles Date: Mon, 21 Mar 2016 22:28:11 +0000 Subject: [PATCH 2/2] Patch inventory shield bug --- .../transformers/IncomingTransformer.java | 28 +++++++++++++------ 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/src/main/java/us/myles/ViaVersion/transformers/IncomingTransformer.java b/src/main/java/us/myles/ViaVersion/transformers/IncomingTransformer.java index 3a91b088c..75acf3441 100644 --- a/src/main/java/us/myles/ViaVersion/transformers/IncomingTransformer.java +++ b/src/main/java/us/myles/ViaVersion/transformers/IncomingTransformer.java @@ -45,7 +45,7 @@ public class IncomingTransformer { } // Handle movement increment // Update idle status (player, position, look, positionandlook) - if(packet == PacketType.PLAY_PLAYER || packet == PacketType.PLAY_PLAYER_POSITION_REQUEST || packet == PacketType.PLAY_PLAYER_LOOK_REQUEST || packet == PacketType.PLAY_PLAYER_POSITION_LOOK_REQUEST) { + if (packet == PacketType.PLAY_PLAYER || packet == PacketType.PLAY_PLAYER_POSITION_REQUEST || packet == PacketType.PLAY_PLAYER_LOOK_REQUEST || packet == PacketType.PLAY_PLAYER_POSITION_LOOK_REQUEST) { info.incrementIdlePacket(); } PacketUtil.writeVarInt(packetID, output); @@ -163,6 +163,18 @@ public class IncomingTransformer { if (packet == PacketType.PLAY_CLOSE_WINDOW_REQUEST) { info.closeWindow(); } + if (packet == PacketType.PLAY_CLIENT_STATUS) { + int action = PacketUtil.readVarInt(input); + PacketUtil.writeVarInt(action, input); + + if (action == 2) { + // cancel any blocking >.> + if (startedBlocking) { + sendSecondHandItem(null); + startedBlocking = false; + } + } + } if (packet == PacketType.PLAY_CLIENT_SETTINGS) { String locale = PacketUtil.readString(input); PacketUtil.writeString(locale, output); @@ -281,13 +293,13 @@ public class IncomingTransformer { } catch (Exception e) { e.printStackTrace(); } - short curX = input.readUnsignedByte(); - output.writeByte(curX); - short curY = input.readUnsignedByte(); - output.writeByte(curY); - short curZ = input.readUnsignedByte(); - output.writeByte(curZ); - return; + short curX = input.readUnsignedByte(); + output.writeByte(curX); + short curY = input.readUnsignedByte(); + output.writeByte(curY); + short curZ = input.readUnsignedByte(); + output.writeByte(curZ); + return; } if (packet == PacketType.PLAY_USE_ITEM) { int hand = PacketUtil.readVarInt(input);