3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-11-19 14:30:16 +01:00

Fix block predicate parsing

Dieser Commit ist enthalten in:
Nassim Jahnke 2024-03-14 20:42:11 +01:00
Ursprung bf11a0a7de
Commit b6489b8343
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: EF6771C01F6EF02F

Datei anzeigen

@ -446,7 +446,7 @@ public final class BlockItemPacketRewriter1_20_5 extends ItemRewriter<Clientboun
final String identifier = rawPredicate.substring(0, idLength); final String identifier = rawPredicate.substring(0, idLength);
final HolderSet holders; final HolderSet holders;
if (identifier.startsWith("#")) { if (!identifier.startsWith("#")) {
final int id = Protocol1_20_5To1_20_3.MAPPINGS.blockId(identifier); final int id = Protocol1_20_5To1_20_3.MAPPINGS.blockId(identifier);
if (id == -1) { if (id == -1) {
return null; return null;
@ -454,7 +454,7 @@ public final class BlockItemPacketRewriter1_20_5 extends ItemRewriter<Clientboun
holders = new HolderSet(new int[]{Protocol1_20_5To1_20_3.MAPPINGS.getNewBlockId(id)}); holders = new HolderSet(new int[]{Protocol1_20_5To1_20_3.MAPPINGS.getNewBlockId(id)});
} else { } else {
holders = new HolderSet(identifier); holders = new HolderSet(identifier.substring(1));
} }
final int propertiesEndIndex = rawPredicate.indexOf(']'); final int propertiesEndIndex = rawPredicate.indexOf(']');