Work on the new container stuff
This commit is contained in:
parent
98d459735f
commit
23d55e6251
45 changed files with 274 additions and 236 deletions
|
@ -3,9 +3,10 @@ package techreborn.api.gui;
|
|||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import reborncore.client.gui.BaseSlot;
|
||||
import techreborn.utils.upgrade.IMachineUpgrade;
|
||||
|
||||
public class SlotUpgrade extends Slot {
|
||||
public class SlotUpgrade extends BaseSlot {
|
||||
|
||||
public SlotUpgrade(IInventory inventoryIn, int index, int xPosition, int yPosition) {
|
||||
super(inventoryIn, index, xPosition, yPosition);
|
||||
|
|
|
@ -4,6 +4,9 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.common.network.IGuiHandler;
|
||||
import reborncore.api.tile.IContainerLayout;
|
||||
import reborncore.api.tile.IContainerProvider;
|
||||
import reborncore.common.container.RebornContainer;
|
||||
import techreborn.client.container.*;
|
||||
import techreborn.client.gui.*;
|
||||
import techreborn.manual.GuiManual;
|
||||
|
@ -62,6 +65,7 @@ public class GuiHandler implements IGuiHandler
|
|||
@Override
|
||||
public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z)
|
||||
{
|
||||
RebornContainer container = null;
|
||||
if (ID == thermalGeneratorID)
|
||||
{
|
||||
return new ContainerThermalGenerator((TileThermalGenerator) world.getTileEntity(new BlockPos(x, y, z)),
|
||||
|
@ -159,7 +163,7 @@ public class GuiHandler implements IGuiHandler
|
|||
return new ContainerVacuumFreezer((TileVacuumFreezer) world.getTileEntity(new BlockPos(x, y, z)), player);
|
||||
} else if (ID == grinderID)
|
||||
{
|
||||
return new ContainerGrinder((TileGrinder) world.getTileEntity(new BlockPos(x, y, z)), player);
|
||||
container = new ContainerGrinder();
|
||||
} else if (ID == generatorID)
|
||||
{
|
||||
return new ContainerGenerator((TileGenerator) world.getTileEntity(new BlockPos(x, y, z)), player);
|
||||
|
@ -190,6 +194,16 @@ public class GuiHandler implements IGuiHandler
|
|||
}else if (ID == mfeID){
|
||||
return new ContainerMFE((TileMFE) world.getTileEntity(new BlockPos(x, y, z)), player);
|
||||
}
|
||||
if(container != null){
|
||||
if(container instanceof IContainerLayout){
|
||||
IContainerLayout layout = (IContainerLayout) container;
|
||||
layout.setTile(world.getTileEntity(new BlockPos(x, y, z)));
|
||||
layout.setPlayer(player);
|
||||
layout.addInventorySlots();
|
||||
layout.addPlayerSlots();
|
||||
}
|
||||
return container;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ package techreborn.client.container;
|
|||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.ICrafting;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import reborncore.client.gui.BaseSlot;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import reborncore.common.container.RebornContainer;
|
||||
|
@ -24,12 +24,12 @@ public class ContainerAESU extends RebornContainer {
|
|||
|
||||
for (i = 0; i < 3; ++i) {
|
||||
for (int j = 0; j < 9; ++j) {
|
||||
this.addSlotToContainer(new Slot(player.inventory, j + i * 9 + 9, 8 + j * 18, 115 + i * 18));
|
||||
this.addSlotToContainer(new BaseSlot(player.inventory, j + i * 9 + 9, 8 + j * 18, 115 + i * 18));
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 9; ++i) {
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 173));
|
||||
this.addSlotToContainer(new BaseSlot(player.inventory, i, 8 + i * 18, 173));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ package techreborn.client.container;
|
|||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.ICrafting;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import reborncore.client.gui.BaseSlot;
|
||||
import net.minecraft.inventory.SlotFurnaceFuel;
|
||||
import reborncore.client.gui.SlotOutput;
|
||||
import reborncore.common.container.RebornContainer;
|
||||
|
@ -23,8 +23,8 @@ public class ContainerAlloyFurnace extends RebornContainer
|
|||
this.player = player;
|
||||
|
||||
// input
|
||||
this.addSlotToContainer(new Slot(tileAlloyfurnace.inventory, 0, 47, 17));
|
||||
this.addSlotToContainer(new Slot(tileAlloyfurnace.inventory, 1, 65, 17));
|
||||
this.addSlotToContainer(new BaseSlot(tileAlloyfurnace.inventory, 0, 47, 17));
|
||||
this.addSlotToContainer(new BaseSlot(tileAlloyfurnace.inventory, 1, 65, 17));
|
||||
// outputs
|
||||
this.addSlotToContainer(new SlotOutput(tileAlloyfurnace.inventory, 2, 116, 35));
|
||||
// Fuel
|
||||
|
@ -36,13 +36,13 @@ public class ContainerAlloyFurnace extends RebornContainer
|
|||
{
|
||||
for (int j = 0; j < 9; ++j)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
this.addSlotToContainer(new BaseSlot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 9; ++i)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 142));
|
||||
this.addSlotToContainer(new BaseSlot(player.inventory, i, 8 + i * 18, 142));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package techreborn.client.container;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import reborncore.client.gui.BaseSlot;
|
||||
import reborncore.client.gui.SlotOutput;
|
||||
import techreborn.api.gui.SlotUpgrade;
|
||||
import techreborn.tiles.TileAlloySmelter;
|
||||
|
@ -20,12 +20,12 @@ public class ContainerAlloySmelter extends ContainerCrafting
|
|||
this.player = player;
|
||||
|
||||
// input
|
||||
this.addSlotToContainer(new Slot(tileAlloysmelter.inventory, 0, 47, 17));
|
||||
this.addSlotToContainer(new Slot(tileAlloysmelter.inventory, 1, 65, 17));
|
||||
this.addSlotToContainer(new BaseSlot(tileAlloysmelter.inventory, 0, 47, 17));
|
||||
this.addSlotToContainer(new BaseSlot(tileAlloysmelter.inventory, 1, 65, 17));
|
||||
// outputs
|
||||
this.addSlotToContainer(new SlotOutput(tileAlloysmelter.inventory, 2, 116, 35));
|
||||
// battery
|
||||
this.addSlotToContainer(new Slot(tileAlloysmelter.inventory, 3, 56, 53));
|
||||
this.addSlotToContainer(new BaseSlot(tileAlloysmelter.inventory, 3, 56, 53));
|
||||
// upgrades
|
||||
this.addSlotToContainer(new SlotUpgrade(tileAlloysmelter.inventory, 4, 152, 8));
|
||||
this.addSlotToContainer(new SlotUpgrade(tileAlloysmelter.inventory, 5, 152, 26));
|
||||
|
@ -38,13 +38,13 @@ public class ContainerAlloySmelter extends ContainerCrafting
|
|||
{
|
||||
for (int j = 0; j < 9; ++j)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
this.addSlotToContainer(new BaseSlot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 9; ++i)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 142));
|
||||
this.addSlotToContainer(new BaseSlot(player.inventory, i, 8 + i * 18, 142));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package techreborn.client.container;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import reborncore.client.gui.BaseSlot;
|
||||
import reborncore.client.gui.SlotOutput;
|
||||
import techreborn.api.gui.SlotUpgrade;
|
||||
import techreborn.tiles.TileAssemblingMachine;
|
||||
|
@ -20,12 +20,12 @@ public class ContainerAssemblingMachine extends ContainerCrafting
|
|||
this.player = player;
|
||||
|
||||
// input
|
||||
this.addSlotToContainer(new Slot(tileAssemblingMachine.inventory, 0, 47, 17));
|
||||
this.addSlotToContainer(new Slot(tileAssemblingMachine.inventory, 1, 65, 17));
|
||||
this.addSlotToContainer(new BaseSlot(tileAssemblingMachine.inventory, 0, 47, 17));
|
||||
this.addSlotToContainer(new BaseSlot(tileAssemblingMachine.inventory, 1, 65, 17));
|
||||
// outputs
|
||||
this.addSlotToContainer(new SlotOutput(tileAssemblingMachine.inventory, 2, 116, 35));
|
||||
// power
|
||||
this.addSlotToContainer(new Slot(tileAssemblingMachine.inventory, 3, 56, 53));
|
||||
this.addSlotToContainer(new BaseSlot(tileAssemblingMachine.inventory, 3, 56, 53));
|
||||
// upgrades
|
||||
this.addSlotToContainer(new SlotUpgrade(tileAssemblingMachine.inventory, 4, 152, 8));
|
||||
this.addSlotToContainer(new SlotUpgrade(tileAssemblingMachine.inventory, 5, 152, 26));
|
||||
|
@ -38,13 +38,13 @@ public class ContainerAssemblingMachine extends ContainerCrafting
|
|||
{
|
||||
for (int j = 0; j < 9; ++j)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
this.addSlotToContainer(new BaseSlot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 9; ++i)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 142));
|
||||
this.addSlotToContainer(new BaseSlot(player.inventory, i, 8 + i * 18, 142));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ package techreborn.client.container;
|
|||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.ICrafting;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import reborncore.client.gui.BaseSlot;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import reborncore.client.gui.SlotCharge;
|
||||
|
@ -31,13 +31,13 @@ public class ContainerBatbox extends RebornContainer
|
|||
{
|
||||
for (int j = 0; j < 9; ++j)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
this.addSlotToContainer(new BaseSlot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 9; ++i)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 142));
|
||||
this.addSlotToContainer(new BaseSlot(player.inventory, i, 8 + i * 18, 142));
|
||||
}
|
||||
|
||||
this.addSlotToContainer(new SlotCharge(tile.inventory, 0, 80, 17));
|
||||
|
|
|
@ -2,7 +2,7 @@ package techreborn.client.container;
|
|||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.ICrafting;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import reborncore.client.gui.BaseSlot;
|
||||
import reborncore.client.gui.SlotOutput;
|
||||
import techreborn.tiles.TileBlastFurnace;
|
||||
|
||||
|
@ -21,9 +21,9 @@ public class ContainerBlastFurnace extends ContainerCrafting
|
|||
this.player = player;
|
||||
|
||||
// input
|
||||
this.addSlotToContainer(new Slot(tileblastfurnace.inventory, 0, 40, 25));// Input
|
||||
this.addSlotToContainer(new BaseSlot(tileblastfurnace.inventory, 0, 40, 25));// Input
|
||||
// 1
|
||||
this.addSlotToContainer(new Slot(tileblastfurnace.inventory, 1, 40, 43));// Input
|
||||
this.addSlotToContainer(new BaseSlot(tileblastfurnace.inventory, 1, 40, 43));// Input
|
||||
// 2
|
||||
// outputs
|
||||
this.addSlotToContainer(new SlotOutput(tileblastfurnace.inventory, 2, 100, 35));// Output
|
||||
|
@ -37,13 +37,13 @@ public class ContainerBlastFurnace extends ContainerCrafting
|
|||
{
|
||||
for (int j = 0; j < 9; ++j)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
this.addSlotToContainer(new BaseSlot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 9; ++i)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 142));
|
||||
this.addSlotToContainer(new BaseSlot(player.inventory, i, 8 + i * 18, 142));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package techreborn.client.container;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import reborncore.client.gui.BaseSlot;
|
||||
import reborncore.client.gui.SlotOutput;
|
||||
import techreborn.api.gui.SlotUpgrade;
|
||||
import techreborn.tiles.TileCentrifuge;
|
||||
|
@ -20,15 +20,15 @@ public class ContainerCentrifuge extends ContainerCrafting
|
|||
this.player = player;
|
||||
|
||||
// input
|
||||
this.addSlotToContainer(new Slot(tileCentrifuge.inventory, 0, 80, 35));
|
||||
this.addSlotToContainer(new Slot(tileCentrifuge.inventory, 1, 50, 5));
|
||||
this.addSlotToContainer(new BaseSlot(tileCentrifuge.inventory, 0, 80, 35));
|
||||
this.addSlotToContainer(new BaseSlot(tileCentrifuge.inventory, 1, 50, 5));
|
||||
// outputs
|
||||
this.addSlotToContainer(new SlotOutput(tileCentrifuge.inventory, 2, 80, 5));
|
||||
this.addSlotToContainer(new SlotOutput(tileCentrifuge.inventory, 3, 110, 35));
|
||||
this.addSlotToContainer(new SlotOutput(tileCentrifuge.inventory, 4, 80, 65));
|
||||
this.addSlotToContainer(new SlotOutput(tileCentrifuge.inventory, 5, 50, 35));
|
||||
// battery
|
||||
this.addSlotToContainer(new Slot(tileCentrifuge.inventory, 6, 8, 51));
|
||||
this.addSlotToContainer(new BaseSlot(tileCentrifuge.inventory, 6, 8, 51));
|
||||
// upgrades
|
||||
this.addSlotToContainer(new SlotUpgrade(tileCentrifuge.inventory, 7, 152, 8));
|
||||
this.addSlotToContainer(new SlotUpgrade(tileCentrifuge.inventory, 8, 152, 26));
|
||||
|
@ -41,13 +41,13 @@ public class ContainerCentrifuge extends ContainerCrafting
|
|||
{
|
||||
for (int j = 0; j < 9; ++j)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
this.addSlotToContainer(new BaseSlot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 9; ++i)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 142));
|
||||
this.addSlotToContainer(new BaseSlot(player.inventory, i, 8 + i * 18, 142));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
package techreborn.client.container;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Slot;
|
||||
//import reborncore.client.gui.BaseSlot;
|
||||
import reborncore.client.gui.BaseSlot;
|
||||
import reborncore.common.container.RebornContainer;
|
||||
import techreborn.tiles.TileChargeBench;
|
||||
|
||||
|
@ -17,12 +18,12 @@ public class ContainerChargeBench extends RebornContainer
|
|||
tile = tileChargeBench;
|
||||
this.player = player;
|
||||
|
||||
this.addSlotToContainer(new Slot(tileChargeBench.inventory, 0, 62, 21));
|
||||
this.addSlotToContainer(new Slot(tileChargeBench.inventory, 1, 80, 21));
|
||||
this.addSlotToContainer(new Slot(tileChargeBench.inventory, 2, 98, 21));
|
||||
this.addSlotToContainer(new Slot(tileChargeBench.inventory, 3, 62, 39));
|
||||
this.addSlotToContainer(new Slot(tileChargeBench.inventory, 4, 80, 39));
|
||||
this.addSlotToContainer(new Slot(tileChargeBench.inventory, 5, 98, 39));
|
||||
this.addSlotToContainer(new BaseSlot(tileChargeBench.inventory, 0, 62, 21));
|
||||
this.addSlotToContainer(new BaseSlot(tileChargeBench.inventory, 1, 80, 21));
|
||||
this.addSlotToContainer(new BaseSlot(tileChargeBench.inventory, 2, 98, 21));
|
||||
this.addSlotToContainer(new BaseSlot(tileChargeBench.inventory, 3, 62, 39));
|
||||
this.addSlotToContainer(new BaseSlot(tileChargeBench.inventory, 4, 80, 39));
|
||||
this.addSlotToContainer(new BaseSlot(tileChargeBench.inventory, 5, 98, 39));
|
||||
|
||||
int i;
|
||||
|
||||
|
@ -30,13 +31,13 @@ public class ContainerChargeBench extends RebornContainer
|
|||
{
|
||||
for (int j = 0; j < 9; ++j)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
this.addSlotToContainer(new BaseSlot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 9; ++i)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 142));
|
||||
this.addSlotToContainer(new BaseSlot(player.inventory, i, 8 + i * 18, 142));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package techreborn.client.container;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import reborncore.client.gui.BaseSlot;
|
||||
import reborncore.client.gui.SlotOutput;
|
||||
import techreborn.api.gui.SlotUpgrade;
|
||||
import techreborn.tiles.TileChemicalReactor;
|
||||
|
@ -20,12 +20,12 @@ public class ContainerChemicalReactor extends ContainerCrafting
|
|||
this.player = player;
|
||||
|
||||
// input
|
||||
this.addSlotToContainer(new Slot(tilechemicalReactor.inventory, 0, 70, 21));
|
||||
this.addSlotToContainer(new Slot(tilechemicalReactor.inventory, 1, 90, 21));
|
||||
this.addSlotToContainer(new BaseSlot(tilechemicalReactor.inventory, 0, 70, 21));
|
||||
this.addSlotToContainer(new BaseSlot(tilechemicalReactor.inventory, 1, 90, 21));
|
||||
// outputs
|
||||
this.addSlotToContainer(new SlotOutput(tilechemicalReactor.inventory, 2, 80, 51));
|
||||
// battery
|
||||
this.addSlotToContainer(new Slot(tilechemicalReactor.inventory, 3, 8, 51));
|
||||
this.addSlotToContainer(new BaseSlot(tilechemicalReactor.inventory, 3, 8, 51));
|
||||
// upgrades
|
||||
this.addSlotToContainer(new SlotUpgrade(tilechemicalReactor.inventory, 4, 152, 8));
|
||||
this.addSlotToContainer(new SlotUpgrade(tilechemicalReactor.inventory, 5, 152, 26));
|
||||
|
@ -38,13 +38,13 @@ public class ContainerChemicalReactor extends ContainerCrafting
|
|||
{
|
||||
for (int j = 0; j < 9; ++j)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
this.addSlotToContainer(new BaseSlot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 9; ++i)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 142));
|
||||
this.addSlotToContainer(new BaseSlot(player.inventory, i, 8 + i * 18, 142));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package techreborn.client.container;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import reborncore.client.gui.BaseSlot;
|
||||
import reborncore.common.container.RebornContainer;
|
||||
import techreborn.tiles.TileChunkLoader;
|
||||
|
||||
|
@ -20,13 +20,13 @@ public class ContainerChunkloader extends RebornContainer
|
|||
{
|
||||
for (int j = 0; j < 9; ++j)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
this.addSlotToContainer(new BaseSlot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 9; ++i)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 142));
|
||||
this.addSlotToContainer(new BaseSlot(player.inventory, i, 8 + i * 18, 142));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package techreborn.client.container;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import reborncore.client.gui.BaseSlot;
|
||||
import reborncore.client.gui.SlotOutput;
|
||||
import techreborn.api.gui.SlotUpgrade;
|
||||
import techreborn.tiles.teir1.TileCompressor;
|
||||
|
@ -20,7 +20,7 @@ public class ContainerCompressor extends ContainerCrafting
|
|||
this.player = player;
|
||||
|
||||
// input
|
||||
this.addSlotToContainer(new Slot(tileGrinder.inventory, 0, 56, 34));
|
||||
this.addSlotToContainer(new BaseSlot(tileGrinder.inventory, 0, 56, 34));
|
||||
this.addSlotToContainer(new SlotOutput(tileGrinder.inventory, 1, 116, 34));
|
||||
|
||||
// upgrades
|
||||
|
@ -35,13 +35,13 @@ public class ContainerCompressor extends ContainerCrafting
|
|||
{
|
||||
for (int j = 0; j < 9; ++j)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
this.addSlotToContainer(new BaseSlot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 9; ++i)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 142));
|
||||
this.addSlotToContainer(new BaseSlot(player.inventory, i, 8 + i * 18, 142));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@ package techreborn.client.container;
|
|||
import net.minecraft.inventory.ICrafting;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import reborncore.api.tile.IContainerLayout;
|
||||
import reborncore.common.container.RebornContainer;
|
||||
import reborncore.common.recipes.RecipeCrafter;
|
||||
|
||||
|
@ -15,8 +16,17 @@ public abstract class ContainerCrafting extends RebornContainer
|
|||
int currentNeededTicks = 0;
|
||||
int energy;
|
||||
|
||||
@Deprecated
|
||||
public ContainerCrafting(RecipeCrafter crafter)
|
||||
{
|
||||
this();
|
||||
this.crafter = crafter;
|
||||
}
|
||||
|
||||
public ContainerCrafting() {
|
||||
}
|
||||
|
||||
public void setCrafter(RecipeCrafter crafter) {
|
||||
this.crafter = crafter;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package techreborn.client.container;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import reborncore.client.gui.BaseSlot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import reborncore.client.gui.SlotFilteredVoid;
|
||||
import reborncore.common.container.RebornContainer;
|
||||
|
@ -37,13 +37,13 @@ public class ContainerDestructoPack extends RebornContainer
|
|||
{
|
||||
for (int j = 0; j < 9; ++j)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
this.addSlotToContainer(new BaseSlot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 9; ++i)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 142));
|
||||
this.addSlotToContainer(new BaseSlot(player.inventory, i, 8 + i * 18, 142));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ package techreborn.client.container;
|
|||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.ICrafting;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import reborncore.client.gui.BaseSlot;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import reborncore.client.gui.SlotFake;
|
||||
|
@ -23,7 +23,7 @@ public class ContainerDieselGenerator extends RebornContainer
|
|||
this.tiledieselGenerator = tiledieselGenerator;
|
||||
this.player = player;
|
||||
|
||||
this.addSlotToContainer(new Slot(tiledieselGenerator.inventory, 0, 80, 17));
|
||||
this.addSlotToContainer(new BaseSlot(tiledieselGenerator.inventory, 0, 80, 17));
|
||||
this.addSlotToContainer(new SlotOutput(tiledieselGenerator.inventory, 1, 80, 53));
|
||||
this.addSlotToContainer(new SlotFake(tiledieselGenerator.inventory, 2, 59, 42, false, false, 1));
|
||||
|
||||
|
@ -33,13 +33,13 @@ public class ContainerDieselGenerator extends RebornContainer
|
|||
{
|
||||
for (int j = 0; j < 9; ++j)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
this.addSlotToContainer(new BaseSlot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 9; ++i)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 142));
|
||||
this.addSlotToContainer(new BaseSlot(player.inventory, i, 8 + i * 18, 142));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package techreborn.client.container;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import reborncore.client.gui.BaseSlot;
|
||||
import reborncore.client.gui.SlotFake;
|
||||
import reborncore.client.gui.SlotOutput;
|
||||
import reborncore.common.container.RebornContainer;
|
||||
|
@ -18,7 +18,7 @@ public class ContainerDigitalChest extends RebornContainer
|
|||
this.tileDigitalChest = tileDigitalChest;
|
||||
this.player = player;
|
||||
|
||||
this.addSlotToContainer(new Slot(tileDigitalChest.inventory, 0, 80, 17));
|
||||
this.addSlotToContainer(new BaseSlot(tileDigitalChest.inventory, 0, 80, 17));
|
||||
this.addSlotToContainer(new SlotOutput(tileDigitalChest.inventory, 1, 80, 53));
|
||||
this.addSlotToContainer(new SlotFake(tileDigitalChest.inventory, 2, 59, 42, false, false, Integer.MAX_VALUE));
|
||||
|
||||
|
@ -28,13 +28,13 @@ public class ContainerDigitalChest extends RebornContainer
|
|||
{
|
||||
for (int j = 0; j < 9; ++j)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
this.addSlotToContainer(new BaseSlot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 9; ++i)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 142));
|
||||
this.addSlotToContainer(new BaseSlot(player.inventory, i, 8 + i * 18, 142));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package techreborn.client.container;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import reborncore.client.gui.BaseSlot;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import reborncore.client.gui.SlotOutput;
|
||||
|
@ -23,7 +23,7 @@ public class ContainerElectricFurnace extends RebornContainer
|
|||
this.player = player;
|
||||
|
||||
// input
|
||||
this.addSlotToContainer(new Slot(tileGrinder.inventory, 0, 56, 34));
|
||||
this.addSlotToContainer(new BaseSlot(tileGrinder.inventory, 0, 56, 34));
|
||||
this.addSlotToContainer(new SlotOutput(tileGrinder.inventory, 1, 116, 34));
|
||||
|
||||
// upgrades
|
||||
|
@ -38,13 +38,13 @@ public class ContainerElectricFurnace extends RebornContainer
|
|||
{
|
||||
for (int j = 0; j < 9; ++j)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
this.addSlotToContainer(new BaseSlot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 9; ++i)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 142));
|
||||
this.addSlotToContainer(new BaseSlot(player.inventory, i, 8 + i * 18, 142));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package techreborn.client.container;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import reborncore.client.gui.BaseSlot;
|
||||
import reborncore.client.gui.SlotOutput;
|
||||
import techreborn.api.gui.SlotUpgrade;
|
||||
import techreborn.tiles.teir1.TileExtractor;
|
||||
|
@ -20,7 +20,7 @@ public class ContainerExtractor extends ContainerCrafting
|
|||
this.player = player;
|
||||
|
||||
// input
|
||||
this.addSlotToContainer(new Slot(tileGrinder.inventory, 0, 56, 34));
|
||||
this.addSlotToContainer(new BaseSlot(tileGrinder.inventory, 0, 56, 34));
|
||||
this.addSlotToContainer(new SlotOutput(tileGrinder.inventory, 1, 116, 34));
|
||||
|
||||
// upgrades
|
||||
|
@ -35,13 +35,13 @@ public class ContainerExtractor extends ContainerCrafting
|
|||
{
|
||||
for (int j = 0; j < 9; ++j)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
this.addSlotToContainer(new BaseSlot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 9; ++i)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 142));
|
||||
this.addSlotToContainer(new BaseSlot(player.inventory, i, 8 + i * 18, 142));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ package techreborn.client.container;
|
|||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.ICrafting;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import reborncore.client.gui.BaseSlot;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import reborncore.client.gui.SlotOutput;
|
||||
|
@ -25,8 +25,8 @@ public class ContainerFusionReactor extends RebornContainer
|
|||
super();
|
||||
this.fusionController = tileEntityFusionController;
|
||||
|
||||
addSlotToContainer(new Slot(tileEntityFusionController, 0, 88, 17));
|
||||
addSlotToContainer(new Slot(tileEntityFusionController, 1, 88, 53));
|
||||
addSlotToContainer(new BaseSlot(tileEntityFusionController, 0, 88, 17));
|
||||
addSlotToContainer(new BaseSlot(tileEntityFusionController, 1, 88, 53));
|
||||
addSlotToContainer(new SlotOutput(tileEntityFusionController, 2, 148, 35));
|
||||
|
||||
int i;
|
||||
|
@ -35,13 +35,13 @@ public class ContainerFusionReactor extends RebornContainer
|
|||
{
|
||||
for (int j = 0; j < 9; ++j)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
this.addSlotToContainer(new BaseSlot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 9; ++i)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 142));
|
||||
this.addSlotToContainer(new BaseSlot(player.inventory, i, 8 + i * 18, 142));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package techreborn.client.container;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import reborncore.client.gui.BaseSlot;
|
||||
import reborncore.client.gui.SlotFake;
|
||||
import reborncore.client.gui.SlotOutput;
|
||||
import reborncore.common.container.RebornContainer;
|
||||
|
@ -18,7 +18,7 @@ public class ContainerGasTurbine extends RebornContainer
|
|||
this.tileGasTurbine = tileGasTurbine;
|
||||
this.player = player;
|
||||
|
||||
this.addSlotToContainer(new Slot(tileGasTurbine.inventory, 0, 80, 17));
|
||||
this.addSlotToContainer(new BaseSlot(tileGasTurbine.inventory, 0, 80, 17));
|
||||
this.addSlotToContainer(new SlotOutput(tileGasTurbine.inventory, 1, 80, 53));
|
||||
this.addSlotToContainer(new SlotFake(tileGasTurbine.inventory, 2, 59, 42, false, false, 1));
|
||||
|
||||
|
@ -28,13 +28,13 @@ public class ContainerGasTurbine extends RebornContainer
|
|||
{
|
||||
for (int j = 0; j < 9; ++j)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
this.addSlotToContainer(new BaseSlot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 9; ++i)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 142));
|
||||
this.addSlotToContainer(new BaseSlot(player.inventory, i, 8 + i * 18, 142));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ package techreborn.client.container;
|
|||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.ICrafting;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import reborncore.client.gui.BaseSlot;
|
||||
import net.minecraft.inventory.SlotFurnaceFuel;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
@ -37,13 +37,13 @@ public class ContainerGenerator extends RebornContainer
|
|||
{
|
||||
for (int j = 0; j < 9; ++j)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
this.addSlotToContainer(new BaseSlot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 9; ++i)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 142));
|
||||
this.addSlotToContainer(new BaseSlot(player.inventory, i, 8 + i * 18, 142));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,53 +1,90 @@
|
|||
package techreborn.client.container;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import reborncore.api.tile.IContainerLayout;
|
||||
import reborncore.client.gui.BaseSlot;
|
||||
import reborncore.client.gui.SlotInput;
|
||||
import reborncore.client.gui.SlotOutput;
|
||||
import reborncore.common.recipes.RecipeCrafter;
|
||||
import techreborn.api.gui.SlotUpgrade;
|
||||
import techreborn.tiles.teir1.TileGrinder;
|
||||
|
||||
public class ContainerGrinder extends ContainerCrafting
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.List;
|
||||
|
||||
public class ContainerGrinder extends ContainerCrafting implements IContainerLayout<TileGrinder>
|
||||
{
|
||||
|
||||
public int connectionStatus;
|
||||
EntityPlayer player;
|
||||
TileGrinder tile;
|
||||
|
||||
public ContainerGrinder(TileGrinder tileGrinder, EntityPlayer player)
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer p_75145_1_)
|
||||
{
|
||||
super(tileGrinder.crafter);
|
||||
tile = tileGrinder;
|
||||
this.player = player;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void addInventorySlots() {
|
||||
// input
|
||||
this.addSlotToContainer(new Slot(tileGrinder.inventory, 0, 56, 34));
|
||||
this.addSlotToContainer(new SlotOutput(tileGrinder.inventory, 1, 116, 34));
|
||||
this.addSlotToContainer(new SlotInput(tile.inventory, 0, 56, 34));
|
||||
this.addSlotToContainer(new SlotOutput(tile.inventory, 1, 116, 34));
|
||||
|
||||
// upgrades
|
||||
this.addSlotToContainer(new SlotUpgrade(tileGrinder.inventory, 2, 152, 8));
|
||||
this.addSlotToContainer(new SlotUpgrade(tileGrinder.inventory, 3, 152, 26));
|
||||
this.addSlotToContainer(new SlotUpgrade(tileGrinder.inventory, 4, 152, 44));
|
||||
this.addSlotToContainer(new SlotUpgrade(tileGrinder.inventory, 5, 152, 62));
|
||||
this.addSlotToContainer(new SlotUpgrade(tile.inventory, 2, 152, 8));
|
||||
this.addSlotToContainer(new SlotUpgrade(tile.inventory, 3, 152, 26));
|
||||
this.addSlotToContainer(new SlotUpgrade(tile.inventory, 4, 152, 44));
|
||||
this.addSlotToContainer(new SlotUpgrade(tile.inventory, 5, 152, 62));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addPlayerSlots() {
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 3; ++i)
|
||||
{
|
||||
for (int j = 0; j < 9; ++j)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
this.addSlotToContainer(new BaseSlot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 9; ++i)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 142));
|
||||
this.addSlotToContainer(new BaseSlot(player.inventory, i, 8 + i * 18, 142));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer p_75145_1_)
|
||||
{
|
||||
return true;
|
||||
public void setTile(TileGrinder tile) {
|
||||
this.tile = tile;
|
||||
setCrafter(tile.crafter);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public TileGrinder getTile() {
|
||||
return tile;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPlayer(EntityPlayer player) {
|
||||
this.player = player;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public EntityPlayer getPlayer() {
|
||||
return player;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public List<Integer> getSlotsForSide(EnumFacing facing) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ package techreborn.client.container;
|
|||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.ICrafting;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import reborncore.client.gui.BaseSlot;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import reborncore.common.container.RebornContainer;
|
||||
|
@ -25,12 +25,12 @@ public class ContainerIDSU extends RebornContainer {
|
|||
|
||||
for (i = 0; i < 3; ++i) {
|
||||
for (int j = 0; j < 9; ++j) {
|
||||
this.addSlotToContainer(new Slot(player.inventory, j + i * 9 + 9, 8 + j * 18, 115 + i * 18));
|
||||
this.addSlotToContainer(new BaseSlot(player.inventory, j + i * 9 + 9, 8 + j * 18, 115 + i * 18));
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 9; ++i) {
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 173));
|
||||
this.addSlotToContainer(new BaseSlot(player.inventory, i, 8 + i * 18, 173));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ package techreborn.client.container;
|
|||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.ICrafting;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import reborncore.client.gui.BaseSlot;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import reborncore.client.gui.SlotOutput;
|
||||
|
@ -23,8 +23,8 @@ public class ContainerImplosionCompressor extends ContainerCrafting
|
|||
this.player = player;
|
||||
|
||||
// input
|
||||
this.addSlotToContainer(new Slot(tilecompressor.inventory, 0, 37, 26));
|
||||
this.addSlotToContainer(new Slot(tilecompressor.inventory, 1, 37, 44));
|
||||
this.addSlotToContainer(new BaseSlot(tilecompressor.inventory, 0, 37, 26));
|
||||
this.addSlotToContainer(new BaseSlot(tilecompressor.inventory, 1, 37, 44));
|
||||
// outputs
|
||||
this.addSlotToContainer(new SlotOutput(tilecompressor.inventory, 2, 93, 35));
|
||||
this.addSlotToContainer(new SlotOutput(tilecompressor.inventory, 3, 111, 35));
|
||||
|
@ -35,13 +35,13 @@ public class ContainerImplosionCompressor extends ContainerCrafting
|
|||
{
|
||||
for (int j = 0; j < 9; ++j)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
this.addSlotToContainer(new BaseSlot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 9; ++i)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 142));
|
||||
this.addSlotToContainer(new BaseSlot(player.inventory, i, 8 + i * 18, 142));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package techreborn.client.container;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import reborncore.client.gui.BaseSlot;
|
||||
import reborncore.client.gui.SlotOutput;
|
||||
import techreborn.tiles.TileIndustrialElectrolyzer;
|
||||
|
||||
|
@ -19,8 +19,8 @@ public class ContainerIndustrialElectrolyzer extends ContainerCrafting
|
|||
this.player = player;
|
||||
|
||||
// input
|
||||
this.addSlotToContainer(new Slot(electrolyzer.inventory, 0, 80, 51));
|
||||
this.addSlotToContainer(new Slot(electrolyzer.inventory, 1, 50, 51));
|
||||
this.addSlotToContainer(new BaseSlot(electrolyzer.inventory, 0, 80, 51));
|
||||
this.addSlotToContainer(new BaseSlot(electrolyzer.inventory, 1, 50, 51));
|
||||
// outputs
|
||||
this.addSlotToContainer(new SlotOutput(electrolyzer.inventory, 2, 50, 19));
|
||||
this.addSlotToContainer(new SlotOutput(electrolyzer.inventory, 3, 70, 19));
|
||||
|
@ -28,20 +28,20 @@ public class ContainerIndustrialElectrolyzer extends ContainerCrafting
|
|||
this.addSlotToContainer(new SlotOutput(electrolyzer.inventory, 5, 110, 19));
|
||||
|
||||
// battery
|
||||
this.addSlotToContainer(new Slot(electrolyzer.inventory, 6, 18, 51));
|
||||
this.addSlotToContainer(new BaseSlot(electrolyzer.inventory, 6, 18, 51));
|
||||
|
||||
int i;
|
||||
for (i = 0; i < 3; ++i)
|
||||
{
|
||||
for (int j = 0; j < 9; ++j)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
this.addSlotToContainer(new BaseSlot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 9; ++i)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 142));
|
||||
this.addSlotToContainer(new BaseSlot(player.inventory, i, 8 + i * 18, 142));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ package techreborn.client.container;
|
|||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.ICrafting;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import reborncore.client.gui.BaseSlot;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import reborncore.client.gui.SlotOutput;
|
||||
|
@ -22,8 +22,8 @@ public class ContainerIndustrialGrinder extends ContainerCrafting
|
|||
this.player = player;
|
||||
|
||||
// input
|
||||
this.addSlotToContainer(new Slot(tileGrinder.inventory, 0, 32, 26));
|
||||
this.addSlotToContainer(new Slot(tileGrinder.inventory, 1, 32, 44));
|
||||
this.addSlotToContainer(new BaseSlot(tileGrinder.inventory, 0, 32, 26));
|
||||
this.addSlotToContainer(new BaseSlot(tileGrinder.inventory, 1, 32, 44));
|
||||
|
||||
// outputs
|
||||
this.addSlotToContainer(new SlotOutput(tileGrinder.inventory, 2, 77, 35));
|
||||
|
@ -37,13 +37,13 @@ public class ContainerIndustrialGrinder extends ContainerCrafting
|
|||
{
|
||||
for (int j = 0; j < 9; ++j)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
this.addSlotToContainer(new BaseSlot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 9; ++i)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 142));
|
||||
this.addSlotToContainer(new BaseSlot(player.inventory, i, 8 + i * 18, 142));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package techreborn.client.container;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import reborncore.client.gui.BaseSlot;
|
||||
import reborncore.client.gui.SlotOutput;
|
||||
import techreborn.tiles.TileIndustrialSawmill;
|
||||
|
||||
|
@ -19,8 +19,8 @@ public class ContainerIndustrialSawmill extends ContainerCrafting
|
|||
this.player = player;
|
||||
|
||||
// input
|
||||
this.addSlotToContainer(new Slot(tileIndustrialSawmill.inventory, 0, 32, 26));
|
||||
this.addSlotToContainer(new Slot(tileIndustrialSawmill.inventory, 1, 32, 44));
|
||||
this.addSlotToContainer(new BaseSlot(tileIndustrialSawmill.inventory, 0, 32, 26));
|
||||
this.addSlotToContainer(new BaseSlot(tileIndustrialSawmill.inventory, 1, 32, 44));
|
||||
// outputs
|
||||
this.addSlotToContainer(new SlotOutput(tileIndustrialSawmill.inventory, 2, 84, 35));
|
||||
this.addSlotToContainer(new SlotOutput(tileIndustrialSawmill.inventory, 3, 102, 35));
|
||||
|
@ -32,13 +32,13 @@ public class ContainerIndustrialSawmill extends ContainerCrafting
|
|||
{
|
||||
for (int j = 0; j < 9; ++j)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
this.addSlotToContainer(new BaseSlot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 9; ++i)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 142));
|
||||
this.addSlotToContainer(new BaseSlot(player.inventory, i, 8 + i * 18, 142));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package techreborn.client.container;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import reborncore.client.gui.BaseSlot;
|
||||
import net.minecraft.inventory.SlotFurnaceFuel;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
@ -23,7 +23,7 @@ public class ContainerIronFurnace extends RebornContainer
|
|||
this.player = player;
|
||||
|
||||
// input
|
||||
this.addSlotToContainer(new Slot(tileGrinder.inventory, 0, 56, 17));
|
||||
this.addSlotToContainer(new BaseSlot(tileGrinder.inventory, 0, 56, 17));
|
||||
this.addSlotToContainer(new SlotOutput(tileGrinder.inventory, 1, 116, 34));
|
||||
// Fuel
|
||||
this.addSlotToContainer(new SlotFurnaceFuel(tileGrinder.inventory, 2, 56, 53));
|
||||
|
@ -34,13 +34,13 @@ public class ContainerIronFurnace extends RebornContainer
|
|||
{
|
||||
for (int j = 0; j < 9; ++j)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
this.addSlotToContainer(new BaseSlot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 9; ++i)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 142));
|
||||
this.addSlotToContainer(new BaseSlot(player.inventory, i, 8 + i * 18, 142));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ package techreborn.client.container;
|
|||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.ICrafting;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import reborncore.client.gui.BaseSlot;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import reborncore.common.container.RebornContainer;
|
||||
|
@ -24,19 +24,19 @@ public class ContainerLESU extends RebornContainer {
|
|||
this.player = player;
|
||||
|
||||
// input
|
||||
this.addSlotToContainer(new Slot(tileaesu.inventory, 0, 116, 23));
|
||||
this.addSlotToContainer(new Slot(tileaesu.inventory, 1, 116, 59));
|
||||
this.addSlotToContainer(new BaseSlot(tileaesu.inventory, 0, 116, 23));
|
||||
this.addSlotToContainer(new BaseSlot(tileaesu.inventory, 1, 116, 59));
|
||||
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 3; ++i) {
|
||||
for (int j = 0; j < 9; ++j) {
|
||||
this.addSlotToContainer(new Slot(player.inventory, j + i * 9 + 9, 8 + j * 18, 115 + i * 18));
|
||||
this.addSlotToContainer(new BaseSlot(player.inventory, j + i * 9 + 9, 8 + j * 18, 115 + i * 18));
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 9; ++i) {
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 173));
|
||||
this.addSlotToContainer(new BaseSlot(player.inventory, i, 8 + i * 18, 173));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ package techreborn.client.container;
|
|||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.EntityEquipmentSlot;
|
||||
import net.minecraft.inventory.ICrafting;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import reborncore.client.gui.BaseSlot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
@ -38,18 +38,18 @@ public class ContainerMFE extends RebornContainer
|
|||
{
|
||||
for (int j = 0; j < 9; ++j)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
this.addSlotToContainer(new BaseSlot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 9; ++i)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 142));
|
||||
this.addSlotToContainer(new BaseSlot(player.inventory, i, 8 + i * 18, 142));
|
||||
}
|
||||
for (int k = 0; k < 4; k++)
|
||||
{
|
||||
final EntityEquipmentSlot slot = equipmentSlots[k];
|
||||
addSlotToContainer(new Slot(player.inventory, player.inventory.getSizeInventory() - 2 - k, 44, 6 + k * 19)
|
||||
addSlotToContainer(new BaseSlot(player.inventory, player.inventory.getSizeInventory() - 2 - k, 44, 6 + k * 19)
|
||||
{
|
||||
@Override
|
||||
public int getSlotStackLimit() { return 1; }
|
||||
|
|
|
@ -3,7 +3,7 @@ package techreborn.client.container;
|
|||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.EntityEquipmentSlot;
|
||||
import net.minecraft.inventory.ICrafting;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import reborncore.client.gui.BaseSlot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
@ -33,18 +33,18 @@ public class ContainerMFSU extends RebornContainer
|
|||
{
|
||||
for (int j = 0; j < 9; ++j)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
this.addSlotToContainer(new BaseSlot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 9; ++i)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 142));
|
||||
this.addSlotToContainer(new BaseSlot(player.inventory, i, 8 + i * 18, 142));
|
||||
}
|
||||
for (int k = 0; k < 4; k++)
|
||||
{
|
||||
final EntityEquipmentSlot slot = equipmentSlots[k];
|
||||
addSlotToContainer(new Slot(player.inventory, player.inventory.getSizeInventory() - 2 - k, 44, 6 + k * 19)
|
||||
addSlotToContainer(new BaseSlot(player.inventory, player.inventory.getSizeInventory() - 2 - k, 44, 6 + k * 19)
|
||||
{
|
||||
@Override
|
||||
public int getSlotStackLimit() { return 1; }
|
||||
|
|
|
@ -2,7 +2,7 @@ package techreborn.client.container;
|
|||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.ICrafting;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import reborncore.client.gui.BaseSlot;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import reborncore.client.gui.SlotOutput;
|
||||
|
@ -22,12 +22,12 @@ public class ContainerMatterFabricator extends RebornContainer
|
|||
this.player = player;
|
||||
|
||||
// input
|
||||
this.addSlotToContainer(new Slot(tileMatterfab.inventory, 0, 33, 17));
|
||||
this.addSlotToContainer(new Slot(tileMatterfab.inventory, 1, 33, 35));
|
||||
this.addSlotToContainer(new Slot(tileMatterfab.inventory, 2, 33, 53));
|
||||
this.addSlotToContainer(new Slot(tileMatterfab.inventory, 3, 51, 17));
|
||||
this.addSlotToContainer(new Slot(tileMatterfab.inventory, 4, 51, 35));
|
||||
this.addSlotToContainer(new Slot(tileMatterfab.inventory, 5, 51, 53));
|
||||
this.addSlotToContainer(new BaseSlot(tileMatterfab.inventory, 0, 33, 17));
|
||||
this.addSlotToContainer(new BaseSlot(tileMatterfab.inventory, 1, 33, 35));
|
||||
this.addSlotToContainer(new BaseSlot(tileMatterfab.inventory, 2, 33, 53));
|
||||
this.addSlotToContainer(new BaseSlot(tileMatterfab.inventory, 3, 51, 17));
|
||||
this.addSlotToContainer(new BaseSlot(tileMatterfab.inventory, 4, 51, 35));
|
||||
this.addSlotToContainer(new BaseSlot(tileMatterfab.inventory, 5, 51, 53));
|
||||
|
||||
// outputs
|
||||
this.addSlotToContainer(new SlotOutput(tileMatterfab.inventory, 6, 116, 35));
|
||||
|
@ -38,13 +38,13 @@ public class ContainerMatterFabricator extends RebornContainer
|
|||
{
|
||||
for (int j = 0; j < 9; ++j)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
this.addSlotToContainer(new BaseSlot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 9; ++i)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 142));
|
||||
this.addSlotToContainer(new BaseSlot(player.inventory, i, 8 + i * 18, 142));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package techreborn.client.container;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import reborncore.client.gui.BaseSlot;
|
||||
import reborncore.client.gui.SlotFake;
|
||||
import reborncore.client.gui.SlotOutput;
|
||||
import reborncore.common.container.RebornContainer;
|
||||
|
@ -18,7 +18,7 @@ public class ContainerQuantumChest extends RebornContainer
|
|||
this.tileQuantumChest = tileQuantumChest;
|
||||
this.player = player;
|
||||
|
||||
this.addSlotToContainer(new Slot(tileQuantumChest.inventory, 0, 80, 17));
|
||||
this.addSlotToContainer(new BaseSlot(tileQuantumChest.inventory, 0, 80, 17));
|
||||
this.addSlotToContainer(new SlotOutput(tileQuantumChest.inventory, 1, 80, 53));
|
||||
this.addSlotToContainer(new SlotFake(tileQuantumChest.inventory, 2, 59, 42, false, false, Integer.MAX_VALUE));
|
||||
|
||||
|
@ -28,13 +28,13 @@ public class ContainerQuantumChest extends RebornContainer
|
|||
{
|
||||
for (int j = 0; j < 9; ++j)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
this.addSlotToContainer(new BaseSlot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 9; ++i)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 142));
|
||||
this.addSlotToContainer(new BaseSlot(player.inventory, i, 8 + i * 18, 142));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package techreborn.client.container;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import reborncore.client.gui.BaseSlot;
|
||||
import reborncore.client.gui.SlotFake;
|
||||
import reborncore.client.gui.SlotFluid;
|
||||
import reborncore.client.gui.SlotOutput;
|
||||
|
@ -29,13 +29,13 @@ public class ContainerQuantumTank extends RebornContainer
|
|||
{
|
||||
for (int j = 0; j < 9; ++j)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
this.addSlotToContainer(new BaseSlot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 9; ++i)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 142));
|
||||
this.addSlotToContainer(new BaseSlot(player.inventory, i, 8 + i * 18, 142));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package techreborn.client.container;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import reborncore.client.gui.BaseSlot;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import reborncore.client.gui.SlotOutput;
|
||||
|
@ -23,7 +23,7 @@ public class ContainerRecycler extends RebornContainer
|
|||
this.player = player;
|
||||
|
||||
// input
|
||||
this.addSlotToContainer(new Slot(tileGrinder.inventory, 0, 56, 34));
|
||||
this.addSlotToContainer(new BaseSlot(tileGrinder.inventory, 0, 56, 34));
|
||||
this.addSlotToContainer(new SlotOutput(tileGrinder.inventory, 1, 116, 34));
|
||||
|
||||
// upgrades
|
||||
|
@ -38,13 +38,13 @@ public class ContainerRecycler extends RebornContainer
|
|||
{
|
||||
for (int j = 0; j < 9; ++j)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
this.addSlotToContainer(new BaseSlot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 9; ++i)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 142));
|
||||
this.addSlotToContainer(new BaseSlot(player.inventory, i, 8 + i * 18, 142));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ package techreborn.client.container;
|
|||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.ICrafting;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import reborncore.client.gui.BaseSlot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import reborncore.client.gui.SlotOutput;
|
||||
import reborncore.common.container.RebornContainer;
|
||||
|
@ -29,14 +29,14 @@ public class ContainerRollingMachine extends RebornContainer
|
|||
for (int k1 = 0; k1 < 3; k1++)
|
||||
{
|
||||
this.addSlotToContainer(
|
||||
new Slot(tileRollingmachine.craftMatrix, k1 + l * 3, 30 + k1 * 18, 17 + l * 18));
|
||||
new BaseSlot(tileRollingmachine.craftMatrix, k1 + l * 3, 30 + k1 * 18, 17 + l * 18));
|
||||
}
|
||||
}
|
||||
|
||||
// output
|
||||
this.addSlotToContainer(new SlotOutput(tileRollingmachine.inventory, 0, 124, 35));
|
||||
// battery
|
||||
this.addSlotToContainer(new Slot(tileRollingmachine.inventory, 2, 8, 51));
|
||||
this.addSlotToContainer(new BaseSlot(tileRollingmachine.inventory, 2, 8, 51));
|
||||
|
||||
int i;
|
||||
|
||||
|
@ -44,13 +44,13 @@ public class ContainerRollingMachine extends RebornContainer
|
|||
{
|
||||
for (int j = 0; j < 9; ++j)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
this.addSlotToContainer(new BaseSlot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 9; ++i)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 142));
|
||||
this.addSlotToContainer(new BaseSlot(player.inventory, i, 8 + i * 18, 142));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package techreborn.client.container;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import reborncore.client.gui.BaseSlot;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import reborncore.client.gui.SlotOutput;
|
||||
|
@ -38,13 +38,13 @@ public class ContainerScrapboxinator extends RebornContainer
|
|||
{
|
||||
for (int j = 0; j < 9; ++j)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
this.addSlotToContainer(new BaseSlot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 9; ++i)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 142));
|
||||
this.addSlotToContainer(new BaseSlot(player.inventory, i, 8 + i * 18, 142));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package techreborn.client.container;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import reborncore.client.gui.BaseSlot;
|
||||
import reborncore.client.gui.SlotFake;
|
||||
import reborncore.client.gui.SlotOutput;
|
||||
import reborncore.common.container.RebornContainer;
|
||||
|
@ -18,7 +18,7 @@ public class ContainerSemifluidGenerator extends RebornContainer
|
|||
this.tileSemifluidGenerator = tileSemifluidGenerator;
|
||||
this.player = player;
|
||||
|
||||
this.addSlotToContainer(new Slot(tileSemifluidGenerator.inventory, 0, 80, 17));
|
||||
this.addSlotToContainer(new BaseSlot(tileSemifluidGenerator.inventory, 0, 80, 17));
|
||||
this.addSlotToContainer(new SlotOutput(tileSemifluidGenerator.inventory, 1, 80, 53));
|
||||
this.addSlotToContainer(new SlotFake(tileSemifluidGenerator.inventory, 2, 59, 42, false, false, 1));
|
||||
|
||||
|
@ -28,13 +28,13 @@ public class ContainerSemifluidGenerator extends RebornContainer
|
|||
{
|
||||
for (int j = 0; j < 9; ++j)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
this.addSlotToContainer(new BaseSlot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 9; ++i)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 142));
|
||||
this.addSlotToContainer(new BaseSlot(player.inventory, i, 8 + i * 18, 142));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package techreborn.client.container;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import reborncore.client.gui.BaseSlot;
|
||||
import reborncore.client.gui.SlotFake;
|
||||
import reborncore.client.gui.SlotFluid;
|
||||
import reborncore.client.gui.SlotOutput;
|
||||
|
@ -29,13 +29,13 @@ public class ContainerThermalGenerator extends RebornContainer
|
|||
{
|
||||
for (int j = 0; j < 9; ++j)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
this.addSlotToContainer(new BaseSlot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 9; ++i)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 142));
|
||||
this.addSlotToContainer(new BaseSlot(player.inventory, i, 8 + i * 18, 142));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ package techreborn.client.container;
|
|||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.ICrafting;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import reborncore.client.gui.BaseSlot;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import reborncore.client.gui.SlotOutput;
|
||||
|
@ -22,7 +22,7 @@ public class ContainerVacuumFreezer extends ContainerCrafting
|
|||
this.player = player;
|
||||
|
||||
// input
|
||||
this.addSlotToContainer(new Slot(tileAlloysmelter.inventory, 0, 56, 34));
|
||||
this.addSlotToContainer(new BaseSlot(tileAlloysmelter.inventory, 0, 56, 34));
|
||||
// outputs
|
||||
this.addSlotToContainer(new SlotOutput(tileAlloysmelter.inventory, 1, 116, 35));
|
||||
|
||||
|
@ -32,13 +32,13 @@ public class ContainerVacuumFreezer extends ContainerCrafting
|
|||
{
|
||||
for (int j = 0; j < 9; ++j)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
this.addSlotToContainer(new BaseSlot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 9; ++i)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 142));
|
||||
this.addSlotToContainer(new BaseSlot(player.inventory, i, 8 + i * 18, 142));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
package techreborn.client.container;
|
||||
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import reborncore.client.gui.BaseSlot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import techreborn.init.ModItems;
|
||||
|
||||
public class SlotScrapbox extends Slot
|
||||
public class SlotScrapbox extends BaseSlot
|
||||
{
|
||||
|
||||
public SlotScrapbox(IInventory par1iInventory, int par2, int par3, int par4)
|
||||
|
|
|
@ -5,6 +5,7 @@ import net.minecraft.client.renderer.GlStateManager;
|
|||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.text.translation.I18n;
|
||||
import reborncore.common.container.RebornContainer;
|
||||
import techreborn.client.container.ContainerGrinder;
|
||||
import techreborn.tiles.teir1.TileGrinder;
|
||||
|
||||
|
@ -18,7 +19,7 @@ public class GuiGrinder extends GuiContainer
|
|||
|
||||
public GuiGrinder(EntityPlayer player, TileGrinder tilegrinder)
|
||||
{
|
||||
super(new ContainerGrinder(tilegrinder, player));
|
||||
super(RebornContainer.createContainer(ContainerGrinder.class, tilegrinder, player));
|
||||
this.xSize = 176;
|
||||
this.ySize = 167;
|
||||
grinder = tilegrinder;
|
||||
|
|
|
@ -9,19 +9,22 @@ import reborncore.api.IListInfoProvider;
|
|||
import reborncore.api.power.EnumPowerTier;
|
||||
import reborncore.api.power.IEnergyItemInfo;
|
||||
import reborncore.api.recipe.IRecipeCrafterProvider;
|
||||
import reborncore.api.tile.IContainerProvider;
|
||||
import reborncore.api.tile.IInventoryProvider;
|
||||
import reborncore.common.container.RebornContainer;
|
||||
import reborncore.common.powerSystem.PoweredItem;
|
||||
import reborncore.common.powerSystem.TilePowerAcceptor;
|
||||
import reborncore.common.recipes.RecipeCrafter;
|
||||
import reborncore.common.util.Inventory;
|
||||
import techreborn.api.Reference;
|
||||
import techreborn.client.container.ContainerCentrifuge;
|
||||
import techreborn.config.ConfigTechReborn;
|
||||
import techreborn.init.ModBlocks;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class TileCentrifuge extends TilePowerAcceptor
|
||||
implements IWrenchable,IInventoryProvider, IListInfoProvider, IRecipeCrafterProvider
|
||||
implements IWrenchable,IInventoryProvider, IListInfoProvider, IRecipeCrafterProvider//, IContainerProvider
|
||||
{
|
||||
|
||||
public int tickTime;
|
||||
|
@ -124,28 +127,7 @@ public class TileCentrifuge extends TilePowerAcceptor
|
|||
super.addInfo(info, isRealTile);
|
||||
info.add("Round and round it goes");
|
||||
}
|
||||
|
||||
// // ISidedInventory
|
||||
// @Override
|
||||
// public int[] getSlotsForFace(EnumFacing side)
|
||||
// {
|
||||
// return side == EnumFacing.DOWN ? new int[] { 0, 1, 2, 3, 4, 5 } : new int[] { 0, 1, 2, 3, 4, 5 };
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public boolean canInsertItem(int slotIndex, ItemStack itemStack, EnumFacing side)
|
||||
// {
|
||||
// if (slotIndex >= 2)
|
||||
// return false;
|
||||
// return isItemValidForSlot(slotIndex, itemStack);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public boolean canExtractItem(int slotIndex, ItemStack itemStack, EnumFacing side)
|
||||
// {
|
||||
// return slotIndex == 2 || slotIndex == 3 || slotIndex == 4 || slotIndex == 5;
|
||||
// }
|
||||
|
||||
|
||||
public int getProgressScaled(int scale)
|
||||
{
|
||||
if (crafter.currentTickTime != 0)
|
||||
|
@ -200,4 +182,9 @@ public class TileCentrifuge extends TilePowerAcceptor
|
|||
public RecipeCrafter getRecipeCrafter() {
|
||||
return crafter;
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public RebornContainer getContainer() {
|
||||
// return RebornContainer.getContainerFromClass(ContainerCentrifuge.class);
|
||||
// }
|
||||
}
|
|
@ -9,17 +9,21 @@ import net.minecraft.util.EnumFacing;
|
|||
import reborncore.api.IListInfoProvider;
|
||||
import reborncore.api.power.EnumPowerTier;
|
||||
import reborncore.api.recipe.IRecipeCrafterProvider;
|
||||
import reborncore.api.tile.IContainerProvider;
|
||||
import reborncore.api.tile.IInventoryProvider;
|
||||
import reborncore.common.container.RebornContainer;
|
||||
import reborncore.common.powerSystem.TilePowerAcceptor;
|
||||
import reborncore.common.recipes.RecipeCrafter;
|
||||
import reborncore.common.util.Inventory;
|
||||
import techreborn.api.Reference;
|
||||
import techreborn.client.container.ContainerCentrifuge;
|
||||
import techreborn.client.container.ContainerGrinder;
|
||||
import techreborn.init.ModBlocks;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class TileGrinder extends TilePowerAcceptor implements IWrenchable,IInventoryProvider, ISidedInventory,
|
||||
IListInfoProvider, IRecipeCrafterProvider
|
||||
public class TileGrinder extends TilePowerAcceptor implements IWrenchable,IInventoryProvider,
|
||||
IListInfoProvider, IRecipeCrafterProvider, IContainerProvider
|
||||
{
|
||||
|
||||
public Inventory inventory = new Inventory(6, "TileGrinder", 64, this);
|
||||
|
@ -94,28 +98,6 @@ public class TileGrinder extends TilePowerAcceptor implements IWrenchable,IInven
|
|||
crafter.writeToNBT(tagCompound);
|
||||
}
|
||||
|
||||
|
||||
// ISidedInventory
|
||||
@Override
|
||||
public int[] getSlotsForFace(EnumFacing side)
|
||||
{
|
||||
return side == EnumFacing.DOWN ? new int[] { 0, 1, 2 } : new int[] { 0, 1, 2 };
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInsertItem(int slotIndex, ItemStack itemStack, EnumFacing side)
|
||||
{
|
||||
if (slotIndex == 2)
|
||||
return false;
|
||||
return isItemValidForSlot(slotIndex, itemStack);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canExtractItem(int slotIndex, ItemStack itemStack, EnumFacing side)
|
||||
{
|
||||
return slotIndex == 2;
|
||||
}
|
||||
|
||||
public int getProgressScaled(int scale)
|
||||
{
|
||||
if (crafter.currentTickTime != 0)
|
||||
|
@ -175,4 +157,9 @@ public class TileGrinder extends TilePowerAcceptor implements IWrenchable,IInven
|
|||
public RecipeCrafter getRecipeCrafter() {
|
||||
return crafter;
|
||||
}
|
||||
|
||||
@Override
|
||||
public RebornContainer getContainer() {
|
||||
return RebornContainer.getContainerFromClass(ContainerGrinder.class, this);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue