BlockBreak default additions, whitelist fix

This commit is contained in:
Esophose 2019-06-01 10:23:44 -06:00
parent 28025434fb
commit 1475ff9467
2 changed files with 3 additions and 3 deletions

View File

@ -258,14 +258,14 @@ public class HopTask extends BukkitRunnable {
itemToMove.setAmount(amountToMove);
// Process whitelist and blacklist.
boolean blocked = (!hopper.getFilter().getWhiteList().isEmpty() && hopper.getFilter().getWhiteList().stream().noneMatch(itemStack -> itemStack.isSimilar(item))
boolean blocked = (!hopper.getFilter().getWhiteList().isEmpty() && hopper.getFilter().getWhiteList().stream().anyMatch(itemStack -> itemStack.isSimilar(item))
|| hopper.getFilter().getBlackList().stream().anyMatch(itemStack -> itemStack.isSimilar(item)));
// If blocked check to see if a movement can be made if blacklist skip to the next slot
// otherwise set the current destination to the endpoint.
if (blocked) {
if (filterEndpoint == null || !this.canMove(filterEndpoint.getInventory(), itemToMove))
break;
continue;
currentDestination = filterEndpoint;
}

View File

@ -50,7 +50,7 @@ public enum Setting {
BLOCKBREAK_PARTICLE("Main.BlockBreak Particle Type", "LAVA",
"The particle shown when the block break module performs a block break."),
BLACKLIST("Main.BlockBreak Blacklisted Blocks", Arrays.asList("BEDROCK"), "" +
BLACKLIST("Main.BlockBreak Blacklisted Blocks", Arrays.asList("BEDROCK", "END_PORTAL", "ENDER_PORTAL", "END_PORTAL_FRAME", "ENDER_PORTAL_FRAME", "PISTON_HEAD", "PISTON_EXTENSION"),
"Anything listed here will not be broken by the block break module."),
AUTOSELL_PRICES("Main.AutoSell Prices",