Fixed #1364
This commit is contained in:
parent
623983f20a
commit
5a40749bcd
2 changed files with 7 additions and 2 deletions
|
@ -183,7 +183,7 @@ public class ItemUpgrades extends ItemTR implements IUpgrade {
|
||||||
IItemHandler itemHandler = tileEntity.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, dir.getOpposite());
|
IItemHandler itemHandler = tileEntity.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, dir.getOpposite());
|
||||||
for (int i = 0; i < itemHandler.getSlots(); i++) {
|
for (int i = 0; i < itemHandler.getSlots(); i++) {
|
||||||
ItemStack extractedStack = itemHandler.extractItem(i, 1, true);
|
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) {
|
if (amount > 0) {
|
||||||
extractedStack = itemHandler.extractItem(i, 1, false);
|
extractedStack = itemHandler.extractItem(i, 1, false);
|
||||||
extractedStack.setCount(1);
|
extractedStack.setCount(1);
|
||||||
|
|
|
@ -27,9 +27,11 @@ package techreborn.tiles.teir1;
|
||||||
import net.minecraft.block.state.IBlockState;
|
import net.minecraft.block.state.IBlockState;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.inventory.IInventory;
|
import net.minecraft.inventory.IInventory;
|
||||||
|
import net.minecraft.inventory.ISidedInventory;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.item.crafting.FurnaceRecipes;
|
import net.minecraft.item.crafting.FurnaceRecipes;
|
||||||
import net.minecraft.util.EnumFacing;
|
import net.minecraft.util.EnumFacing;
|
||||||
|
import org.apache.commons.lang3.ArrayUtils;
|
||||||
import reborncore.api.IToolDrop;
|
import reborncore.api.IToolDrop;
|
||||||
import reborncore.api.tile.IInventoryProvider;
|
import reborncore.api.tile.IInventoryProvider;
|
||||||
import reborncore.common.blocks.BlockMachineBase;
|
import reborncore.common.blocks.BlockMachineBase;
|
||||||
|
@ -42,7 +44,7 @@ import techreborn.client.container.builder.ContainerBuilder;
|
||||||
import techreborn.init.ModBlocks;
|
import techreborn.init.ModBlocks;
|
||||||
|
|
||||||
public class TileElectricFurnace extends TilePowerAcceptor
|
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 Inventory inventory = new Inventory(3, "TileElectricFurnace", 64, this);
|
||||||
public int capacity = 1000;
|
public int capacity = 1000;
|
||||||
|
@ -172,6 +174,9 @@ public class TileElectricFurnace extends TilePowerAcceptor
|
||||||
return new int[] { 0 };
|
return new int[] { 0 };
|
||||||
else if (side.equals(EnumFacing.DOWN))
|
else if (side.equals(EnumFacing.DOWN))
|
||||||
return new int[] { 1 };
|
return new int[] { 1 };
|
||||||
|
else if (ArrayUtils.contains(EnumFacing.HORIZONTALS, side)){
|
||||||
|
return new int[]{0};
|
||||||
|
}
|
||||||
return new int[0];
|
return new int[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue