don't allocate tons of empty lists

This commit is contained in:
ZacSharp 2021-03-09 12:31:02 +01:00
parent 61e0525ee8
commit 67d9ae881f
No known key found for this signature in database
GPG Key ID: 9453647B005083A3

View File

@ -802,7 +802,7 @@ public final class BuilderProcess extends BaritoneProcessHelper implements IBuil
if (Baritone.settings().buildSkipBlocks.value.contains(desired.getBlock()) && !itemVerify) {
return true;
}
if (Baritone.settings().buildValidSubstitutes.value.getOrDefault(desired.getBlock(), Arrays.asList()).contains(current.getBlock()) && !itemVerify) {
if (Baritone.settings().buildValidSubstitutes.value.getOrDefault(desired.getBlock(), Collections.emptyList()).contains(current.getBlock()) && !itemVerify) {
return true;
}
return current.equals(desired);