3
0
Mirror von https://github.com/ViaVersion/ViaBackwards.git synchronisiert 2024-07-27 01:18:04 +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) {
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
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
protocol.out(State.PLAY, 0x0A, 0x0A, new PacketRemapper() {
@Override
@ -867,7 +867,6 @@ public class BlockItemPackets1_13 extends BlockItemRewriter<Protocol1_12_2To1_13
@Override
protected Item handleItemToServer(Item item) {
item = super.handleItemToServer(item);
if (item == null) return null;
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.setData((short) 0);
item = super.handleItemToServer(item);
return item;
}