Fix record handling due to no mappings

Fixes #3422
This commit is contained in:
Nassim Jahnke 2023-09-16 13:28:15 +10:00
parent 18c4f90cb0
commit 4c34ced240
No known key found for this signature in database
GPG Key ID: EF6771C01F6EF02F

View File

@ -151,9 +151,9 @@ public class BlockRewriter<C extends ClientboundPacketType> {
handler(wrapper -> {
int id = wrapper.get(Type.INT, 0);
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));
} 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));
}
});