3
0
Mirror von https://github.com/ViaVersion/ViaBackwards.git synchronisiert 2024-09-07 21:32:52 +02:00

Merge pull request #102 from creeper123123321/dev

1.13: Fix sound underflow + tag name conflict + when rewriting of item nbt should occur
Dieser Commit ist enthalten in:
Myles 2019-04-11 15:39:16 +01:00 committet von GitHub
Commit 86c1a035f6
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23
2 geänderte Dateien mit 3 neuen und 3 gelöschten Zeilen

Datei anzeigen

@ -39,6 +39,6 @@ public class SoundMapping {
} }
public static int getOldSound(int newSound) { public static int getOldSound(int newSound) {
return newSound >= sounds.length ? -1 : sounds[newSound]; return newSound < 0 || newSound >= sounds.length ? -1 : sounds[newSound];
} }
} }

Datei anzeigen

@ -76,7 +76,7 @@ public class BlockItemPackets1_13 extends BlockItemRewriter<Protocol1_12_2To1_13
@Override @Override
protected void registerPackets(Protocol1_12_2To1_13 protocol) { protected void registerPackets(Protocol1_12_2To1_13 protocol) {
NBT_TAG_NAME = "ViaBackwards|" + protocol.getClass().getSimpleName(); NBT_TAG_NAME = "ViaBackwards|" + protocol.getClass().getSimpleName() + "|Part2";
// Block Action // Block Action
protocol.out(State.PLAY, 0x0A, 0x0A, new PacketRemapper() { protocol.out(State.PLAY, 0x0A, 0x0A, new PacketRemapper() {
@Override @Override
@ -867,7 +867,6 @@ public class BlockItemPackets1_13 extends BlockItemRewriter<Protocol1_12_2To1_13
@Override @Override
protected Item handleItemToServer(Item item) { protected Item handleItemToServer(Item item) {
item = super.handleItemToServer(item);
if (item == null) return null; if (item == null) return null;
CompoundTag tag = item.getTag(); CompoundTag tag = item.getTag();
@ -1095,6 +1094,7 @@ public class BlockItemPackets1_13 extends BlockItemRewriter<Protocol1_12_2To1_13
item.setId(MappingData.oldToNewItems.get(rawId).shortValue()); item.setId(MappingData.oldToNewItems.get(rawId).shortValue());
item.setData((short) 0); item.setData((short) 0);
item = super.handleItemToServer(item);
return item; return item;
} }