Fixed some GUIS and some Mass Fabs
This commit is contained in:
parent
9ea37a0799
commit
78e8acce7b
18 changed files with 655 additions and 720 deletions
|
@ -1,8 +1,8 @@
|
|||
package techreborn.tiles;
|
||||
|
||||
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.minecraft.util.EnumFacing;
|
||||
|
@ -13,9 +13,8 @@ import reborncore.common.util.Inventory;
|
|||
import reborncore.common.util.ItemUtils;
|
||||
import techreborn.init.ModBlocks;
|
||||
import techreborn.init.ModItems;
|
||||
import ic2.api.tile.IWrenchable;
|
||||
|
||||
public class TileMatterFabricator extends TilePowerAcceptor implements IWrenchable, IInventory, ISidedInventory
|
||||
public class TileMatterFabricator extends TilePowerAcceptor implements IWrenchable, IInventory
|
||||
{
|
||||
|
||||
public static int fabricationRate = 2666656;
|
||||
|
@ -185,26 +184,26 @@ public class TileMatterFabricator extends TilePowerAcceptor implements IWrenchab
|
|||
return inventory.isItemValidForSlot(slot, stack);
|
||||
}
|
||||
|
||||
// ISidedInventory
|
||||
@Override
|
||||
public int[] getSlotsForFace(EnumFacing side)
|
||||
{
|
||||
return side == EnumFacing.DOWN ? new int[] { 0, 1, 2, 3, 4, 5, 6 } : new int[] { 0, 1, 2, 3, 4, 5, 6 };
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInsertItem(int slotIndex, ItemStack itemStack, EnumFacing side)
|
||||
{
|
||||
if (slotIndex == 6)
|
||||
return false;
|
||||
return isItemValidForSlot(slotIndex, itemStack);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canExtractItem(int slotIndex, ItemStack itemStack, EnumFacing side)
|
||||
{
|
||||
return slotIndex == 6;
|
||||
}
|
||||
// // ISidedInventory
|
||||
// @Override
|
||||
// public int[] getSlotsForFace(EnumFacing side)
|
||||
// {
|
||||
// return side == EnumFacing.DOWN ? new int[] { 0, 1, 2, 3, 4, 5, 6 } : new int[] { 0, 1, 2, 3, 4, 5, 6 };
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public boolean canInsertItem(int slotIndex, ItemStack itemStack, EnumFacing side)
|
||||
// {
|
||||
// if (slotIndex == 6)
|
||||
// return false;
|
||||
// return isItemValidForSlot(slotIndex, itemStack);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public boolean canExtractItem(int slotIndex, ItemStack itemStack, EnumFacing side)
|
||||
// {
|
||||
// return slotIndex == 6;
|
||||
// }
|
||||
|
||||
public int maxProgresstime()
|
||||
{
|
||||
|
|
|
@ -2,9 +2,11 @@ package techreborn.tiles.storage;
|
|||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import reborncore.api.power.EnumPowerTier;
|
||||
import reborncore.common.powerSystem.TilePowerAcceptor;
|
||||
import reborncore.common.util.Inventory;
|
||||
import techreborn.init.ModBlocks;
|
||||
import ic2.api.tile.IWrenchable;
|
||||
|
||||
|
@ -14,6 +16,7 @@ import ic2.api.tile.IWrenchable;
|
|||
public class TileBatBox extends TilePowerAcceptor implements IWrenchable
|
||||
{
|
||||
|
||||
public Inventory inventory = new Inventory(2, "TileBatBox", 64, this);
|
||||
public TileBatBox()
|
||||
{
|
||||
super(1);
|
||||
|
@ -93,4 +96,16 @@ public class TileBatBox extends TilePowerAcceptor implements IWrenchable
|
|||
{
|
||||
return EnumPowerTier.LOW;
|
||||
}
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound tagCompound)
|
||||
{
|
||||
super.writeToNBT(tagCompound);
|
||||
inventory.writeToNBT(tagCompound);
|
||||
}
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound nbttagcompound)
|
||||
{
|
||||
super.readFromNBT(nbttagcompound);
|
||||
inventory.readFromNBT(nbttagcompound);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue