-
-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
hey you have a .tolowercase call on one side of a check but not the other which causes things to fail. string pattern=orString.tolower BUT NOT when final String itemName = in the following function which i believe is the cause of an error im seeing where stuff is randomly not matched in random situations
private boolean canItemPassHopper(final String hopperName, final ItemStack item) {
if (hopperName == null) return true;
nextCondition: for (final String condition : hopperName.split(",")) {
nextAnd: for (final String andString : condition.split("&")) {
for (final String orString : andString.split("\\|")) {
final String pattern = orString.toLowerCase().strip();
if (canItemPassPattern(pattern, item)) continue nextAnd;
}
continue nextCondition;
}
return true;
}
return false;
}
private boolean canItemPassPattern(final String pattern, final ItemStack item) {
final String itemName = item.getType().getKey().getKey();
Metadata
Metadata
Assignees
Labels
No labels