Fix block predicate parsing

This commit is contained in:
Nassim Jahnke 2024-03-14 20:42:11 +01:00
parent bf11a0a7de
commit b6489b8343
No known key found for this signature in database
GPG Key ID: EF6771C01F6EF02F
1 changed files with 2 additions and 2 deletions

View File

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