3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-12-27 16:40:10 +01:00

Fix record handling due to no mappings

Fixes #3422
Dieser Commit ist enthalten in:
Nassim Jahnke 2023-09-16 13:28:15 +10:00
Ursprung 18c4f90cb0
Commit 4c34ced240
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: EF6771C01F6EF02F

Datei anzeigen

@ -151,9 +151,9 @@ public class BlockRewriter<C extends ClientboundPacketType> {
handler(wrapper -> { handler(wrapper -> {
int id = wrapper.get(Type.INT, 0); int id = wrapper.get(Type.INT, 0);
int data = wrapper.get(Type.INT, 1); int data = wrapper.get(Type.INT, 1);
if (id == playRecordId) { // Play record if (id == playRecordId && protocol.getMappingData().getItemMappings() != null) {
wrapper.set(Type.INT, 1, protocol.getMappingData().getNewItemId(data)); wrapper.set(Type.INT, 1, protocol.getMappingData().getNewItemId(data));
} else if (id == blockBreakId) { // Block break + block break sound } else if (id == blockBreakId && protocol.getMappingData().getBlockStateMappings() != null) {
wrapper.set(Type.INT, 1, protocol.getMappingData().getNewBlockStateId(data)); wrapper.set(Type.INT, 1, protocol.getMappingData().getNewBlockStateId(data));
} }
}); });