mirror of
https://github.com/songoda/EpicHoppers.git
synced 2025-01-22 07:31:30 +01:00
Added comparator update for the suction module.
This commit is contained in:
parent
fdb3c0a8d0
commit
f08a3be0ee
@ -3,6 +3,7 @@ package com.songoda.epichoppers.hopper.levels.modules;
|
||||
import com.bgsoftware.wildstacker.api.WildStackerAPI;
|
||||
import com.songoda.epichoppers.EpicHoppers;
|
||||
import com.songoda.epichoppers.hopper.Hopper;
|
||||
import com.songoda.epichoppers.tasks.HopTask;
|
||||
import com.songoda.epichoppers.utils.ServerVersion;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.bukkit.Bukkit;
|
||||
@ -97,6 +98,7 @@ public class ModuleSuction implements Module {
|
||||
for (ItemStack is : hopperInventory.addItem(itemStack).values()) {
|
||||
entity.getWorld().dropItemNaturally(entity.getLocation(), is);
|
||||
}
|
||||
HopTask.updateAdjacentComparators(hopper.getLocation());
|
||||
entity.remove();
|
||||
});
|
||||
}
|
||||
@ -105,17 +107,14 @@ public class ModuleSuction implements Module {
|
||||
return blacklist.contains(uuid);
|
||||
}
|
||||
|
||||
|
||||
public ItemStack getGUIButton(Hopper hopper) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
public void runButtonPress(Player player, Hopper hopper) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
public List<Material> getBlockedItems(Hopper hopper) {
|
||||
return null;
|
||||
}
|
||||
|
@ -308,10 +308,10 @@ public class HopTask extends BukkitRunnable {
|
||||
return (InventoryHolder) state;
|
||||
}
|
||||
|
||||
private Class<?> clazzCraftWorld, clazzCraftBlock, clazzBlockPosition;
|
||||
private Method getHandle, updateAdjacentComparators, getNMSBlock;
|
||||
private static Class<?> clazzCraftWorld, clazzCraftBlock, clazzBlockPosition;
|
||||
private static Method getHandle, updateAdjacentComparators, getNMSBlock;
|
||||
|
||||
private void updateAdjacentComparators(Location location) {
|
||||
public static void updateAdjacentComparators(Location location) {
|
||||
try {
|
||||
// Cache reflection.
|
||||
if (clazzCraftWorld == null) {
|
||||
|
Loading…
Reference in New Issue
Block a user