Added ISidedInv to alloy Smelter
This commit is contained in:
parent
f7e1c8e765
commit
3c10c0f08f
1 changed files with 22 additions and 1 deletions
|
@ -5,15 +5,17 @@ import ic2.api.energy.tile.IEnergyTile;
|
|||
import ic2.api.tile.IWrenchable;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.inventory.ISidedInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import techreborn.api.recipe.RecipeCrafter;
|
||||
import techreborn.init.ModBlocks;
|
||||
import techreborn.util.Inventory;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class TileAlloySmelter extends TileMachineBase implements IWrenchable, IEnergyTile, IInventory {
|
||||
public class TileAlloySmelter extends TileMachineBase implements IWrenchable, IEnergyTile, IInventory, ISidedInventory {
|
||||
|
||||
public int tickTime;
|
||||
public BasicSink energy;
|
||||
|
@ -173,4 +175,23 @@ public class TileAlloySmelter extends TileMachineBase implements IWrenchable, IE
|
|||
public boolean isItemValidForSlot(int slot, ItemStack stack) {
|
||||
return inventory.isItemValidForSlot(slot, stack);
|
||||
}
|
||||
|
||||
// IInventory
|
||||
@Override
|
||||
public int[] getAccessibleSlotsFromSide(int side)
|
||||
{
|
||||
return side == ForgeDirection.DOWN.ordinal() ? new int[]{0, 1} : new int[]{0, 1};
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInsertItem(int slotIndex, ItemStack itemStack, int side)
|
||||
{
|
||||
return isItemValidForSlot(slotIndex, itemStack);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canExtractItem(int slotIndex, ItemStack itemStack, int side)
|
||||
{
|
||||
return slotIndex == 2 || slotIndex == 2;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue