Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-12-26 16:12:42 +01:00
Fix shields not being configurable
Dieser Commit ist enthalten in:
Ursprung
0992c74351
Commit
d72b7fc4df
@ -241,17 +241,19 @@ public class WorldPackets {
|
|||||||
// Write item in hand
|
// Write item in hand
|
||||||
Item item = Item.getItem(Protocol1_9TO1_8.getHandItem(wrapper.user()));
|
Item item = Item.getItem(Protocol1_9TO1_8.getHandItem(wrapper.user()));
|
||||||
// Blocking patch
|
// Blocking patch
|
||||||
if (item != null) {
|
if (ViaVersion.getConfig().isShieldBlocking()) {
|
||||||
if (Material.getMaterial(item.getId()) != null) {
|
if (item != null) {
|
||||||
if (Material.getMaterial(item.getId()).name().endsWith("SWORD")) {
|
if (Material.getMaterial(item.getId()) != null) {
|
||||||
if (hand == 0) {
|
if (Material.getMaterial(item.getId()).name().endsWith("SWORD")) {
|
||||||
EntityTracker tracker = wrapper.user().get(EntityTracker.class);
|
if (hand == 0) {
|
||||||
if (!tracker.isBlocking()) {
|
EntityTracker tracker = wrapper.user().get(EntityTracker.class);
|
||||||
tracker.setBlocking(true);
|
if (!tracker.isBlocking()) {
|
||||||
Item shield = new Item((short) 442, (byte) 1, (short) 0, null);
|
tracker.setBlocking(true);
|
||||||
tracker.setSecondHand(shield);
|
Item shield = new Item((short) 442, (byte) 1, (short) 0, null);
|
||||||
|
tracker.setSecondHand(shield);
|
||||||
|
}
|
||||||
|
wrapper.cancel();
|
||||||
}
|
}
|
||||||
wrapper.cancel();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren