mirror of
https://github.com/songoda/EpicHoppers.git
synced 2025-02-02 04:51:25 +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.bgsoftware.wildstacker.api.WildStackerAPI;
|
||||||
import com.songoda.epichoppers.EpicHoppers;
|
import com.songoda.epichoppers.EpicHoppers;
|
||||||
import com.songoda.epichoppers.hopper.Hopper;
|
import com.songoda.epichoppers.hopper.Hopper;
|
||||||
|
import com.songoda.epichoppers.tasks.HopTask;
|
||||||
import com.songoda.epichoppers.utils.ServerVersion;
|
import com.songoda.epichoppers.utils.ServerVersion;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
@ -97,6 +98,7 @@ public class ModuleSuction implements Module {
|
|||||||
for (ItemStack is : hopperInventory.addItem(itemStack).values()) {
|
for (ItemStack is : hopperInventory.addItem(itemStack).values()) {
|
||||||
entity.getWorld().dropItemNaturally(entity.getLocation(), is);
|
entity.getWorld().dropItemNaturally(entity.getLocation(), is);
|
||||||
}
|
}
|
||||||
|
HopTask.updateAdjacentComparators(hopper.getLocation());
|
||||||
entity.remove();
|
entity.remove();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -105,17 +107,14 @@ public class ModuleSuction implements Module {
|
|||||||
return blacklist.contains(uuid);
|
return blacklist.contains(uuid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public ItemStack getGUIButton(Hopper hopper) {
|
public ItemStack getGUIButton(Hopper hopper) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void runButtonPress(Player player, Hopper hopper) {
|
public void runButtonPress(Player player, Hopper hopper) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public List<Material> getBlockedItems(Hopper hopper) {
|
public List<Material> getBlockedItems(Hopper hopper) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -308,10 +308,10 @@ public class HopTask extends BukkitRunnable {
|
|||||||
return (InventoryHolder) state;
|
return (InventoryHolder) state;
|
||||||
}
|
}
|
||||||
|
|
||||||
private Class<?> clazzCraftWorld, clazzCraftBlock, clazzBlockPosition;
|
private static Class<?> clazzCraftWorld, clazzCraftBlock, clazzBlockPosition;
|
||||||
private Method getHandle, updateAdjacentComparators, getNMSBlock;
|
private static Method getHandle, updateAdjacentComparators, getNMSBlock;
|
||||||
|
|
||||||
private void updateAdjacentComparators(Location location) {
|
public static void updateAdjacentComparators(Location location) {
|
||||||
try {
|
try {
|
||||||
// Cache reflection.
|
// Cache reflection.
|
||||||
if (clazzCraftWorld == null) {
|
if (clazzCraftWorld == null) {
|
||||||
|
Loading…
Reference in New Issue
Block a user