From 5a40749bcddacf8170c11b19b3c00db35d94521d Mon Sep 17 00:00:00 2001 From: modmuss50 Date: Fri, 22 Dec 2017 12:51:16 +0000 Subject: [PATCH] Fixed #1364 --- src/main/java/techreborn/items/ItemUpgrades.java | 2 +- .../java/techreborn/tiles/teir1/TileElectricFurnace.java | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main/java/techreborn/items/ItemUpgrades.java b/src/main/java/techreborn/items/ItemUpgrades.java index a3aa3ab21..c41764c88 100644 --- a/src/main/java/techreborn/items/ItemUpgrades.java +++ b/src/main/java/techreborn/items/ItemUpgrades.java @@ -183,7 +183,7 @@ public class ItemUpgrades extends ItemTR implements IUpgrade { IItemHandler itemHandler = tileEntity.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, dir.getOpposite()); for (int i = 0; i < itemHandler.getSlots(); i++) { ItemStack extractedStack = itemHandler.extractItem(i, 1, true); - int amount = InventoryHelper.testInventoryInsertion(machineBase, extractedStack, null); + int amount = InventoryHelper.testInventoryInsertion(machineBase, extractedStack, dir.getOpposite()); if (amount > 0) { extractedStack = itemHandler.extractItem(i, 1, false); extractedStack.setCount(1); diff --git a/src/main/java/techreborn/tiles/teir1/TileElectricFurnace.java b/src/main/java/techreborn/tiles/teir1/TileElectricFurnace.java index 8205fdce2..76734c671 100644 --- a/src/main/java/techreborn/tiles/teir1/TileElectricFurnace.java +++ b/src/main/java/techreborn/tiles/teir1/TileElectricFurnace.java @@ -27,9 +27,11 @@ package techreborn.tiles.teir1; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.ISidedInventory; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.FurnaceRecipes; import net.minecraft.util.EnumFacing; +import org.apache.commons.lang3.ArrayUtils; import reborncore.api.IToolDrop; import reborncore.api.tile.IInventoryProvider; import reborncore.common.blocks.BlockMachineBase; @@ -42,7 +44,7 @@ import techreborn.client.container.builder.ContainerBuilder; import techreborn.init.ModBlocks; public class TileElectricFurnace extends TilePowerAcceptor - implements IToolDrop, IInventoryProvider, IContainerProvider, IMachineSlotProvider { + implements IToolDrop, IInventoryProvider, IContainerProvider, IMachineSlotProvider, ISidedInventory { public Inventory inventory = new Inventory(3, "TileElectricFurnace", 64, this); public int capacity = 1000; @@ -172,6 +174,9 @@ public class TileElectricFurnace extends TilePowerAcceptor return new int[] { 0 }; else if (side.equals(EnumFacing.DOWN)) return new int[] { 1 }; + else if (ArrayUtils.contains(EnumFacing.HORIZONTALS, side)){ + return new int[]{0}; + } return new int[0]; }