Fix block predicate parsing
This commit is contained in:
parent
bf11a0a7de
commit
b6489b8343
|
@ -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(']');
|
||||||
|
|
Loading…
Reference in New Issue