3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-12-25 15:50:10 +01:00

Merge branches 'dev' and 'master' of https://github.com/MylesIsCool/ViaVersion into dev

Dieser Commit ist enthalten in:
Matsv 2017-06-01 21:47:37 +02:00
Commit 079f8df6e0
2 geänderte Dateien mit 14 neuen und 10 gelöschten Zeilen

Datei anzeigen

@ -306,10 +306,10 @@ public class WorldPackets {
Item item = Protocol1_9TO1_8.getHandItem(wrapper.user());
// Blocking patch
if (Via.getConfig().isShieldBlocking()) {
if (item != null) {
if (Protocol1_9TO1_8.isSword(item.getId())) {
if (hand == 0) {
EntityTracker tracker = wrapper.user().get(EntityTracker.class);
if (item != null && Protocol1_9TO1_8.isSword(item.getId())) {
if (hand == 0) {
if (!tracker.isBlocking()) {
tracker.setBlocking(true);
Item shield = new Item((short) 442, (byte) 1, (short) 0, null);
@ -317,7 +317,9 @@ public class WorldPackets {
}
wrapper.cancel();
}
}
} else {
tracker.setSecondHand(null);
tracker.setBlocking(false);
}
}
wrapper.write(Type.ITEM, item);

Datei anzeigen

@ -162,6 +162,8 @@ public class EntityTracker extends StoredObject {
if (validBlocking.contains(entityID)) {
Item shield = new Item((short) 442, (byte) 1, (short) 0, null);
setSecondHand(entityID, shield);
} else {
setSecondHand(entityID, null);
}
} else {
setSecondHand(entityID, null);