mirror of
https://github.com/songoda/EpicHoppers.git
synced 2024-09-13 00:18:12 +02:00
Removed the auto remove dead hopper feature.
This commit is contained in:
parent
8434a5f711
commit
1cf407026b
@ -58,8 +58,6 @@ public class HopTask extends BukkitRunnable {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
Set<Location> toRemove = new HashSet<>();
|
||||
|
||||
for (final com.songoda.epichoppers.hopper.Hopper hopper : plugin.getHopperManager().getHoppers().values()) {
|
||||
|
||||
try {
|
||||
@ -74,10 +72,8 @@ public class HopTask extends BukkitRunnable {
|
||||
Block block = location.getBlock();
|
||||
|
||||
// If block is not a hopper remove and continue.
|
||||
if (block.getType() != Material.HOPPER) {
|
||||
toRemove.add(location);
|
||||
if (block.getType() != Material.HOPPER)
|
||||
continue;
|
||||
}
|
||||
|
||||
// If hopper block is powered, update its redstone state and continue.
|
||||
if (block.getBlockPower() > 0) {
|
||||
@ -185,14 +181,6 @@ public class HopTask extends BukkitRunnable {
|
||||
|
||||
// push out inventory changes
|
||||
StorageContainerCache.update();
|
||||
|
||||
// Clear out invalid hoppers
|
||||
HopperManager hopperManager = plugin.getHopperManager();
|
||||
toRemove.forEach(h -> {
|
||||
com.songoda.epichoppers.hopper.Hopper
|
||||
hopper = hopperManager.removeHopper(h);
|
||||
plugin.getDataManager().deleteHopper(hopper);
|
||||
});
|
||||
}
|
||||
|
||||
private void debt(ItemStack item, int amountToMove, InventoryHolder currentHolder) {
|
||||
|
Loading…
Reference in New Issue
Block a user