Skip to content
Permalink
Browse files

Fixed pulling from blast furnaces with pipes

  • Loading branch information
me4502 committed Jan 12, 2020
1 parent 8ee0d0a commit 01882612204c47f1ae9e0f0e86ed3024548e2c0f
Showing with 8 additions and 3 deletions.
  1. +8 −3 src/main/java/com/sk89q/craftbook/mechanics/pipe/Pipes.java
@@ -23,6 +23,7 @@
import com.sk89q.worldedit.world.block.BlockTypes;
import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.Tag;
import org.bukkit.block.Block;
import org.bukkit.block.BlockFace;
import org.bukkit.block.Dropper;
@@ -345,8 +346,12 @@ private void startPipe(Block block, List<ItemStack> items, boolean request) {
Piston p = (Piston) block.getBlockData();
Block fac = block.getRelative(p.getFacing());

if (fac.getType() == Material.CHEST || fac.getType() == Material.TRAPPED_CHEST || fac.getType() == Material.DROPPER || fac.getType() == Material.DISPENSER || fac.getType() == Material.HOPPER) {

if (fac.getType() == Material.CHEST
|| fac.getType() == Material.TRAPPED_CHEST
|| fac.getType() == Material.DROPPER
|| fac.getType() == Material.DISPENSER
|| fac.getType() == Material.HOPPER
|| Tag.SHULKER_BOXES.isTagged(fac.getType())) {
for (ItemStack stack : ((InventoryHolder) fac.getState()).getInventory().getContents()) {

if (!ItemUtil.isStackValid(stack))
@@ -376,7 +381,7 @@ private void startPipe(Block block, List<ItemStack> items, boolean request) {
leftovers.addAll(((InventoryHolder) fac.getState()).getInventory().addItem(item).values());
}
}
} else if (fac.getType() == Material.FURNACE) {
} else if (fac.getType() == Material.FURNACE || fac.getType() == Material.BLAST_FURNACE) {

Furnace f = (Furnace) fac.getState();
if(!ItemUtil.doesItemPassFilters(f.getInventory().getResult(), filters, exceptions))

0 comments on commit 0188261

Please sign in to comment.
You can’t perform that action at this time.