mirror of
https://github.com/songoda/EpicHoppers.git
synced 2024-11-10 04:31:28 +01:00
BlockBreak default additions, whitelist fix
This commit is contained in:
parent
28025434fb
commit
1475ff9467
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user