fix #400
This commit is contained in:
parent
f6cf4af59b
commit
cf79af662b
1 changed files with 10 additions and 2 deletions
|
@ -81,11 +81,19 @@ public class HexConfig {
|
|||
|
||||
// Simple extensions for resource location configs
|
||||
public static boolean anyMatch(List<? extends String> keys, ResourceLocation key) {
|
||||
return keys.stream().map(ResourceLocation::new).anyMatch(key::equals);
|
||||
for (String s : keys) {
|
||||
if (ResourceLocation.isValidResourceLocation(s)) {
|
||||
var rl = new ResourceLocation(s);
|
||||
if (rl.equals(key)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean noneMatch(List<? extends String> keys, ResourceLocation key) {
|
||||
return keys.stream().map(ResourceLocation::new).noneMatch(key::equals);
|
||||
return !anyMatch(keys, key);
|
||||
}
|
||||
|
||||
public static boolean anyMatchResLoc(List<? extends ResourceLocation> keys, ResourceLocation key) {
|
||||
|
|
Loading…
Reference in a new issue