Reformatted all the code using the default intelji formatting options.
This commit is contained in:
parent
2f63a24070
commit
e0ab0af822
363 changed files with 20524 additions and 23016 deletions
|
@ -12,261 +12,211 @@ import techreborn.tiles.lesu.TileLesu;
|
|||
|
||||
public class GuiHandler implements IGuiHandler {
|
||||
|
||||
public static final int thermalGeneratorID = 0;
|
||||
public static final int quantumTankID = 1;
|
||||
public static final int quantumChestID = 2;
|
||||
public static final int centrifugeID = 3;
|
||||
public static final int rollingMachineID = 4;
|
||||
public static final int blastFurnaceID = 5;
|
||||
public static final int alloySmelterID = 6;
|
||||
public static final int grinderID = 7;
|
||||
public static final int compresserID = 8;
|
||||
public static final int matterfabID = 9;
|
||||
public static final int pdaID = 10;
|
||||
public static final int chunkloaderID = 11;
|
||||
public static final int assemblingmachineID = 12;
|
||||
public static final int latheID = 13;
|
||||
public static final int platecuttingmachineID = 14;
|
||||
public static final int dieselGeneratorID = 15;
|
||||
public static final int industrialElectrolyzerID = 16;
|
||||
public static final int aesuID =17;
|
||||
public static final int alloyFurnaceID = 18;
|
||||
public static final int sawMillID = 19;
|
||||
public static final int chemicalReactorID = 20;
|
||||
public static final int semifluidGeneratorID = 21;
|
||||
public static final int gasTurbineID = 22;
|
||||
public static final int digitalChestID = 23;
|
||||
public static final int destructoPackID = 25;
|
||||
public static final int thermalGeneratorID = 0;
|
||||
public static final int quantumTankID = 1;
|
||||
public static final int quantumChestID = 2;
|
||||
public static final int centrifugeID = 3;
|
||||
public static final int rollingMachineID = 4;
|
||||
public static final int blastFurnaceID = 5;
|
||||
public static final int alloySmelterID = 6;
|
||||
public static final int grinderID = 7;
|
||||
public static final int compresserID = 8;
|
||||
public static final int matterfabID = 9;
|
||||
public static final int pdaID = 10;
|
||||
public static final int chunkloaderID = 11;
|
||||
public static final int assemblingmachineID = 12;
|
||||
public static final int latheID = 13;
|
||||
public static final int platecuttingmachineID = 14;
|
||||
public static final int dieselGeneratorID = 15;
|
||||
public static final int industrialElectrolyzerID = 16;
|
||||
public static final int aesuID = 17;
|
||||
public static final int alloyFurnaceID = 18;
|
||||
public static final int sawMillID = 19;
|
||||
public static final int chemicalReactorID = 20;
|
||||
public static final int semifluidGeneratorID = 21;
|
||||
public static final int gasTurbineID = 22;
|
||||
public static final int digitalChestID = 23;
|
||||
public static final int destructoPackID = 25;
|
||||
public static final int lesuID = 26;
|
||||
public static final int idsuID = 27;
|
||||
public static final int chargeBench = 28;
|
||||
public static final int idsuID = 27;
|
||||
public static final int chargeBench = 28;
|
||||
public static final int farmID = 29;
|
||||
|
||||
@Override
|
||||
public Object getServerGuiElement(int ID, EntityPlayer player, World world,
|
||||
int x, int y, int z)
|
||||
{
|
||||
if (ID == thermalGeneratorID)
|
||||
{
|
||||
return new ContainerThermalGenerator(
|
||||
(TileThermalGenerator) world.getTileEntity(x, y, z), player);
|
||||
} else if (ID == semifluidGeneratorID)
|
||||
{
|
||||
return new ContainerSemifluidGenerator(
|
||||
(TileSemifluidGenerator) world.getTileEntity(x, y, z), player);
|
||||
} else if (ID == gasTurbineID)
|
||||
{
|
||||
return new ContainerGasTurbine(
|
||||
(TileGasTurbine) world.getTileEntity(x, y, z), player);
|
||||
} else if (ID == quantumTankID)
|
||||
{
|
||||
return new ContainerQuantumTank(
|
||||
(TileQuantumTank) world.getTileEntity(x, y, z), player);
|
||||
} else if (ID == digitalChestID)
|
||||
{
|
||||
return new ContainerDigitalChest(
|
||||
(TileDigitalChest) world.getTileEntity(x, y, z), player);
|
||||
} else if (ID == quantumChestID)
|
||||
{
|
||||
return new ContainerQuantumChest(
|
||||
(TileQuantumChest) world.getTileEntity(x, y, z), player);
|
||||
} else if (ID == centrifugeID)
|
||||
{
|
||||
return new ContainerCentrifuge(
|
||||
(TileCentrifuge) world.getTileEntity(x, y, z), player);
|
||||
} else if (ID == rollingMachineID)
|
||||
{
|
||||
return new ContainerRollingMachine(
|
||||
(TileRollingMachine) world.getTileEntity(x, y, z), player);
|
||||
} else if (ID == blastFurnaceID)
|
||||
{
|
||||
return new ContainerBlastFurnace(
|
||||
(TileBlastFurnace) world.getTileEntity(x, y, z), player);
|
||||
} else if (ID == alloySmelterID)
|
||||
{
|
||||
return new ContainerAlloySmelter(
|
||||
(TileAlloySmelter) world.getTileEntity(x, y, z), player);
|
||||
} else if (ID == grinderID)
|
||||
{
|
||||
return new ContainerGrinder(
|
||||
(TileGrinder) world.getTileEntity(x, y, z), player);
|
||||
} else if (ID == compresserID)
|
||||
{
|
||||
return new ContainerImplosionCompressor(
|
||||
(TileImplosionCompressor) world.getTileEntity(x, y, z), player);
|
||||
} else if (ID == matterfabID)
|
||||
{
|
||||
return new ContainerMatterFabricator(
|
||||
(TileMatterFabricator) world.getTileEntity(x, y, z), player);
|
||||
} else if (ID == chunkloaderID)
|
||||
{
|
||||
return new ContainerChunkloader(
|
||||
(TileChunkLoader) world.getTileEntity(x, y, z), player);
|
||||
} else if (ID == assemblingmachineID)
|
||||
{
|
||||
return new ContainerAssemblingMachine(
|
||||
(TileAssemblingMachine) world.getTileEntity(x, y, z), player);
|
||||
} else if (ID == latheID)
|
||||
{
|
||||
return new ContainerLathe(
|
||||
(TileLathe) world.getTileEntity(x, y, z), player);
|
||||
} else if (ID == platecuttingmachineID)
|
||||
{
|
||||
return new ContainerPlateCuttingMachine(
|
||||
(TilePlateCuttingMachine) world.getTileEntity(x, y, z), player);
|
||||
} else if (ID == dieselGeneratorID)
|
||||
{
|
||||
return new ContainerDieselGenerator(
|
||||
(TileDieselGenerator) world.getTileEntity(x, y, z), player);
|
||||
} else if (ID == industrialElectrolyzerID)
|
||||
{
|
||||
return new ContainerIndustrialElectrolyzer(
|
||||
(TileIndustrialElectrolyzer) world.getTileEntity(x, y, z), player);
|
||||
} else if (ID == aesuID)
|
||||
{
|
||||
return new ContainerAesu(
|
||||
(TileAesu) world.getTileEntity(x, y, z), player);
|
||||
} else if (ID == alloyFurnaceID)
|
||||
{
|
||||
return new ContainerAlloyFurnace(
|
||||
(TileAlloyFurnace) world.getTileEntity(x, y, z), player);
|
||||
} else if (ID == sawMillID)
|
||||
{
|
||||
return new ContainerIndustrialSawmill(
|
||||
(TileIndustrialSawmill) world.getTileEntity(x, y, z), player);
|
||||
} else if (ID == chemicalReactorID)
|
||||
{
|
||||
return new ContainerChemicalReactor(
|
||||
(TileChemicalReactor) world.getTileEntity(x, y, z), player);
|
||||
} else if (ID == pdaID)
|
||||
{
|
||||
return null;
|
||||
} else if (ID == destructoPackID) {
|
||||
return new ContainerDestructoPack(player);
|
||||
} else if (ID == lesuID) {
|
||||
|
||||
@Override
|
||||
public Object getServerGuiElement(int ID, EntityPlayer player, World world,
|
||||
int x, int y, int z) {
|
||||
if (ID == thermalGeneratorID) {
|
||||
return new ContainerThermalGenerator(
|
||||
(TileThermalGenerator) world.getTileEntity(x, y, z), player);
|
||||
} else if (ID == semifluidGeneratorID) {
|
||||
return new ContainerSemifluidGenerator(
|
||||
(TileSemifluidGenerator) world.getTileEntity(x, y, z), player);
|
||||
} else if (ID == gasTurbineID) {
|
||||
return new ContainerGasTurbine(
|
||||
(TileGasTurbine) world.getTileEntity(x, y, z), player);
|
||||
} else if (ID == quantumTankID) {
|
||||
return new ContainerQuantumTank(
|
||||
(TileQuantumTank) world.getTileEntity(x, y, z), player);
|
||||
} else if (ID == digitalChestID) {
|
||||
return new ContainerDigitalChest(
|
||||
(TileDigitalChest) world.getTileEntity(x, y, z), player);
|
||||
} else if (ID == quantumChestID) {
|
||||
return new ContainerQuantumChest(
|
||||
(TileQuantumChest) world.getTileEntity(x, y, z), player);
|
||||
} else if (ID == centrifugeID) {
|
||||
return new ContainerCentrifuge(
|
||||
(TileCentrifuge) world.getTileEntity(x, y, z), player);
|
||||
} else if (ID == rollingMachineID) {
|
||||
return new ContainerRollingMachine(
|
||||
(TileRollingMachine) world.getTileEntity(x, y, z), player);
|
||||
} else if (ID == blastFurnaceID) {
|
||||
return new ContainerBlastFurnace(
|
||||
(TileBlastFurnace) world.getTileEntity(x, y, z), player);
|
||||
} else if (ID == alloySmelterID) {
|
||||
return new ContainerAlloySmelter(
|
||||
(TileAlloySmelter) world.getTileEntity(x, y, z), player);
|
||||
} else if (ID == grinderID) {
|
||||
return new ContainerGrinder(
|
||||
(TileGrinder) world.getTileEntity(x, y, z), player);
|
||||
} else if (ID == compresserID) {
|
||||
return new ContainerImplosionCompressor(
|
||||
(TileImplosionCompressor) world.getTileEntity(x, y, z), player);
|
||||
} else if (ID == matterfabID) {
|
||||
return new ContainerMatterFabricator(
|
||||
(TileMatterFabricator) world.getTileEntity(x, y, z), player);
|
||||
} else if (ID == chunkloaderID) {
|
||||
return new ContainerChunkloader(
|
||||
(TileChunkLoader) world.getTileEntity(x, y, z), player);
|
||||
} else if (ID == assemblingmachineID) {
|
||||
return new ContainerAssemblingMachine(
|
||||
(TileAssemblingMachine) world.getTileEntity(x, y, z), player);
|
||||
} else if (ID == latheID) {
|
||||
return new ContainerLathe(
|
||||
(TileLathe) world.getTileEntity(x, y, z), player);
|
||||
} else if (ID == platecuttingmachineID) {
|
||||
return new ContainerPlateCuttingMachine(
|
||||
(TilePlateCuttingMachine) world.getTileEntity(x, y, z), player);
|
||||
} else if (ID == dieselGeneratorID) {
|
||||
return new ContainerDieselGenerator(
|
||||
(TileDieselGenerator) world.getTileEntity(x, y, z), player);
|
||||
} else if (ID == industrialElectrolyzerID) {
|
||||
return new ContainerIndustrialElectrolyzer(
|
||||
(TileIndustrialElectrolyzer) world.getTileEntity(x, y, z), player);
|
||||
} else if (ID == aesuID) {
|
||||
return new ContainerAesu(
|
||||
(TileAesu) world.getTileEntity(x, y, z), player);
|
||||
} else if (ID == alloyFurnaceID) {
|
||||
return new ContainerAlloyFurnace(
|
||||
(TileAlloyFurnace) world.getTileEntity(x, y, z), player);
|
||||
} else if (ID == sawMillID) {
|
||||
return new ContainerIndustrialSawmill(
|
||||
(TileIndustrialSawmill) world.getTileEntity(x, y, z), player);
|
||||
} else if (ID == chemicalReactorID) {
|
||||
return new ContainerChemicalReactor(
|
||||
(TileChemicalReactor) world.getTileEntity(x, y, z), player);
|
||||
} else if (ID == pdaID) {
|
||||
return null;
|
||||
} else if (ID == destructoPackID) {
|
||||
return new ContainerDestructoPack(player);
|
||||
} else if (ID == lesuID) {
|
||||
return new ContainerLesu((TileLesu) world.getTileEntity(x, y, z), player);
|
||||
} else if (ID == idsuID) {
|
||||
return new ContainerIDSU((TileIDSU) world.getTileEntity(x, y, z), player);
|
||||
return new ContainerIDSU((TileIDSU) world.getTileEntity(x, y, z), player);
|
||||
} else if (ID == chargeBench) {
|
||||
return new ContainerChargeBench((TileChargeBench) world.getTileEntity(x, y, z), player);
|
||||
} else if (ID == farmID){
|
||||
return new ContainerFarm((TileFarm) world.getTileEntity(x,y,z), player);
|
||||
return new ContainerChargeBench((TileChargeBench) world.getTileEntity(x, y, z), player);
|
||||
} else if (ID == farmID) {
|
||||
return new ContainerFarm((TileFarm) world.getTileEntity(x, y, z), player);
|
||||
}
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getClientGuiElement(int ID, EntityPlayer player, World world,
|
||||
int x, int y, int z)
|
||||
{
|
||||
if (ID == thermalGeneratorID)
|
||||
{
|
||||
return new GuiThermalGenerator(player,
|
||||
(TileThermalGenerator) world.getTileEntity(x, y, z));
|
||||
} else if (ID == semifluidGeneratorID)
|
||||
{
|
||||
return new GuiSemifluidGenerator(player,
|
||||
(TileSemifluidGenerator) world.getTileEntity(x, y, z));
|
||||
} else if (ID == gasTurbineID)
|
||||
{
|
||||
return new GuiGasTurbine(player,
|
||||
(TileGasTurbine) world.getTileEntity(x, y, z));
|
||||
} else if (ID == quantumTankID)
|
||||
{
|
||||
return new GuiQuantumTank(player,
|
||||
(TileQuantumTank) world.getTileEntity(x, y, z));
|
||||
} else if (ID == digitalChestID)
|
||||
{
|
||||
return new GuiDigitalChest(player,
|
||||
(TileDigitalChest) world.getTileEntity(x, y, z));
|
||||
} else if (ID == quantumChestID)
|
||||
{
|
||||
return new GuiQuantumChest(player,
|
||||
(TileQuantumChest) world.getTileEntity(x, y, z));
|
||||
} else if (ID == centrifugeID)
|
||||
{
|
||||
return new GuiCentrifuge(player,
|
||||
(TileCentrifuge) world.getTileEntity(x, y, z));
|
||||
} else if (ID == rollingMachineID)
|
||||
{
|
||||
return new GuiRollingMachine(player,
|
||||
(TileRollingMachine) world.getTileEntity(x, y, z));
|
||||
} else if (ID == blastFurnaceID)
|
||||
{
|
||||
return new GuiBlastFurnace(player,
|
||||
(TileBlastFurnace) world.getTileEntity(x, y, z));
|
||||
} else if (ID == alloySmelterID)
|
||||
{
|
||||
return new GuiAlloySmelter(player,
|
||||
(TileAlloySmelter) world.getTileEntity(x, y, z));
|
||||
} else if (ID == grinderID)
|
||||
{
|
||||
return new GuiGrinder(player,
|
||||
(TileGrinder) world.getTileEntity(x, y, z));
|
||||
} else if (ID == compresserID)
|
||||
{
|
||||
return new GuiImplosionCompressor(player,
|
||||
(TileImplosionCompressor) world.getTileEntity(x, y, z));
|
||||
} else if (ID == matterfabID)
|
||||
{
|
||||
return new GuiMatterFabricator(player,
|
||||
(TileMatterFabricator) world.getTileEntity(x, y, z));
|
||||
} else if (ID == chunkloaderID)
|
||||
{
|
||||
return new GuiChunkLoader(player,
|
||||
(TileChunkLoader) world.getTileEntity(x, y, z));
|
||||
} else if (ID == assemblingmachineID)
|
||||
{
|
||||
return new GuiAssemblingMachine(player,
|
||||
(TileAssemblingMachine) world.getTileEntity(x, y, z));
|
||||
} else if (ID == latheID)
|
||||
{
|
||||
return new GuiLathe(player,
|
||||
(TileLathe) world.getTileEntity(x, y, z));
|
||||
} else if (ID == platecuttingmachineID)
|
||||
{
|
||||
return new GuiPlateCuttingMachine(player,
|
||||
(TilePlateCuttingMachine) world.getTileEntity(x, y, z));
|
||||
} else if (ID == dieselGeneratorID)
|
||||
{
|
||||
return new GuiDieselGenerator(player,
|
||||
(TileDieselGenerator) world.getTileEntity(x, y, z));
|
||||
} else if (ID == industrialElectrolyzerID)
|
||||
{
|
||||
return new GuiIndustrialElectrolyzer(player,
|
||||
(TileIndustrialElectrolyzer) world.getTileEntity(x, y, z));
|
||||
} else if (ID == aesuID)
|
||||
{
|
||||
return new GuiAesu(player,
|
||||
(TileAesu) world.getTileEntity(x, y, z));
|
||||
} else if (ID == alloyFurnaceID)
|
||||
{
|
||||
return new GuiAlloyFurnace(player,
|
||||
(TileAlloyFurnace) world.getTileEntity(x, y, z));
|
||||
} else if (ID == sawMillID)
|
||||
{
|
||||
return new GuiIndustrialSawmill(player,
|
||||
(TileIndustrialSawmill) world.getTileEntity(x, y, z));
|
||||
} else if (ID == chemicalReactorID)
|
||||
{
|
||||
return new GuiChemicalReactor(player,
|
||||
(TileChemicalReactor) world.getTileEntity(x, y, z));
|
||||
} else if (ID == pdaID)
|
||||
{
|
||||
return new GuiPda(player, new ContainerPda(player));
|
||||
} else if (ID == destructoPackID) {
|
||||
return new GuiDestructoPack(new ContainerDestructoPack(player));
|
||||
} else if (ID == lesuID) {
|
||||
return new GuiLesu(player, (TileLesu)world.getTileEntity(x, y, z));
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getClientGuiElement(int ID, EntityPlayer player, World world,
|
||||
int x, int y, int z) {
|
||||
if (ID == thermalGeneratorID) {
|
||||
return new GuiThermalGenerator(player,
|
||||
(TileThermalGenerator) world.getTileEntity(x, y, z));
|
||||
} else if (ID == semifluidGeneratorID) {
|
||||
return new GuiSemifluidGenerator(player,
|
||||
(TileSemifluidGenerator) world.getTileEntity(x, y, z));
|
||||
} else if (ID == gasTurbineID) {
|
||||
return new GuiGasTurbine(player,
|
||||
(TileGasTurbine) world.getTileEntity(x, y, z));
|
||||
} else if (ID == quantumTankID) {
|
||||
return new GuiQuantumTank(player,
|
||||
(TileQuantumTank) world.getTileEntity(x, y, z));
|
||||
} else if (ID == digitalChestID) {
|
||||
return new GuiDigitalChest(player,
|
||||
(TileDigitalChest) world.getTileEntity(x, y, z));
|
||||
} else if (ID == quantumChestID) {
|
||||
return new GuiQuantumChest(player,
|
||||
(TileQuantumChest) world.getTileEntity(x, y, z));
|
||||
} else if (ID == centrifugeID) {
|
||||
return new GuiCentrifuge(player,
|
||||
(TileCentrifuge) world.getTileEntity(x, y, z));
|
||||
} else if (ID == rollingMachineID) {
|
||||
return new GuiRollingMachine(player,
|
||||
(TileRollingMachine) world.getTileEntity(x, y, z));
|
||||
} else if (ID == blastFurnaceID) {
|
||||
return new GuiBlastFurnace(player,
|
||||
(TileBlastFurnace) world.getTileEntity(x, y, z));
|
||||
} else if (ID == alloySmelterID) {
|
||||
return new GuiAlloySmelter(player,
|
||||
(TileAlloySmelter) world.getTileEntity(x, y, z));
|
||||
} else if (ID == grinderID) {
|
||||
return new GuiGrinder(player,
|
||||
(TileGrinder) world.getTileEntity(x, y, z));
|
||||
} else if (ID == compresserID) {
|
||||
return new GuiImplosionCompressor(player,
|
||||
(TileImplosionCompressor) world.getTileEntity(x, y, z));
|
||||
} else if (ID == matterfabID) {
|
||||
return new GuiMatterFabricator(player,
|
||||
(TileMatterFabricator) world.getTileEntity(x, y, z));
|
||||
} else if (ID == chunkloaderID) {
|
||||
return new GuiChunkLoader(player,
|
||||
(TileChunkLoader) world.getTileEntity(x, y, z));
|
||||
} else if (ID == assemblingmachineID) {
|
||||
return new GuiAssemblingMachine(player,
|
||||
(TileAssemblingMachine) world.getTileEntity(x, y, z));
|
||||
} else if (ID == latheID) {
|
||||
return new GuiLathe(player,
|
||||
(TileLathe) world.getTileEntity(x, y, z));
|
||||
} else if (ID == platecuttingmachineID) {
|
||||
return new GuiPlateCuttingMachine(player,
|
||||
(TilePlateCuttingMachine) world.getTileEntity(x, y, z));
|
||||
} else if (ID == dieselGeneratorID) {
|
||||
return new GuiDieselGenerator(player,
|
||||
(TileDieselGenerator) world.getTileEntity(x, y, z));
|
||||
} else if (ID == industrialElectrolyzerID) {
|
||||
return new GuiIndustrialElectrolyzer(player,
|
||||
(TileIndustrialElectrolyzer) world.getTileEntity(x, y, z));
|
||||
} else if (ID == aesuID) {
|
||||
return new GuiAesu(player,
|
||||
(TileAesu) world.getTileEntity(x, y, z));
|
||||
} else if (ID == alloyFurnaceID) {
|
||||
return new GuiAlloyFurnace(player,
|
||||
(TileAlloyFurnace) world.getTileEntity(x, y, z));
|
||||
} else if (ID == sawMillID) {
|
||||
return new GuiIndustrialSawmill(player,
|
||||
(TileIndustrialSawmill) world.getTileEntity(x, y, z));
|
||||
} else if (ID == chemicalReactorID) {
|
||||
return new GuiChemicalReactor(player,
|
||||
(TileChemicalReactor) world.getTileEntity(x, y, z));
|
||||
} else if (ID == pdaID) {
|
||||
return new GuiPda(player, new ContainerPda(player));
|
||||
} else if (ID == destructoPackID) {
|
||||
return new GuiDestructoPack(new ContainerDestructoPack(player));
|
||||
} else if (ID == lesuID) {
|
||||
return new GuiLesu(player, (TileLesu) world.getTileEntity(x, y, z));
|
||||
} else if (ID == idsuID) {
|
||||
return new GuiIDSU(player, (TileIDSU)world.getTileEntity(x, y, z));
|
||||
return new GuiIDSU(player, (TileIDSU) world.getTileEntity(x, y, z));
|
||||
} else if (ID == chargeBench) {
|
||||
return new GuiChargeBench(player, (TileChargeBench)world.getTileEntity(x, y, z));
|
||||
} else if(ID == farmID){
|
||||
return new GuiFarm(new ContainerFarm((TileFarm)world.getTileEntity(x, y, z), player));
|
||||
return new GuiChargeBench(player, (TileChargeBench) world.getTileEntity(x, y, z));
|
||||
} else if (ID == farmID) {
|
||||
return new GuiFarm(new ContainerFarm((TileFarm) world.getTileEntity(x, y, z), player));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,20 +7,17 @@ import net.minecraft.util.IIcon;
|
|||
public class GuiUtil {
|
||||
|
||||
|
||||
public static void drawRepeated(IIcon icon, double x, double y, double width, double height, double z)
|
||||
{
|
||||
public static void drawRepeated(IIcon icon, double x, double y, double width, double height, double z) {
|
||||
double iconWidthStep = (icon.getMaxU() - icon.getMinU()) / 16.0D;
|
||||
double iconHeightStep = (icon.getMaxV() - icon.getMinV()) / 16.0D;
|
||||
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
tessellator.startDrawingQuads();
|
||||
for (double cy = y; cy < y + height; cy += 16.0D)
|
||||
{
|
||||
for (double cy = y; cy < y + height; cy += 16.0D) {
|
||||
double quadHeight = Math.min(16.0D, height + y - cy);
|
||||
double maxY = cy + quadHeight;
|
||||
double maxV = icon.getMinV() + iconHeightStep * quadHeight;
|
||||
for (double cx = x; cx < x + width; cx += 16.0D)
|
||||
{
|
||||
for (double cx = x; cx < x + width; cx += 16.0D) {
|
||||
double quadWidth = Math.min(16.0D, width + x - cx);
|
||||
double maxX = cx + quadWidth;
|
||||
double maxU = icon.getMinU() + iconWidthStep * quadWidth;
|
||||
|
@ -34,31 +31,30 @@ public class GuiUtil {
|
|||
tessellator.draw();
|
||||
}
|
||||
|
||||
public static void drawTooltipBox(int x, int y, int w, int h) {
|
||||
int bg = 0xf0100010;
|
||||
drawGradientRect(x + 1, y, w - 1, 1, bg, bg);
|
||||
drawGradientRect(x + 1, y + h, w - 1, 1, bg, bg);
|
||||
drawGradientRect(x + 1, y + 1, w - 1, h - 1, bg, bg);//center
|
||||
drawGradientRect(x, y + 1, 1, h - 1, bg, bg);
|
||||
drawGradientRect(x + w, y + 1, 1, h - 1, bg, bg);
|
||||
int grad1 = 0x505000ff;
|
||||
int grad2 = 0x5028007F;
|
||||
drawGradientRect(x + 1, y + 2, 1, h - 3, grad1, grad2);
|
||||
drawGradientRect(x + w - 1, y + 2, 1, h - 3, grad1, grad2);
|
||||
public static void drawTooltipBox(int x, int y, int w, int h) {
|
||||
int bg = 0xf0100010;
|
||||
drawGradientRect(x + 1, y, w - 1, 1, bg, bg);
|
||||
drawGradientRect(x + 1, y + h, w - 1, 1, bg, bg);
|
||||
drawGradientRect(x + 1, y + 1, w - 1, h - 1, bg, bg);//center
|
||||
drawGradientRect(x, y + 1, 1, h - 1, bg, bg);
|
||||
drawGradientRect(x + w, y + 1, 1, h - 1, bg, bg);
|
||||
int grad1 = 0x505000ff;
|
||||
int grad2 = 0x5028007F;
|
||||
drawGradientRect(x + 1, y + 2, 1, h - 3, grad1, grad2);
|
||||
drawGradientRect(x + w - 1, y + 2, 1, h - 3, grad1, grad2);
|
||||
|
||||
drawGradientRect(x + 1, y + 1, w - 1, 1, grad1, grad1);
|
||||
drawGradientRect(x + 1, y + h - 1, w - 1, 1, grad2, grad2);
|
||||
}
|
||||
drawGradientRect(x + 1, y + 1, w - 1, 1, grad1, grad1);
|
||||
drawGradientRect(x + 1, y + h - 1, w - 1, 1, grad2, grad2);
|
||||
}
|
||||
|
||||
public static void drawGradientRect(int x, int y, int w, int h, int colour1, int colour2) {
|
||||
new GuiHook().drawGradientRect(x, y, x + w, y + h, colour1, colour2);
|
||||
}
|
||||
public static void drawGradientRect(int x, int y, int w, int h, int colour1, int colour2) {
|
||||
new GuiHook().drawGradientRect(x, y, x + w, y + h, colour1, colour2);
|
||||
}
|
||||
|
||||
public static class GuiHook extends Gui
|
||||
{
|
||||
@Override
|
||||
public void drawGradientRect(int par1, int par2, int par3, int par4, int par5, int par6) {
|
||||
super.drawGradientRect(par1, par2, par3, par4, par5, par6);
|
||||
}
|
||||
}
|
||||
public static class GuiHook extends Gui {
|
||||
@Override
|
||||
public void drawGradientRect(int par1, int par2, int par3, int par4, int par5, int par6) {
|
||||
super.drawGradientRect(par1, par2, par3, par4, par5, par6);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,10 +35,10 @@ public class IconSupplier {
|
|||
doubleInsulatedIronCable = reg.registerIcon("ic2" + ":wiring/cable/blockIronCableII");
|
||||
trippleInsulatedIronCable = reg.registerIcon("ic2" + ":wiring/cable/blockIronCableIII");
|
||||
glassFiberCable = reg.registerIcon("ic2" + ":wiring/cable/blockGlassCable");
|
||||
tinCable= reg.registerIcon("ic2" + ":wiring/cable/blockTinCable");
|
||||
detectorCableBlock= reg.registerIcon("ic2" + ":wiring/cable/blockDetectorCable");
|
||||
splitterCableBlock= reg.registerIcon("ic2" + ":wiring/cable/blockSplitterCable");
|
||||
insulatedtinCableBlock= reg.registerIcon("ic2" + ":wiring/cable/blockTinCableI");
|
||||
tinCable = reg.registerIcon("ic2" + ":wiring/cable/blockTinCable");
|
||||
detectorCableBlock = reg.registerIcon("ic2" + ":wiring/cable/blockDetectorCable");
|
||||
splitterCableBlock = reg.registerIcon("ic2" + ":wiring/cable/blockSplitterCable");
|
||||
insulatedtinCableBlock = reg.registerIcon("ic2" + ":wiring/cable/blockTinCableI");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,36 +6,31 @@ import net.minecraft.item.ItemStack;
|
|||
|
||||
public class SlotFake extends Slot {
|
||||
|
||||
public boolean mCanInsertItem;
|
||||
public boolean mCanStackItem;
|
||||
public int mMaxStacksize = 127;
|
||||
public boolean mCanInsertItem;
|
||||
public boolean mCanStackItem;
|
||||
public int mMaxStacksize = 127;
|
||||
|
||||
public SlotFake(IInventory par1iInventory, int par2, int par3, int par4,
|
||||
boolean aCanInsertItem, boolean aCanStackItem, int aMaxStacksize)
|
||||
{
|
||||
super(par1iInventory, par2, par3, par4);
|
||||
this.mCanInsertItem = aCanInsertItem;
|
||||
this.mCanStackItem = aCanStackItem;
|
||||
this.mMaxStacksize = aMaxStacksize;
|
||||
}
|
||||
public SlotFake(IInventory par1iInventory, int par2, int par3, int par4,
|
||||
boolean aCanInsertItem, boolean aCanStackItem, int aMaxStacksize) {
|
||||
super(par1iInventory, par2, par3, par4);
|
||||
this.mCanInsertItem = aCanInsertItem;
|
||||
this.mCanStackItem = aCanStackItem;
|
||||
this.mMaxStacksize = aMaxStacksize;
|
||||
}
|
||||
|
||||
public boolean isItemValid(ItemStack par1ItemStack)
|
||||
{
|
||||
return this.mCanInsertItem;
|
||||
}
|
||||
public boolean isItemValid(ItemStack par1ItemStack) {
|
||||
return this.mCanInsertItem;
|
||||
}
|
||||
|
||||
public int getSlotStackLimit()
|
||||
{
|
||||
return this.mMaxStacksize;
|
||||
}
|
||||
public int getSlotStackLimit() {
|
||||
return this.mMaxStacksize;
|
||||
}
|
||||
|
||||
public boolean getHasStack()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
public boolean getHasStack() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public ItemStack decrStackSize(int par1)
|
||||
{
|
||||
return !this.mCanStackItem ? null : super.decrStackSize(par1);
|
||||
}
|
||||
public ItemStack decrStackSize(int par1) {
|
||||
return !this.mCanStackItem ? null : super.decrStackSize(par1);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,29 +9,29 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
|
||||
public class SlotFilteredVoid extends Slot {
|
||||
|
||||
private List<ItemStack> filter = new ArrayList<ItemStack>();
|
||||
public SlotFilteredVoid(IInventory par1iInventory, int id, int x, int y)
|
||||
{
|
||||
super(par1iInventory, id, x, y);
|
||||
}
|
||||
|
||||
public SlotFilteredVoid(IInventory par1iInventory, int id, int x, int y, ItemStack[] filterList)
|
||||
{
|
||||
super(par1iInventory, id, x, y);
|
||||
for (ItemStack itemStack : filterList)
|
||||
this.filter.add(itemStack);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isItemValid(ItemStack stack) {
|
||||
for (ItemStack itemStack : filter)
|
||||
if (itemStack.getItem().equals(stack.getItem()) && itemStack.getItemDamage() == stack.getItemDamage())
|
||||
return false;
|
||||
|
||||
return super.isItemValid(stack);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void putStack(ItemStack arg0) { }
|
||||
private List<ItemStack> filter = new ArrayList<ItemStack>();
|
||||
|
||||
public SlotFilteredVoid(IInventory par1iInventory, int id, int x, int y) {
|
||||
super(par1iInventory, id, x, y);
|
||||
}
|
||||
|
||||
public SlotFilteredVoid(IInventory par1iInventory, int id, int x, int y, ItemStack[] filterList) {
|
||||
super(par1iInventory, id, x, y);
|
||||
for (ItemStack itemStack : filterList)
|
||||
this.filter.add(itemStack);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isItemValid(ItemStack stack) {
|
||||
for (ItemStack itemStack : filter)
|
||||
if (itemStack.getItem().equals(stack.getItem()) && itemStack.getItemDamage() == stack.getItemDamage())
|
||||
return false;
|
||||
|
||||
return super.isItemValid(stack);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void putStack(ItemStack arg0) {
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,18 +6,15 @@ import net.minecraft.item.ItemStack;
|
|||
|
||||
public class SlotInput extends Slot {
|
||||
|
||||
public SlotInput(IInventory par1iInventory, int par2, int par3, int par4)
|
||||
{
|
||||
super(par1iInventory, par2, par3, par4);
|
||||
}
|
||||
public SlotInput(IInventory par1iInventory, int par2, int par3, int par4) {
|
||||
super(par1iInventory, par2, par3, par4);
|
||||
}
|
||||
|
||||
public boolean isItemValid(ItemStack par1ItemStack)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
public boolean isItemValid(ItemStack par1ItemStack) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public int getSlotStackLimit()
|
||||
{
|
||||
return 64;
|
||||
}
|
||||
public int getSlotStackLimit() {
|
||||
return 64;
|
||||
}
|
||||
}
|
|
@ -6,18 +6,15 @@ import net.minecraft.item.ItemStack;
|
|||
|
||||
public class SlotOutput extends Slot {
|
||||
|
||||
public SlotOutput(IInventory par1iInventory, int par2, int par3, int par4)
|
||||
{
|
||||
super(par1iInventory, par2, par3, par4);
|
||||
}
|
||||
public SlotOutput(IInventory par1iInventory, int par2, int par3, int par4) {
|
||||
super(par1iInventory, par2, par3, par4);
|
||||
}
|
||||
|
||||
public boolean isItemValid(ItemStack par1ItemStack)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
public boolean isItemValid(ItemStack par1ItemStack) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public int getSlotStackLimit()
|
||||
{
|
||||
return 64;
|
||||
}
|
||||
public int getSlotStackLimit() {
|
||||
return 64;
|
||||
}
|
||||
}
|
|
@ -6,16 +6,14 @@ import techreborn.init.ModBlocks;
|
|||
|
||||
public class TechRebornCreativeTab extends CreativeTabs {
|
||||
|
||||
public static TechRebornCreativeTab instance = new TechRebornCreativeTab();
|
||||
public static TechRebornCreativeTab instance = new TechRebornCreativeTab();
|
||||
|
||||
public TechRebornCreativeTab()
|
||||
{
|
||||
super("techreborn");
|
||||
}
|
||||
public TechRebornCreativeTab() {
|
||||
super("techreborn");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getTabIconItem()
|
||||
{
|
||||
return Item.getItemFromBlock(ModBlocks.thermalGenerator);
|
||||
}
|
||||
@Override
|
||||
public Item getTabIconItem() {
|
||||
return Item.getItemFromBlock(ModBlocks.thermalGenerator);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,17 +6,15 @@ import techreborn.init.ModItems;
|
|||
|
||||
public class TechRebornCreativeTabMisc extends CreativeTabs {
|
||||
|
||||
public static TechRebornCreativeTabMisc instance = new TechRebornCreativeTabMisc();
|
||||
public static TechRebornCreativeTabMisc instance = new TechRebornCreativeTabMisc();
|
||||
|
||||
public TechRebornCreativeTabMisc()
|
||||
{
|
||||
super("techreborn");
|
||||
}
|
||||
public TechRebornCreativeTabMisc() {
|
||||
super("techreborn");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getTabIconItem()
|
||||
{
|
||||
return ModItems.cells;
|
||||
}
|
||||
@Override
|
||||
public Item getTabIconItem() {
|
||||
return ModItems.cells;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -4,44 +4,43 @@ import cpw.mods.fml.client.GuiModList;
|
|||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.event.GuiScreenEvent;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import techreborn.Core;
|
||||
|
||||
import java.awt.*;
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class VersionCheckerClient {
|
||||
ResourceLocation texture;
|
||||
ResourceLocation texture;
|
||||
|
||||
public VersionCheckerClient() {
|
||||
texture = new ResourceLocation("textures/gui/demo_background.png");
|
||||
}
|
||||
public VersionCheckerClient() {
|
||||
texture = new ResourceLocation("textures/gui/demo_background.png");
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void drawGui(GuiScreenEvent.DrawScreenEvent event){
|
||||
if(event.gui instanceof GuiModList){
|
||||
ArrayList<String> changeLog = Core.INSTANCE.versionChecker.getChangeLogSinceCurrentVersion();
|
||||
String s = "";
|
||||
if(Core.INSTANCE.versionChecker.isChecking){
|
||||
s = "Checking for update...";
|
||||
} else if(Core.INSTANCE.versionChecker.isLatestVersion()){
|
||||
s = "You have the latest version of TechReborn";
|
||||
} else{
|
||||
s = "There is an update for TechReborn with " + changeLog.size() + " changes.";
|
||||
}
|
||||
event.gui.drawString(event.gui.mc.fontRenderer, s, 10, 5, Color.white.getRGB());
|
||||
if(!Core.INSTANCE.versionChecker.isLatestVersion()){
|
||||
if(event.mouseY < 20){
|
||||
GuiUtil.drawTooltipBox(5, 15, 330, changeLog.size() * 10 + 5);
|
||||
int y = 20;
|
||||
for(String change : changeLog){
|
||||
event.gui.drawString(event.gui.mc.fontRenderer, change, 10, y, Color.white.getRGB());
|
||||
y+= 10;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@SubscribeEvent
|
||||
public void drawGui(GuiScreenEvent.DrawScreenEvent event) {
|
||||
if (event.gui instanceof GuiModList) {
|
||||
ArrayList<String> changeLog = Core.INSTANCE.versionChecker.getChangeLogSinceCurrentVersion();
|
||||
String s = "";
|
||||
if (Core.INSTANCE.versionChecker.isChecking) {
|
||||
s = "Checking for update...";
|
||||
} else if (Core.INSTANCE.versionChecker.isLatestVersion()) {
|
||||
s = "You have the latest version of TechReborn";
|
||||
} else {
|
||||
s = "There is an update for TechReborn with " + changeLog.size() + " changes.";
|
||||
}
|
||||
event.gui.drawString(event.gui.mc.fontRenderer, s, 10, 5, Color.white.getRGB());
|
||||
if (!Core.INSTANCE.versionChecker.isLatestVersion()) {
|
||||
if (event.mouseY < 20) {
|
||||
GuiUtil.drawTooltipBox(5, 15, 330, changeLog.size() * 10 + 5);
|
||||
int y = 20;
|
||||
for (String change : changeLog) {
|
||||
event.gui.drawString(event.gui.mc.fontRenderer, change, 10, y, Color.white.getRGB());
|
||||
y += 10;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,83 +9,78 @@ import techreborn.tiles.TileAesu;
|
|||
|
||||
public class ContainerAesu extends TechRebornContainer {
|
||||
|
||||
EntityPlayer player;
|
||||
EntityPlayer player;
|
||||
|
||||
TileAesu tile;
|
||||
TileAesu tile;
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player) {
|
||||
return true;
|
||||
}
|
||||
|
||||
public int euOut;
|
||||
public int storedEu;
|
||||
public int euOut;
|
||||
public int storedEu;
|
||||
public int euChange;
|
||||
|
||||
public ContainerAesu(TileAesu tileaesu,
|
||||
EntityPlayer player)
|
||||
{
|
||||
tile = tileaesu;
|
||||
this.player = player;
|
||||
public ContainerAesu(TileAesu tileaesu,
|
||||
EntityPlayer player) {
|
||||
tile = tileaesu;
|
||||
this.player = player;
|
||||
|
||||
// input
|
||||
this.addSlotToContainer(new Slot(tileaesu.inventory, 0, 116, 23));
|
||||
this.addSlotToContainer(new Slot(tileaesu.inventory, 1, 116, 59));
|
||||
// input
|
||||
this.addSlotToContainer(new Slot(tileaesu.inventory, 0, 116, 23));
|
||||
this.addSlotToContainer(new Slot(tileaesu.inventory, 1, 116, 59));
|
||||
|
||||
int i;
|
||||
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, 7 + j * 16, 84 + i * 18 + 30));
|
||||
}
|
||||
}
|
||||
for (i = 0; i < 3; ++i) {
|
||||
for (int j = 0; j < 9; ++j) {
|
||||
this.addSlotToContainer(new Slot(player.inventory, j + i * 9
|
||||
+ 9, 7 + j * 16, 84 + i * 18 + 30));
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 9; ++i)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 7 + i * 16,
|
||||
142 + 30));
|
||||
}
|
||||
}
|
||||
for (i = 0; i < 9; ++i) {
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 7 + i * 16,
|
||||
142 + 30));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void detectAndSendChanges() {
|
||||
super.detectAndSendChanges();
|
||||
for (int i = 0; i < this.crafters.size(); i++) {
|
||||
ICrafting icrafting = (ICrafting)this.crafters.get(i);
|
||||
if(this.euOut != tile.getMaxOutput()){
|
||||
icrafting.sendProgressBarUpdate(this, 0, (int) tile.getMaxOutput());
|
||||
}
|
||||
if(this.storedEu != tile.getEnergy()){
|
||||
icrafting.sendProgressBarUpdate(this, 1, (int) tile.getEnergy());
|
||||
}
|
||||
if(this.euChange != tile.getEuChange() && tile.getEuChange() != -1){
|
||||
@Override
|
||||
public void detectAndSendChanges() {
|
||||
super.detectAndSendChanges();
|
||||
for (int i = 0; i < this.crafters.size(); i++) {
|
||||
ICrafting icrafting = (ICrafting) this.crafters.get(i);
|
||||
if (this.euOut != tile.getMaxOutput()) {
|
||||
icrafting.sendProgressBarUpdate(this, 0, (int) tile.getMaxOutput());
|
||||
}
|
||||
if (this.storedEu != tile.getEnergy()) {
|
||||
icrafting.sendProgressBarUpdate(this, 1, (int) tile.getEnergy());
|
||||
}
|
||||
if (this.euChange != tile.getEuChange() && tile.getEuChange() != -1) {
|
||||
icrafting.sendProgressBarUpdate(this, 2, (int) tile.getEuChange());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addCraftingToCrafters(ICrafting crafting) {
|
||||
super.addCraftingToCrafters(crafting);
|
||||
crafting.sendProgressBarUpdate(this, 0, (int) tile.getMaxOutput());
|
||||
crafting.sendProgressBarUpdate(this, 1, (int) tile.getEnergy());
|
||||
crafting.sendProgressBarUpdate(this, 2 , (int) tile.getEuChange());
|
||||
}
|
||||
@Override
|
||||
public void addCraftingToCrafters(ICrafting crafting) {
|
||||
super.addCraftingToCrafters(crafting);
|
||||
crafting.sendProgressBarUpdate(this, 0, (int) tile.getMaxOutput());
|
||||
crafting.sendProgressBarUpdate(this, 1, (int) tile.getEnergy());
|
||||
crafting.sendProgressBarUpdate(this, 2, (int) tile.getEuChange());
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void updateProgressBar(int id, int value) {
|
||||
if(id == 0){
|
||||
this.euOut = value;
|
||||
} else if(id == 1){
|
||||
this.storedEu = value;
|
||||
} else if(id == 2){
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void updateProgressBar(int id, int value) {
|
||||
if (id == 0) {
|
||||
this.euOut = value;
|
||||
} else if (id == 1) {
|
||||
this.storedEu = value;
|
||||
} else if (id == 2) {
|
||||
this.euChange = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -7,48 +7,43 @@ import techreborn.tiles.TileAlloyFurnace;
|
|||
|
||||
public class ContainerAlloyFurnace extends TechRebornContainer {
|
||||
|
||||
EntityPlayer player;
|
||||
EntityPlayer player;
|
||||
|
||||
TileAlloyFurnace tile;
|
||||
TileAlloyFurnace tile;
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player) {
|
||||
return true;
|
||||
}
|
||||
|
||||
public int tickTime;
|
||||
public int tickTime;
|
||||
|
||||
public ContainerAlloyFurnace(TileAlloyFurnace tileAlloyfurnace,
|
||||
EntityPlayer player)
|
||||
{
|
||||
tile = tileAlloyfurnace;
|
||||
this.player = player;
|
||||
public ContainerAlloyFurnace(TileAlloyFurnace tileAlloyfurnace,
|
||||
EntityPlayer player) {
|
||||
tile = tileAlloyfurnace;
|
||||
this.player = player;
|
||||
|
||||
// input
|
||||
this.addSlotToContainer(new Slot(tileAlloyfurnace.inventory, 0, 47, 17));
|
||||
this.addSlotToContainer(new Slot(tileAlloyfurnace.inventory, 1, 65, 17));
|
||||
// outputs
|
||||
this.addSlotToContainer(new SlotOutput(tileAlloyfurnace.inventory, 2, 116, 35));
|
||||
// Fuel
|
||||
this.addSlotToContainer(new Slot(tileAlloyfurnace.inventory, 3, 56, 53));
|
||||
// input
|
||||
this.addSlotToContainer(new Slot(tileAlloyfurnace.inventory, 0, 47, 17));
|
||||
this.addSlotToContainer(new Slot(tileAlloyfurnace.inventory, 1, 65, 17));
|
||||
// outputs
|
||||
this.addSlotToContainer(new SlotOutput(tileAlloyfurnace.inventory, 2, 116, 35));
|
||||
// Fuel
|
||||
this.addSlotToContainer(new Slot(tileAlloyfurnace.inventory, 3, 56, 53));
|
||||
|
||||
int i;
|
||||
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));
|
||||
}
|
||||
}
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 9; ++i)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
|
||||
142));
|
||||
}
|
||||
}
|
||||
for (i = 0; i < 9; ++i) {
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
|
||||
142));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -7,55 +7,50 @@ import techreborn.tiles.TileAlloySmelter;
|
|||
|
||||
public class ContainerAlloySmelter extends ContainerCrafting {
|
||||
|
||||
EntityPlayer player;
|
||||
EntityPlayer player;
|
||||
|
||||
TileAlloySmelter tile;
|
||||
TileAlloySmelter tile;
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player) {
|
||||
return true;
|
||||
}
|
||||
|
||||
public int tickTime;
|
||||
public int tickTime;
|
||||
|
||||
public ContainerAlloySmelter(TileAlloySmelter tileAlloysmelter,
|
||||
EntityPlayer player)
|
||||
{
|
||||
public ContainerAlloySmelter(TileAlloySmelter tileAlloysmelter,
|
||||
EntityPlayer player) {
|
||||
super(tileAlloysmelter.crafter);
|
||||
tile = tileAlloysmelter;
|
||||
this.player = player;
|
||||
tile = tileAlloysmelter;
|
||||
this.player = player;
|
||||
|
||||
// input
|
||||
this.addSlotToContainer(new Slot(tileAlloysmelter.inventory, 0, 47, 17));
|
||||
this.addSlotToContainer(new Slot(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));
|
||||
// upgrades
|
||||
this.addSlotToContainer(new Slot(tileAlloysmelter.inventory, 4, 152, 8));
|
||||
this.addSlotToContainer(new Slot(tileAlloysmelter.inventory, 5, 152, 26));
|
||||
this.addSlotToContainer(new Slot(tileAlloysmelter.inventory, 6, 152, 44));
|
||||
this.addSlotToContainer(new Slot(tileAlloysmelter.inventory, 7, 152, 62));
|
||||
// input
|
||||
this.addSlotToContainer(new Slot(tileAlloysmelter.inventory, 0, 47, 17));
|
||||
this.addSlotToContainer(new Slot(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));
|
||||
// upgrades
|
||||
this.addSlotToContainer(new Slot(tileAlloysmelter.inventory, 4, 152, 8));
|
||||
this.addSlotToContainer(new Slot(tileAlloysmelter.inventory, 5, 152, 26));
|
||||
this.addSlotToContainer(new Slot(tileAlloysmelter.inventory, 6, 152, 44));
|
||||
this.addSlotToContainer(new Slot(tileAlloysmelter.inventory, 7, 152, 62));
|
||||
|
||||
|
||||
int i;
|
||||
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));
|
||||
}
|
||||
}
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 9; ++i)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
|
||||
142));
|
||||
}
|
||||
}
|
||||
for (i = 0; i < 9; ++i) {
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
|
||||
142));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -7,54 +7,49 @@ import techreborn.tiles.TileAssemblingMachine;
|
|||
|
||||
public class ContainerAssemblingMachine extends ContainerCrafting {
|
||||
|
||||
EntityPlayer player;
|
||||
EntityPlayer player;
|
||||
|
||||
TileAssemblingMachine tile;
|
||||
TileAssemblingMachine tile;
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player) {
|
||||
return true;
|
||||
}
|
||||
|
||||
public int tickTime;
|
||||
public int tickTime;
|
||||
|
||||
public ContainerAssemblingMachine(TileAssemblingMachine tileAssemblingMachine,
|
||||
EntityPlayer player)
|
||||
{
|
||||
public ContainerAssemblingMachine(TileAssemblingMachine tileAssemblingMachine,
|
||||
EntityPlayer player) {
|
||||
super(tileAssemblingMachine.crafter);
|
||||
tile = tileAssemblingMachine;
|
||||
this.player = player;
|
||||
tile = tileAssemblingMachine;
|
||||
this.player = player;
|
||||
|
||||
// input
|
||||
this.addSlotToContainer(new Slot(tileAssemblingMachine.inventory, 0, 47, 17));
|
||||
this.addSlotToContainer(new Slot(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));
|
||||
// upgrades
|
||||
this.addSlotToContainer(new Slot(tileAssemblingMachine.inventory, 4, 152, 8));
|
||||
this.addSlotToContainer(new Slot(tileAssemblingMachine.inventory, 5, 152, 26));
|
||||
this.addSlotToContainer(new Slot(tileAssemblingMachine.inventory, 6, 152, 44));
|
||||
this.addSlotToContainer(new Slot(tileAssemblingMachine.inventory, 7, 152, 62));
|
||||
// input
|
||||
this.addSlotToContainer(new Slot(tileAssemblingMachine.inventory, 0, 47, 17));
|
||||
this.addSlotToContainer(new Slot(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));
|
||||
// upgrades
|
||||
this.addSlotToContainer(new Slot(tileAssemblingMachine.inventory, 4, 152, 8));
|
||||
this.addSlotToContainer(new Slot(tileAssemblingMachine.inventory, 5, 152, 26));
|
||||
this.addSlotToContainer(new Slot(tileAssemblingMachine.inventory, 6, 152, 44));
|
||||
this.addSlotToContainer(new Slot(tileAssemblingMachine.inventory, 7, 152, 62));
|
||||
|
||||
int i;
|
||||
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));
|
||||
}
|
||||
}
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 9; ++i)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
|
||||
142));
|
||||
}
|
||||
}
|
||||
for (i = 0; i < 9; ++i) {
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
|
||||
142));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -8,58 +8,53 @@ import techreborn.tiles.TileBlastFurnace;
|
|||
|
||||
public class ContainerBlastFurnace extends ContainerCrafting {
|
||||
|
||||
EntityPlayer player;
|
||||
EntityPlayer player;
|
||||
|
||||
TileBlastFurnace tile;
|
||||
TileBlastFurnace tile;
|
||||
|
||||
public int heat;
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player) {
|
||||
return true;
|
||||
}
|
||||
|
||||
public int tickTime;
|
||||
public int tickTime;
|
||||
|
||||
public ContainerBlastFurnace(TileBlastFurnace tileblastfurnace,
|
||||
EntityPlayer player)
|
||||
{
|
||||
public ContainerBlastFurnace(TileBlastFurnace tileblastfurnace,
|
||||
EntityPlayer player) {
|
||||
super(tileblastfurnace.crafter);
|
||||
tile = tileblastfurnace;
|
||||
this.player = player;
|
||||
this.player = player;
|
||||
|
||||
// input
|
||||
this.addSlotToContainer(new Slot(tileblastfurnace.inventory, 0, 40, 25));//Input 1
|
||||
this.addSlotToContainer(new Slot(tileblastfurnace.inventory, 1, 40, 43));//Input 2
|
||||
// outputs
|
||||
this.addSlotToContainer(new SlotOutput(tileblastfurnace.inventory, 2, 100, 35));//Output 1
|
||||
this.addSlotToContainer(new SlotOutput(tileblastfurnace.inventory, 3, 118, 35));//Output 2
|
||||
// input
|
||||
this.addSlotToContainer(new Slot(tileblastfurnace.inventory, 0, 40, 25));//Input 1
|
||||
this.addSlotToContainer(new Slot(tileblastfurnace.inventory, 1, 40, 43));//Input 2
|
||||
// outputs
|
||||
this.addSlotToContainer(new SlotOutput(tileblastfurnace.inventory, 2, 100, 35));//Output 1
|
||||
this.addSlotToContainer(new SlotOutput(tileblastfurnace.inventory, 3, 118, 35));//Output 2
|
||||
|
||||
int i;
|
||||
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));
|
||||
}
|
||||
}
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 9; ++i)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
|
||||
142));
|
||||
}
|
||||
}
|
||||
for (i = 0; i < 9; ++i) {
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
|
||||
142));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void detectAndSendChanges() {
|
||||
super.detectAndSendChanges();
|
||||
for (int i = 0; i < this.crafters.size(); i++) {
|
||||
ICrafting icrafting = (ICrafting)this.crafters.get(i);
|
||||
if(this.heat != tile.getHeat()){
|
||||
ICrafting icrafting = (ICrafting) this.crafters.get(i);
|
||||
if (this.heat != tile.getHeat()) {
|
||||
icrafting.sendProgressBarUpdate(this, 10, tile.getHeat());
|
||||
}
|
||||
}
|
||||
|
@ -73,7 +68,7 @@ public class ContainerBlastFurnace extends ContainerCrafting {
|
|||
|
||||
@Override
|
||||
public void updateProgressBar(int id, int value) {
|
||||
if(id == 10){
|
||||
if (id == 10) {
|
||||
this.heat = value;
|
||||
}
|
||||
super.updateProgressBar(id, value);
|
||||
|
|
|
@ -7,51 +7,50 @@ import techreborn.tiles.TileCentrifuge;
|
|||
|
||||
public class ContainerCentrifuge extends TechRebornContainer {
|
||||
|
||||
EntityPlayer player;
|
||||
EntityPlayer player;
|
||||
|
||||
TileCentrifuge tile;
|
||||
TileCentrifuge tile;
|
||||
|
||||
public int tickTime;
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
public int tickTime;
|
||||
|
||||
public ContainerCentrifuge(TileCentrifuge tileCentrifuge, EntityPlayer player){
|
||||
tile = tileCentrifuge;
|
||||
this.player = player;
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// input
|
||||
this.addSlotToContainer(new Slot(tileCentrifuge.inventory, 0, 80, 35));
|
||||
this.addSlotToContainer(new Slot(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));
|
||||
// upgrades
|
||||
this.addSlotToContainer(new Slot(tileCentrifuge.inventory, 7, 152, 8));
|
||||
this.addSlotToContainer(new Slot(tileCentrifuge.inventory, 8, 152, 26));
|
||||
this.addSlotToContainer(new Slot(tileCentrifuge.inventory, 9, 152, 44));
|
||||
this.addSlotToContainer(new Slot(tileCentrifuge.inventory, 10, 152, 62));
|
||||
public ContainerCentrifuge(TileCentrifuge tileCentrifuge, EntityPlayer player) {
|
||||
tile = tileCentrifuge;
|
||||
this.player = player;
|
||||
|
||||
int i;
|
||||
// input
|
||||
this.addSlotToContainer(new Slot(tileCentrifuge.inventory, 0, 80, 35));
|
||||
this.addSlotToContainer(new Slot(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));
|
||||
// upgrades
|
||||
this.addSlotToContainer(new Slot(tileCentrifuge.inventory, 7, 152, 8));
|
||||
this.addSlotToContainer(new Slot(tileCentrifuge.inventory, 8, 152, 26));
|
||||
this.addSlotToContainer(new Slot(tileCentrifuge.inventory, 9, 152, 44));
|
||||
this.addSlotToContainer(new Slot(tileCentrifuge.inventory, 10, 152, 62));
|
||||
|
||||
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));
|
||||
}
|
||||
}
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 9; ++i){
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
|
||||
142));
|
||||
}
|
||||
}
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 9; ++i) {
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
|
||||
142));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -6,44 +6,39 @@ import techreborn.tiles.TileChargeBench;
|
|||
|
||||
public class ContainerChargeBench extends TechRebornContainer {
|
||||
|
||||
EntityPlayer player;
|
||||
EntityPlayer player;
|
||||
|
||||
TileChargeBench tile;
|
||||
TileChargeBench tile;
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player) {
|
||||
return true;
|
||||
}
|
||||
|
||||
public int tickTime;
|
||||
public int tickTime;
|
||||
|
||||
public ContainerChargeBench(TileChargeBench tileChargeBench, EntityPlayer player)
|
||||
{
|
||||
public ContainerChargeBench(TileChargeBench tileChargeBench, EntityPlayer player) {
|
||||
tile = tileChargeBench;
|
||||
this.player = player;
|
||||
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 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));
|
||||
|
||||
int i;
|
||||
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));
|
||||
}
|
||||
}
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 9; ++i)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 142));
|
||||
}
|
||||
}
|
||||
for (i = 0; i < 9; ++i) {
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 142));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -7,54 +7,49 @@ import techreborn.tiles.TileChemicalReactor;
|
|||
|
||||
public class ContainerChemicalReactor extends ContainerCrafting {
|
||||
|
||||
EntityPlayer player;
|
||||
EntityPlayer player;
|
||||
|
||||
TileChemicalReactor tile;
|
||||
TileChemicalReactor tile;
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player) {
|
||||
return true;
|
||||
}
|
||||
|
||||
public int tickTime;
|
||||
public int tickTime;
|
||||
|
||||
public ContainerChemicalReactor(TileChemicalReactor tilechemicalReactor,
|
||||
EntityPlayer player)
|
||||
{
|
||||
public ContainerChemicalReactor(TileChemicalReactor tilechemicalReactor,
|
||||
EntityPlayer player) {
|
||||
super(tilechemicalReactor.crafter);
|
||||
tile = tilechemicalReactor;
|
||||
this.player = player;
|
||||
tile = tilechemicalReactor;
|
||||
this.player = player;
|
||||
|
||||
// input
|
||||
this.addSlotToContainer(new Slot(tilechemicalReactor.inventory, 0, 70, 21));
|
||||
this.addSlotToContainer(new Slot(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));
|
||||
// upgrades
|
||||
this.addSlotToContainer(new Slot(tilechemicalReactor.inventory, 4, 152, 8));
|
||||
this.addSlotToContainer(new Slot(tilechemicalReactor.inventory, 5, 152, 26));
|
||||
this.addSlotToContainer(new Slot(tilechemicalReactor.inventory, 6, 152, 44));
|
||||
this.addSlotToContainer(new Slot(tilechemicalReactor.inventory, 7, 152, 62));
|
||||
// input
|
||||
this.addSlotToContainer(new Slot(tilechemicalReactor.inventory, 0, 70, 21));
|
||||
this.addSlotToContainer(new Slot(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));
|
||||
// upgrades
|
||||
this.addSlotToContainer(new Slot(tilechemicalReactor.inventory, 4, 152, 8));
|
||||
this.addSlotToContainer(new Slot(tilechemicalReactor.inventory, 5, 152, 26));
|
||||
this.addSlotToContainer(new Slot(tilechemicalReactor.inventory, 6, 152, 44));
|
||||
this.addSlotToContainer(new Slot(tilechemicalReactor.inventory, 7, 152, 62));
|
||||
|
||||
int i;
|
||||
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));
|
||||
}
|
||||
}
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 9; ++i)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
|
||||
142));
|
||||
}
|
||||
}
|
||||
for (i = 0; i < 9; ++i) {
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
|
||||
142));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -4,38 +4,33 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||
import net.minecraft.inventory.Slot;
|
||||
import techreborn.tiles.TileChunkLoader;
|
||||
|
||||
public class ContainerChunkloader extends TechRebornContainer{
|
||||
|
||||
EntityPlayer player;
|
||||
public class ContainerChunkloader extends TechRebornContainer {
|
||||
|
||||
EntityPlayer player;
|
||||
|
||||
|
||||
public ContainerChunkloader(TileChunkLoader tilechunkloader, EntityPlayer player)
|
||||
{
|
||||
this.player = player;
|
||||
|
||||
int i;
|
||||
public ContainerChunkloader(TileChunkLoader tilechunkloader, EntityPlayer player) {
|
||||
this.player = player;
|
||||
|
||||
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));
|
||||
}
|
||||
}
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 9; ++i)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
|
||||
142));
|
||||
}
|
||||
|
||||
}
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer p_75145_1_)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
for (i = 0; i < 9; ++i) {
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
|
||||
142));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer p_75145_1_) {
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -21,15 +21,15 @@ public abstract class ContainerCrafting extends TechRebornContainer {
|
|||
public void detectAndSendChanges() {
|
||||
super.detectAndSendChanges();
|
||||
for (int i = 0; i < this.crafters.size(); i++) {
|
||||
ICrafting icrafting = (ICrafting)this.crafters.get(i);
|
||||
if(this.currentTickTime != crafter.currentTickTime){
|
||||
ICrafting icrafting = (ICrafting) this.crafters.get(i);
|
||||
if (this.currentTickTime != crafter.currentTickTime) {
|
||||
icrafting.sendProgressBarUpdate(this, 0, crafter.currentTickTime);
|
||||
}
|
||||
if(this.currentNeededTicks != crafter.currentNeededTicks){
|
||||
if (this.currentNeededTicks != crafter.currentNeededTicks) {
|
||||
icrafting.sendProgressBarUpdate(this, 1, crafter.currentNeededTicks);
|
||||
}
|
||||
if(this.energy != (int)crafter.energy.getEnergy()){
|
||||
icrafting.sendProgressBarUpdate(this, 2, (int)crafter.energy.getEnergy());
|
||||
if (this.energy != (int) crafter.energy.getEnergy()) {
|
||||
icrafting.sendProgressBarUpdate(this, 2, (int) crafter.energy.getEnergy());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -39,17 +39,17 @@ public abstract class ContainerCrafting extends TechRebornContainer {
|
|||
super.addCraftingToCrafters(crafting);
|
||||
crafting.sendProgressBarUpdate(this, 0, crafter.currentTickTime);
|
||||
crafting.sendProgressBarUpdate(this, 1, crafter.currentNeededTicks);
|
||||
crafting.sendProgressBarUpdate(this, 2, (int)crafter.energy.getEnergy());
|
||||
crafting.sendProgressBarUpdate(this, 2, (int) crafter.energy.getEnergy());
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void updateProgressBar(int id, int value) {
|
||||
if(id == 0){
|
||||
if (id == 0) {
|
||||
this.currentTickTime = value;
|
||||
} else if(id == 1){
|
||||
} else if (id == 1) {
|
||||
this.currentNeededTicks = value;
|
||||
} else if(id == 2){
|
||||
} else if (id == 2) {
|
||||
this.energy = value;
|
||||
}
|
||||
this.crafter.currentTickTime = currentTickTime;
|
||||
|
|
|
@ -8,38 +8,36 @@ import techreborn.init.ModItems;
|
|||
import techreborn.util.Inventory;
|
||||
|
||||
public class ContainerDestructoPack extends TechRebornContainer {
|
||||
|
||||
private EntityPlayer player;
|
||||
private Inventory inv;
|
||||
public ContainerDestructoPack(EntityPlayer player) {
|
||||
this.player = player;
|
||||
inv = new Inventory(1, "destructopack", 64);
|
||||
buildContainer();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer arg0) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
private void buildContainer() {
|
||||
this.addSlotToContainer(new SlotFilteredVoid(inv, 0, 80, 36, new ItemStack[] { new ItemStack(ModItems.parts, 1, 37)}));
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 9; ++i)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
|
||||
142));
|
||||
}
|
||||
}
|
||||
private EntityPlayer player;
|
||||
private Inventory inv;
|
||||
|
||||
public ContainerDestructoPack(EntityPlayer player) {
|
||||
this.player = player;
|
||||
inv = new Inventory(1, "destructopack", 64);
|
||||
buildContainer();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer arg0) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
private void buildContainer() {
|
||||
this.addSlotToContainer(new SlotFilteredVoid(inv, 0, 80, 36, new ItemStack[]{new ItemStack(ModItems.parts, 1, 37)}));
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 9; ++i) {
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
|
||||
142));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,44 +7,39 @@ import techreborn.client.SlotOutput;
|
|||
import techreborn.tiles.TileDieselGenerator;
|
||||
|
||||
public class ContainerDieselGenerator extends TechRebornContainer {
|
||||
public TileDieselGenerator tiledieselGenerator;
|
||||
public EntityPlayer player;
|
||||
public TileDieselGenerator tiledieselGenerator;
|
||||
public EntityPlayer player;
|
||||
|
||||
public ContainerDieselGenerator(TileDieselGenerator tiledieselGenerator,
|
||||
EntityPlayer player)
|
||||
{
|
||||
super();
|
||||
this.tiledieselGenerator = tiledieselGenerator;
|
||||
this.player = player;
|
||||
public ContainerDieselGenerator(TileDieselGenerator tiledieselGenerator,
|
||||
EntityPlayer player) {
|
||||
super();
|
||||
this.tiledieselGenerator = tiledieselGenerator;
|
||||
this.player = player;
|
||||
|
||||
this.addSlotToContainer(new Slot(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));
|
||||
this.addSlotToContainer(new Slot(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));
|
||||
|
||||
int i;
|
||||
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));
|
||||
}
|
||||
}
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 9; ++i)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
|
||||
142));
|
||||
}
|
||||
}
|
||||
for (i = 0; i < 9; ++i) {
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
|
||||
142));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,44 +7,39 @@ import techreborn.client.SlotOutput;
|
|||
import techreborn.tiles.TileDigitalChest;
|
||||
|
||||
public class ContainerDigitalChest extends TechRebornContainer {
|
||||
public TileDigitalChest tileDigitalChest;
|
||||
public EntityPlayer player;
|
||||
public TileDigitalChest tileDigitalChest;
|
||||
public EntityPlayer player;
|
||||
|
||||
public ContainerDigitalChest(TileDigitalChest tileDigitalChest,
|
||||
EntityPlayer player)
|
||||
{
|
||||
super();
|
||||
this.tileDigitalChest = tileDigitalChest;
|
||||
this.player = player;
|
||||
public ContainerDigitalChest(TileDigitalChest tileDigitalChest,
|
||||
EntityPlayer player) {
|
||||
super();
|
||||
this.tileDigitalChest = tileDigitalChest;
|
||||
this.player = player;
|
||||
|
||||
this.addSlotToContainer(new Slot(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));
|
||||
this.addSlotToContainer(new Slot(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));
|
||||
|
||||
int i;
|
||||
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));
|
||||
}
|
||||
}
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 9; ++i)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
|
||||
142));
|
||||
}
|
||||
}
|
||||
for (i = 0; i < 9; ++i) {
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
|
||||
142));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player) {
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
|
@ -32,17 +32,14 @@ public class ContainerFarm extends TechRebornContainer {
|
|||
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 3; ++i)
|
||||
{
|
||||
for (int j = 0; j < 9; ++j)
|
||||
{
|
||||
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 + 27, 84 + i * 18));
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 9; ++i)
|
||||
{
|
||||
for (i = 0; i < 9; ++i) {
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18 + 27,
|
||||
142));
|
||||
}
|
||||
|
|
|
@ -7,44 +7,39 @@ import techreborn.client.SlotOutput;
|
|||
import techreborn.tiles.TileGasTurbine;
|
||||
|
||||
public class ContainerGasTurbine extends TechRebornContainer {
|
||||
public TileGasTurbine tileGasTurbine;
|
||||
public EntityPlayer player;
|
||||
public TileGasTurbine tileGasTurbine;
|
||||
public EntityPlayer player;
|
||||
|
||||
public ContainerGasTurbine(TileGasTurbine tileGasTurbine,
|
||||
EntityPlayer player)
|
||||
{
|
||||
super();
|
||||
this.tileGasTurbine = tileGasTurbine;
|
||||
this.player = player;
|
||||
public ContainerGasTurbine(TileGasTurbine tileGasTurbine,
|
||||
EntityPlayer player) {
|
||||
super();
|
||||
this.tileGasTurbine = tileGasTurbine;
|
||||
this.player = player;
|
||||
|
||||
this.addSlotToContainer(new Slot(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));
|
||||
this.addSlotToContainer(new Slot(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));
|
||||
|
||||
int i;
|
||||
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));
|
||||
}
|
||||
}
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 9; ++i)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
|
||||
142));
|
||||
}
|
||||
}
|
||||
for (i = 0; i < 9; ++i) {
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
|
||||
142));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,54 +5,49 @@ import net.minecraft.inventory.Slot;
|
|||
import techreborn.client.SlotOutput;
|
||||
import techreborn.tiles.TileGrinder;
|
||||
|
||||
public class ContainerGrinder extends ContainerCrafting{
|
||||
|
||||
EntityPlayer player;
|
||||
public class ContainerGrinder extends ContainerCrafting {
|
||||
|
||||
TileGrinder tile;
|
||||
|
||||
public int tickTime;
|
||||
EntityPlayer player;
|
||||
|
||||
public ContainerGrinder(TileGrinder tileGrinder,
|
||||
EntityPlayer player)
|
||||
{
|
||||
super(tileGrinder.crafter);
|
||||
tile = tileGrinder;
|
||||
this.player = player;
|
||||
TileGrinder tile;
|
||||
|
||||
// input
|
||||
this.addSlotToContainer(new Slot(tileGrinder.inventory, 0, 32, 26));
|
||||
this.addSlotToContainer(new Slot(tileGrinder.inventory, 1, 32, 44));
|
||||
public int tickTime;
|
||||
|
||||
public ContainerGrinder(TileGrinder tileGrinder,
|
||||
EntityPlayer player) {
|
||||
super(tileGrinder.crafter);
|
||||
tile = tileGrinder;
|
||||
this.player = player;
|
||||
|
||||
// input
|
||||
this.addSlotToContainer(new Slot(tileGrinder.inventory, 0, 32, 26));
|
||||
this.addSlotToContainer(new Slot(tileGrinder.inventory, 1, 32, 44));
|
||||
|
||||
|
||||
// outputs
|
||||
this.addSlotToContainer(new SlotOutput(tileGrinder.inventory, 2, 77, 35));
|
||||
this.addSlotToContainer(new SlotOutput(tileGrinder.inventory, 3, 95, 35));
|
||||
this.addSlotToContainer(new SlotOutput(tileGrinder.inventory, 4, 113, 35));
|
||||
this.addSlotToContainer(new SlotOutput(tileGrinder.inventory, 5, 131, 35));
|
||||
// outputs
|
||||
this.addSlotToContainer(new SlotOutput(tileGrinder.inventory, 2, 77, 35));
|
||||
this.addSlotToContainer(new SlotOutput(tileGrinder.inventory, 3, 95, 35));
|
||||
this.addSlotToContainer(new SlotOutput(tileGrinder.inventory, 4, 113, 35));
|
||||
this.addSlotToContainer(new SlotOutput(tileGrinder.inventory, 5, 131, 35));
|
||||
|
||||
int i;
|
||||
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));
|
||||
}
|
||||
}
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 9; ++i)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
|
||||
142));
|
||||
}
|
||||
}
|
||||
for (i = 0; i < 9; ++i) {
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
|
||||
142));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer p_75145_1_)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer p_75145_1_) {
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -10,77 +10,77 @@ import techreborn.tiles.idsu.TileIDSU;
|
|||
|
||||
public class ContainerIDSU extends TechRebornContainer {
|
||||
|
||||
EntityPlayer player;
|
||||
EntityPlayer player;
|
||||
|
||||
TileIDSU tile;
|
||||
TileIDSU tile;
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player) {
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player) {
|
||||
return true;
|
||||
}
|
||||
|
||||
public int euOut;
|
||||
public int storedEu;
|
||||
public int euChange;
|
||||
public int channel;
|
||||
public int euOut;
|
||||
public int storedEu;
|
||||
public int euChange;
|
||||
public int channel;
|
||||
|
||||
public ContainerIDSU(TileIDSU tileIDSU,
|
||||
EntityPlayer player) {
|
||||
tile = tileIDSU;
|
||||
this.player = player;
|
||||
public ContainerIDSU(TileIDSU tileIDSU,
|
||||
EntityPlayer player) {
|
||||
tile = tileIDSU;
|
||||
this.player = player;
|
||||
|
||||
int i;
|
||||
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, 7 + j * 16, 84 + i * 18 + 30));
|
||||
}
|
||||
}
|
||||
for (i = 0; i < 3; ++i) {
|
||||
for (int j = 0; j < 9; ++j) {
|
||||
this.addSlotToContainer(new Slot(player.inventory, j + i * 9
|
||||
+ 9, 7 + j * 16, 84 + i * 18 + 30));
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 9; ++i) {
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 7 + i * 16,
|
||||
142 + 30));
|
||||
}
|
||||
}
|
||||
for (i = 0; i < 9; ++i) {
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 7 + i * 16,
|
||||
142 + 30));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void detectAndSendChanges() {
|
||||
super.detectAndSendChanges();
|
||||
for (int i = 0; i < this.crafters.size(); i++) {
|
||||
ICrafting icrafting = (ICrafting) this.crafters.get(i);
|
||||
if (this.euOut != tile.output) {
|
||||
icrafting.sendProgressBarUpdate(this, 0, tile.output);
|
||||
}
|
||||
if (this.storedEu != (int) tile.getEnergy()) {
|
||||
icrafting.sendProgressBarUpdate(this, 1, (int) tile.getEnergy());
|
||||
}
|
||||
if (this.euChange != tile.getEuChange() && tile.getEuChange() != -1) {
|
||||
icrafting.sendProgressBarUpdate(this, 2, (int) tile.getEuChange());
|
||||
}
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void detectAndSendChanges() {
|
||||
super.detectAndSendChanges();
|
||||
for (int i = 0; i < this.crafters.size(); i++) {
|
||||
ICrafting icrafting = (ICrafting) this.crafters.get(i);
|
||||
if (this.euOut != tile.output) {
|
||||
icrafting.sendProgressBarUpdate(this, 0, tile.output);
|
||||
}
|
||||
if (this.storedEu != (int) tile.getEnergy()) {
|
||||
icrafting.sendProgressBarUpdate(this, 1, (int) tile.getEnergy());
|
||||
}
|
||||
if (this.euChange != tile.getEuChange() && tile.getEuChange() != -1) {
|
||||
icrafting.sendProgressBarUpdate(this, 2, (int) tile.getEuChange());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addCraftingToCrafters(ICrafting crafting) {
|
||||
super.addCraftingToCrafters(crafting);
|
||||
crafting.sendProgressBarUpdate(this, 0, tile.output);
|
||||
crafting.sendProgressBarUpdate(this, 1, (int) tile.getEnergy());
|
||||
crafting.sendProgressBarUpdate(this, 2, (int) tile.getEuChange());
|
||||
}
|
||||
@Override
|
||||
public void addCraftingToCrafters(ICrafting crafting) {
|
||||
super.addCraftingToCrafters(crafting);
|
||||
crafting.sendProgressBarUpdate(this, 0, tile.output);
|
||||
crafting.sendProgressBarUpdate(this, 1, (int) tile.getEnergy());
|
||||
crafting.sendProgressBarUpdate(this, 2, (int) tile.getEuChange());
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void updateProgressBar(int id, int value) {
|
||||
if (id == 0) {
|
||||
this.euOut = value;
|
||||
} else if (id == 1) {
|
||||
this.storedEu = value;
|
||||
} else if (id == 2) {
|
||||
this.euChange = value;
|
||||
} else if (id == 3) {
|
||||
this.channel = value;
|
||||
}
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void updateProgressBar(int id, int value) {
|
||||
if (id == 0) {
|
||||
this.euOut = value;
|
||||
} else if (id == 1) {
|
||||
this.storedEu = value;
|
||||
} else if (id == 2) {
|
||||
this.euChange = value;
|
||||
} else if (id == 3) {
|
||||
this.channel = value;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -5,52 +5,47 @@ import net.minecraft.inventory.Slot;
|
|||
import techreborn.client.SlotOutput;
|
||||
import techreborn.tiles.TileImplosionCompressor;
|
||||
|
||||
public class ContainerImplosionCompressor extends ContainerCrafting{
|
||||
|
||||
EntityPlayer player;
|
||||
public class ContainerImplosionCompressor extends ContainerCrafting {
|
||||
|
||||
TileImplosionCompressor tile;
|
||||
EntityPlayer player;
|
||||
|
||||
TileImplosionCompressor tile;
|
||||
|
||||
|
||||
public int tickTime;
|
||||
public int tickTime;
|
||||
|
||||
public ContainerImplosionCompressor(TileImplosionCompressor tilecompressor,
|
||||
EntityPlayer player)
|
||||
{
|
||||
public ContainerImplosionCompressor(TileImplosionCompressor tilecompressor,
|
||||
EntityPlayer player) {
|
||||
super(tilecompressor.crafter);
|
||||
tile = tilecompressor;
|
||||
this.player = player;
|
||||
tile = tilecompressor;
|
||||
this.player = player;
|
||||
|
||||
// input
|
||||
this.addSlotToContainer(new Slot(tilecompressor.inventory, 0, 37, 26));
|
||||
this.addSlotToContainer(new Slot(tilecompressor.inventory, 1, 37, 44));
|
||||
// outputs
|
||||
this.addSlotToContainer(new SlotOutput(tilecompressor.inventory, 2, 93, 35));
|
||||
this.addSlotToContainer(new SlotOutput(tilecompressor.inventory, 3, 111, 35));
|
||||
// input
|
||||
this.addSlotToContainer(new Slot(tilecompressor.inventory, 0, 37, 26));
|
||||
this.addSlotToContainer(new Slot(tilecompressor.inventory, 1, 37, 44));
|
||||
// outputs
|
||||
this.addSlotToContainer(new SlotOutput(tilecompressor.inventory, 2, 93, 35));
|
||||
this.addSlotToContainer(new SlotOutput(tilecompressor.inventory, 3, 111, 35));
|
||||
|
||||
|
||||
int i;
|
||||
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));
|
||||
}
|
||||
}
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 9; ++i)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
|
||||
142));
|
||||
}
|
||||
}
|
||||
for (i = 0; i < 9; ++i) {
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
|
||||
142));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer p_75145_1_)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer p_75145_1_) {
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -7,48 +7,43 @@ import techreborn.tiles.TileIndustrialElectrolyzer;
|
|||
|
||||
public class ContainerIndustrialElectrolyzer extends ContainerCrafting {
|
||||
|
||||
EntityPlayer player;
|
||||
EntityPlayer player;
|
||||
|
||||
TileIndustrialElectrolyzer tile;
|
||||
TileIndustrialElectrolyzer tile;
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player) {
|
||||
return true;
|
||||
}
|
||||
|
||||
public int tickTime;
|
||||
public int tickTime;
|
||||
|
||||
public ContainerIndustrialElectrolyzer(TileIndustrialElectrolyzer electrolyzer, EntityPlayer player)
|
||||
{
|
||||
super(electrolyzer.crafter);
|
||||
tile = electrolyzer;
|
||||
this.player = player;
|
||||
public ContainerIndustrialElectrolyzer(TileIndustrialElectrolyzer electrolyzer, EntityPlayer player) {
|
||||
super(electrolyzer.crafter);
|
||||
tile = electrolyzer;
|
||||
this.player = player;
|
||||
|
||||
// input
|
||||
this.addSlotToContainer(new Slot(electrolyzer.inventory, 0, 80, 51));
|
||||
this.addSlotToContainer(new Slot(electrolyzer.inventory, 1, 50, 51));
|
||||
// outputs
|
||||
this.addSlotToContainer(new SlotOutput(electrolyzer.inventory, 2, 50, 19));
|
||||
this.addSlotToContainer(new SlotOutput(electrolyzer.inventory, 3, 70, 19));
|
||||
this.addSlotToContainer(new SlotOutput(electrolyzer.inventory, 4, 90, 19));
|
||||
this.addSlotToContainer(new SlotOutput(electrolyzer.inventory, 5, 110, 19));
|
||||
// input
|
||||
this.addSlotToContainer(new Slot(electrolyzer.inventory, 0, 80, 51));
|
||||
this.addSlotToContainer(new Slot(electrolyzer.inventory, 1, 50, 51));
|
||||
// outputs
|
||||
this.addSlotToContainer(new SlotOutput(electrolyzer.inventory, 2, 50, 19));
|
||||
this.addSlotToContainer(new SlotOutput(electrolyzer.inventory, 3, 70, 19));
|
||||
this.addSlotToContainer(new SlotOutput(electrolyzer.inventory, 4, 90, 19));
|
||||
this.addSlotToContainer(new SlotOutput(electrolyzer.inventory, 5, 110, 19));
|
||||
|
||||
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));
|
||||
}
|
||||
}
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 9; ++i)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
|
||||
142));
|
||||
}
|
||||
}
|
||||
for (i = 0; i < 9; ++i) {
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
|
||||
142));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -7,50 +7,45 @@ import techreborn.tiles.TileIndustrialSawmill;
|
|||
|
||||
public class ContainerIndustrialSawmill extends ContainerCrafting {
|
||||
|
||||
EntityPlayer player;
|
||||
EntityPlayer player;
|
||||
|
||||
TileIndustrialSawmill tile;
|
||||
TileIndustrialSawmill tile;
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player) {
|
||||
return true;
|
||||
}
|
||||
|
||||
public int tickTime;
|
||||
public int tickTime;
|
||||
|
||||
public ContainerIndustrialSawmill(TileIndustrialSawmill tileIndustrialSawmill,
|
||||
EntityPlayer player)
|
||||
{
|
||||
public ContainerIndustrialSawmill(TileIndustrialSawmill tileIndustrialSawmill,
|
||||
EntityPlayer player) {
|
||||
super(tileIndustrialSawmill.crafter);
|
||||
tile = tileIndustrialSawmill;
|
||||
this.player = player;
|
||||
tile = tileIndustrialSawmill;
|
||||
this.player = player;
|
||||
|
||||
// input
|
||||
this.addSlotToContainer(new Slot(tileIndustrialSawmill.inventory, 0, 32, 26));
|
||||
this.addSlotToContainer(new Slot(tileIndustrialSawmill.inventory, 1, 32, 44));
|
||||
// outputs
|
||||
this.addSlotToContainer(new SlotOutput(tileIndustrialSawmill.inventory, 2,84, 35));
|
||||
this.addSlotToContainer(new SlotOutput(tileIndustrialSawmill.inventory, 3,102, 35));
|
||||
this.addSlotToContainer(new SlotOutput(tileIndustrialSawmill.inventory, 4,120, 35));
|
||||
// input
|
||||
this.addSlotToContainer(new Slot(tileIndustrialSawmill.inventory, 0, 32, 26));
|
||||
this.addSlotToContainer(new Slot(tileIndustrialSawmill.inventory, 1, 32, 44));
|
||||
// outputs
|
||||
this.addSlotToContainer(new SlotOutput(tileIndustrialSawmill.inventory, 2, 84, 35));
|
||||
this.addSlotToContainer(new SlotOutput(tileIndustrialSawmill.inventory, 3, 102, 35));
|
||||
this.addSlotToContainer(new SlotOutput(tileIndustrialSawmill.inventory, 4, 120, 35));
|
||||
|
||||
|
||||
int i;
|
||||
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));
|
||||
}
|
||||
}
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 9; ++i)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
|
||||
142));
|
||||
}
|
||||
}
|
||||
for (i = 0; i < 9; ++i) {
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
|
||||
142));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -7,53 +7,48 @@ import techreborn.tiles.TileLathe;
|
|||
|
||||
public class ContainerLathe extends ContainerCrafting {
|
||||
|
||||
EntityPlayer player;
|
||||
EntityPlayer player;
|
||||
|
||||
TileLathe tile;
|
||||
TileLathe tile;
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player) {
|
||||
return true;
|
||||
}
|
||||
|
||||
public int tickTime;
|
||||
public int tickTime;
|
||||
|
||||
public ContainerLathe(TileLathe tilelathe,
|
||||
EntityPlayer player)
|
||||
{
|
||||
public ContainerLathe(TileLathe tilelathe,
|
||||
EntityPlayer player) {
|
||||
super(tilelathe.crafter);
|
||||
tile = tilelathe;
|
||||
this.player = player;
|
||||
tile = tilelathe;
|
||||
this.player = player;
|
||||
|
||||
// input
|
||||
this.addSlotToContainer(new Slot(tilelathe.inventory, 0, 56, 17));
|
||||
// outputs
|
||||
this.addSlotToContainer(new SlotOutput(tilelathe.inventory, 1, 116, 35));
|
||||
// power
|
||||
this.addSlotToContainer(new Slot(tilelathe.inventory, 2, 56, 53));
|
||||
// upgrades
|
||||
this.addSlotToContainer(new Slot(tilelathe.inventory, 3, 152, 8));
|
||||
this.addSlotToContainer(new Slot(tilelathe.inventory, 4, 152, 26));
|
||||
this.addSlotToContainer(new Slot(tilelathe.inventory, 5, 152, 44));
|
||||
this.addSlotToContainer(new Slot(tilelathe.inventory, 6, 152, 62));
|
||||
// input
|
||||
this.addSlotToContainer(new Slot(tilelathe.inventory, 0, 56, 17));
|
||||
// outputs
|
||||
this.addSlotToContainer(new SlotOutput(tilelathe.inventory, 1, 116, 35));
|
||||
// power
|
||||
this.addSlotToContainer(new Slot(tilelathe.inventory, 2, 56, 53));
|
||||
// upgrades
|
||||
this.addSlotToContainer(new Slot(tilelathe.inventory, 3, 152, 8));
|
||||
this.addSlotToContainer(new Slot(tilelathe.inventory, 4, 152, 26));
|
||||
this.addSlotToContainer(new Slot(tilelathe.inventory, 5, 152, 44));
|
||||
this.addSlotToContainer(new Slot(tilelathe.inventory, 6, 152, 62));
|
||||
|
||||
int i;
|
||||
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));
|
||||
}
|
||||
}
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 9; ++i)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
|
||||
142));
|
||||
}
|
||||
}
|
||||
for (i = 0; i < 9; ++i) {
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
|
||||
142));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -15,8 +15,7 @@ public class ContainerLesu extends TechRebornContainer {
|
|||
TileLesu tile;
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player)
|
||||
{
|
||||
public boolean canInteractWith(EntityPlayer player) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -27,8 +26,7 @@ public class ContainerLesu extends TechRebornContainer {
|
|||
public double euStorage;
|
||||
|
||||
public ContainerLesu(TileLesu tileaesu,
|
||||
EntityPlayer player)
|
||||
{
|
||||
EntityPlayer player) {
|
||||
tile = tileaesu;
|
||||
this.player = player;
|
||||
|
||||
|
@ -38,17 +36,14 @@ public class ContainerLesu extends TechRebornContainer {
|
|||
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 3; ++i)
|
||||
{
|
||||
for (int j = 0; j < 9; ++j)
|
||||
{
|
||||
for (i = 0; i < 3; ++i) {
|
||||
for (int j = 0; j < 9; ++j) {
|
||||
this.addSlotToContainer(new Slot(player.inventory, j + i * 9
|
||||
+ 9, 7 + j * 16, 84 + i * 18 + 30));
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 9; ++i)
|
||||
{
|
||||
for (i = 0; i < 9; ++i) {
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 7 + i * 16,
|
||||
142 + 30));
|
||||
}
|
||||
|
@ -58,17 +53,17 @@ public class ContainerLesu extends TechRebornContainer {
|
|||
public void detectAndSendChanges() {
|
||||
super.detectAndSendChanges();
|
||||
for (int i = 0; i < this.crafters.size(); i++) {
|
||||
ICrafting icrafting = (ICrafting)this.crafters.get(i);
|
||||
if(this.euOut != tile.getMaxOutput()){
|
||||
ICrafting icrafting = (ICrafting) this.crafters.get(i);
|
||||
if (this.euOut != tile.getMaxOutput()) {
|
||||
icrafting.sendProgressBarUpdate(this, 0, (int) tile.getMaxOutput());
|
||||
}
|
||||
if(this.storedEu != tile.getEnergy()){
|
||||
if (this.storedEu != tile.getEnergy()) {
|
||||
icrafting.sendProgressBarUpdate(this, 1, (int) tile.getEnergy());
|
||||
}
|
||||
if(this.euChange != tile.getEuChange() && tile.getEuChange() != -1){
|
||||
if (this.euChange != tile.getEuChange() && tile.getEuChange() != -1) {
|
||||
icrafting.sendProgressBarUpdate(this, 2, (int) tile.getEuChange());
|
||||
}
|
||||
if(this.connectedBlocks != tile.connectedBlocks){
|
||||
if (this.connectedBlocks != tile.connectedBlocks) {
|
||||
icrafting.sendProgressBarUpdate(this, 3, tile.connectedBlocks);
|
||||
}
|
||||
}
|
||||
|
@ -79,22 +74,22 @@ public class ContainerLesu extends TechRebornContainer {
|
|||
super.addCraftingToCrafters(crafting);
|
||||
crafting.sendProgressBarUpdate(this, 0, (int) tile.getMaxOutput());
|
||||
crafting.sendProgressBarUpdate(this, 1, (int) tile.getEnergy());
|
||||
crafting.sendProgressBarUpdate(this, 2 , (int) tile.getEuChange());
|
||||
crafting.sendProgressBarUpdate(this, 3 , tile.connectedBlocks);
|
||||
crafting.sendProgressBarUpdate(this, 2, (int) tile.getEuChange());
|
||||
crafting.sendProgressBarUpdate(this, 3, tile.connectedBlocks);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void updateProgressBar(int id, int value) {
|
||||
if(id == 0){
|
||||
if (id == 0) {
|
||||
this.euOut = value;
|
||||
} else if(id == 1){
|
||||
} else if (id == 1) {
|
||||
this.storedEu = value;
|
||||
} else if(id == 2){
|
||||
} else if (id == 2) {
|
||||
this.euChange = value;
|
||||
} else if(id == 3){
|
||||
} else if (id == 3) {
|
||||
this.connectedBlocks = value;
|
||||
} else if(id == 4){
|
||||
} else if (id == 4) {
|
||||
this.euStorage = value;
|
||||
}
|
||||
this.euStorage = ((connectedBlocks + 1) * ConfigTechReborn.lesuStoragePerBlock);
|
||||
|
|
|
@ -8,86 +8,81 @@ import net.minecraft.inventory.Slot;
|
|||
import techreborn.client.SlotOutput;
|
||||
import techreborn.tiles.TileMatterFabricator;
|
||||
|
||||
public class ContainerMatterFabricator extends TechRebornContainer{
|
||||
|
||||
EntityPlayer player;
|
||||
public class ContainerMatterFabricator extends TechRebornContainer {
|
||||
|
||||
TileMatterFabricator tile;
|
||||
EntityPlayer player;
|
||||
|
||||
public int progressTime;
|
||||
TileMatterFabricator tile;
|
||||
|
||||
public ContainerMatterFabricator(TileMatterFabricator tileMatterfab,
|
||||
EntityPlayer player)
|
||||
{
|
||||
tile = tileMatterfab;
|
||||
this.player = player;
|
||||
public int progressTime;
|
||||
|
||||
// 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));
|
||||
public ContainerMatterFabricator(TileMatterFabricator tileMatterfab,
|
||||
EntityPlayer player) {
|
||||
tile = tileMatterfab;
|
||||
this.player = player;
|
||||
|
||||
// outputs
|
||||
this.addSlotToContainer(new SlotOutput(tileMatterfab.inventory, 6,
|
||||
116, 35));
|
||||
// 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));
|
||||
|
||||
int i;
|
||||
// outputs
|
||||
this.addSlotToContainer(new SlotOutput(tileMatterfab.inventory, 6,
|
||||
116, 35));
|
||||
|
||||
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));
|
||||
}
|
||||
}
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 9; ++i)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
|
||||
142));
|
||||
}
|
||||
}
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer p_75145_1_)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
for (i = 0; i < 9; ++i) {
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
|
||||
142));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void detectAndSendChanges() {
|
||||
super.detectAndSendChanges();
|
||||
for (int i = 0; i < this.crafters.size(); i++) {
|
||||
ICrafting icrafting = (ICrafting) this.crafters.get(i);
|
||||
if (this.progressTime != tile.progresstime) {
|
||||
icrafting.sendProgressBarUpdate(this, 0, tile.progresstime);
|
||||
}
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer p_75145_1_) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addCraftingToCrafters(ICrafting crafting) {
|
||||
super.addCraftingToCrafters(crafting);
|
||||
crafting.sendProgressBarUpdate(this, 0, tile.progresstime);
|
||||
}
|
||||
@Override
|
||||
public void detectAndSendChanges() {
|
||||
super.detectAndSendChanges();
|
||||
for (int i = 0; i < this.crafters.size(); i++) {
|
||||
ICrafting icrafting = (ICrafting) this.crafters.get(i);
|
||||
if (this.progressTime != tile.progresstime) {
|
||||
icrafting.sendProgressBarUpdate(this, 0, tile.progresstime);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void updateProgressBar(int id, int value) {
|
||||
if (id == 0) {
|
||||
this.progressTime = value;
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void addCraftingToCrafters(ICrafting crafting) {
|
||||
super.addCraftingToCrafters(crafting);
|
||||
crafting.sendProgressBarUpdate(this, 0, tile.progresstime);
|
||||
}
|
||||
|
||||
public int getProgressScaled(int scale) {
|
||||
if(progressTime != 0) {
|
||||
return progressTime * scale / tile.maxProgresstime();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void updateProgressBar(int id, int value) {
|
||||
if (id == 0) {
|
||||
this.progressTime = value;
|
||||
}
|
||||
}
|
||||
|
||||
public int getProgressScaled(int scale) {
|
||||
if (progressTime != 0) {
|
||||
return progressTime * scale / tile.maxProgresstime();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -4,16 +4,15 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||
|
||||
public class ContainerPda extends TechRebornContainer {
|
||||
|
||||
EntityPlayer player;
|
||||
public ContainerPda(EntityPlayer player)
|
||||
{
|
||||
|
||||
}
|
||||
EntityPlayer player;
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
public ContainerPda(EntityPlayer player) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player) {
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -7,53 +7,48 @@ import techreborn.tiles.TilePlateCuttingMachine;
|
|||
|
||||
public class ContainerPlateCuttingMachine extends ContainerCrafting {
|
||||
|
||||
EntityPlayer player;
|
||||
EntityPlayer player;
|
||||
|
||||
TilePlateCuttingMachine platecuttingmachine;
|
||||
TilePlateCuttingMachine platecuttingmachine;
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player) {
|
||||
return true;
|
||||
}
|
||||
|
||||
public int tickTime;
|
||||
public int tickTime;
|
||||
|
||||
public ContainerPlateCuttingMachine(TilePlateCuttingMachine tileplatecuttingmachine,
|
||||
EntityPlayer player)
|
||||
{
|
||||
public ContainerPlateCuttingMachine(TilePlateCuttingMachine tileplatecuttingmachine,
|
||||
EntityPlayer player) {
|
||||
super(tileplatecuttingmachine.crafter);
|
||||
platecuttingmachine = tileplatecuttingmachine;
|
||||
this.player = player;
|
||||
platecuttingmachine = tileplatecuttingmachine;
|
||||
this.player = player;
|
||||
|
||||
// input
|
||||
this.addSlotToContainer(new Slot(tileplatecuttingmachine.inventory, 0, 56, 17));
|
||||
// outputs
|
||||
this.addSlotToContainer(new SlotOutput(tileplatecuttingmachine.inventory, 1, 116, 35));
|
||||
// power
|
||||
this.addSlotToContainer(new Slot(tileplatecuttingmachine.inventory, 2, 56, 53));
|
||||
// upgrades
|
||||
this.addSlotToContainer(new Slot(tileplatecuttingmachine.inventory, 3, 152, 8));
|
||||
this.addSlotToContainer(new Slot(tileplatecuttingmachine.inventory, 4, 152, 26));
|
||||
this.addSlotToContainer(new Slot(tileplatecuttingmachine.inventory, 5, 152, 44));
|
||||
this.addSlotToContainer(new Slot(tileplatecuttingmachine.inventory, 6, 152, 62));
|
||||
// input
|
||||
this.addSlotToContainer(new Slot(tileplatecuttingmachine.inventory, 0, 56, 17));
|
||||
// outputs
|
||||
this.addSlotToContainer(new SlotOutput(tileplatecuttingmachine.inventory, 1, 116, 35));
|
||||
// power
|
||||
this.addSlotToContainer(new Slot(tileplatecuttingmachine.inventory, 2, 56, 53));
|
||||
// upgrades
|
||||
this.addSlotToContainer(new Slot(tileplatecuttingmachine.inventory, 3, 152, 8));
|
||||
this.addSlotToContainer(new Slot(tileplatecuttingmachine.inventory, 4, 152, 26));
|
||||
this.addSlotToContainer(new Slot(tileplatecuttingmachine.inventory, 5, 152, 44));
|
||||
this.addSlotToContainer(new Slot(tileplatecuttingmachine.inventory, 6, 152, 62));
|
||||
|
||||
int i;
|
||||
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));
|
||||
}
|
||||
}
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 9; ++i)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
|
||||
142));
|
||||
}
|
||||
}
|
||||
for (i = 0; i < 9; ++i) {
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
|
||||
142));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -7,44 +7,39 @@ import techreborn.client.SlotOutput;
|
|||
import techreborn.tiles.TileQuantumChest;
|
||||
|
||||
public class ContainerQuantumChest extends TechRebornContainer {
|
||||
public TileQuantumChest tileQuantumChest;
|
||||
public EntityPlayer player;
|
||||
public TileQuantumChest tileQuantumChest;
|
||||
public EntityPlayer player;
|
||||
|
||||
public ContainerQuantumChest(TileQuantumChest tileQuantumChest,
|
||||
EntityPlayer player)
|
||||
{
|
||||
super();
|
||||
this.tileQuantumChest = tileQuantumChest;
|
||||
this.player = player;
|
||||
public ContainerQuantumChest(TileQuantumChest tileQuantumChest,
|
||||
EntityPlayer player) {
|
||||
super();
|
||||
this.tileQuantumChest = tileQuantumChest;
|
||||
this.player = player;
|
||||
|
||||
this.addSlotToContainer(new Slot(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));
|
||||
this.addSlotToContainer(new Slot(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));
|
||||
|
||||
int i;
|
||||
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));
|
||||
}
|
||||
}
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 9; ++i)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
|
||||
142));
|
||||
}
|
||||
}
|
||||
for (i = 0; i < 9; ++i) {
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
|
||||
142));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player) {
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -8,43 +8,38 @@ import techreborn.client.SlotOutput;
|
|||
import techreborn.tiles.TileQuantumTank;
|
||||
|
||||
public class ContainerQuantumTank extends TechRebornContainer {
|
||||
public TileQuantumTank tileQuantumTank;
|
||||
public EntityPlayer player;
|
||||
public TileQuantumTank tileQuantumTank;
|
||||
public EntityPlayer player;
|
||||
|
||||
public ContainerQuantumTank(TileQuantumTank tileQuantumTank,
|
||||
EntityPlayer player)
|
||||
{
|
||||
super();
|
||||
this.tileQuantumTank = tileQuantumTank;
|
||||
this.player = player;
|
||||
public ContainerQuantumTank(TileQuantumTank tileQuantumTank,
|
||||
EntityPlayer player) {
|
||||
super();
|
||||
this.tileQuantumTank = tileQuantumTank;
|
||||
this.player = player;
|
||||
|
||||
this.addSlotToContainer(new SlotFluid(tileQuantumTank.inventory, 0, 80, 17));
|
||||
this.addSlotToContainer(new SlotOutput(tileQuantumTank.inventory, 1,
|
||||
80, 53));
|
||||
this.addSlotToContainer(new SlotFake(tileQuantumTank.inventory, 2, 59,
|
||||
42, false, false, 1));
|
||||
this.addSlotToContainer(new SlotFluid(tileQuantumTank.inventory, 0, 80, 17));
|
||||
this.addSlotToContainer(new SlotOutput(tileQuantumTank.inventory, 1,
|
||||
80, 53));
|
||||
this.addSlotToContainer(new SlotFake(tileQuantumTank.inventory, 2, 59,
|
||||
42, false, false, 1));
|
||||
|
||||
int i;
|
||||
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));
|
||||
}
|
||||
}
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 9; ++i)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
|
||||
142));
|
||||
}
|
||||
}
|
||||
for (i = 0; i < 9; ++i) {
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
|
||||
142));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,63 +11,55 @@ import techreborn.tiles.TileRollingMachine;
|
|||
|
||||
public class ContainerRollingMachine extends TechRebornContainer {
|
||||
|
||||
EntityPlayer player;
|
||||
TileRollingMachine tile;
|
||||
EntityPlayer player;
|
||||
TileRollingMachine tile;
|
||||
|
||||
public ContainerRollingMachine(TileRollingMachine tileRollingmachine,
|
||||
EntityPlayer player)
|
||||
{
|
||||
tile = tileRollingmachine;
|
||||
this.player = player;
|
||||
public ContainerRollingMachine(TileRollingMachine tileRollingmachine,
|
||||
EntityPlayer player) {
|
||||
tile = tileRollingmachine;
|
||||
this.player = player;
|
||||
|
||||
for (int l = 0; l < 3; l++)
|
||||
{
|
||||
for (int k1 = 0; k1 < 3; k1++)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(
|
||||
tileRollingmachine.craftMatrix, k1 + l * 3,
|
||||
30 + k1 * 18, 17 + l * 18));
|
||||
}
|
||||
}
|
||||
for (int l = 0; l < 3; l++) {
|
||||
for (int k1 = 0; k1 < 3; k1++) {
|
||||
this.addSlotToContainer(new Slot(
|
||||
tileRollingmachine.craftMatrix, k1 + l * 3,
|
||||
30 + k1 * 18, 17 + l * 18));
|
||||
}
|
||||
}
|
||||
|
||||
// output
|
||||
this.addSlotToContainer(new SlotOutput(tileRollingmachine.inventory, 0,
|
||||
124, 35));
|
||||
// output
|
||||
this.addSlotToContainer(new SlotOutput(tileRollingmachine.inventory, 0,
|
||||
124, 35));
|
||||
|
||||
// fakeOutput
|
||||
this.addSlotToContainer(new SlotFake(tileRollingmachine.inventory, 1,
|
||||
124, 10, false, false, 1));
|
||||
// fakeOutput
|
||||
this.addSlotToContainer(new SlotFake(tileRollingmachine.inventory, 1,
|
||||
124, 10, false, false, 1));
|
||||
|
||||
int i;
|
||||
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));
|
||||
}
|
||||
}
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 9; ++i)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
|
||||
142));
|
||||
}
|
||||
}
|
||||
for (i = 0; i < 9; ++i) {
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
|
||||
142));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void onCraftMatrixChanged(IInventory inv)
|
||||
{
|
||||
ItemStack output = RollingMachineRecipe.instance.findMatchingRecipe(
|
||||
tile.craftMatrix, tile.getWorldObj());
|
||||
tile.inventory.setInventorySlotContents(1, output);
|
||||
}
|
||||
@Override
|
||||
public final void onCraftMatrixChanged(IInventory inv) {
|
||||
ItemStack output = RollingMachineRecipe.instance.findMatchingRecipe(
|
||||
tile.craftMatrix, tile.getWorldObj());
|
||||
tile.inventory.setInventorySlotContents(1, output);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -7,44 +7,39 @@ import techreborn.client.SlotOutput;
|
|||
import techreborn.tiles.TileSemifluidGenerator;
|
||||
|
||||
public class ContainerSemifluidGenerator extends TechRebornContainer {
|
||||
public TileSemifluidGenerator tileSemifluidGenerator;
|
||||
public EntityPlayer player;
|
||||
public TileSemifluidGenerator tileSemifluidGenerator;
|
||||
public EntityPlayer player;
|
||||
|
||||
public ContainerSemifluidGenerator(TileSemifluidGenerator tileSemifluidGenerator,
|
||||
EntityPlayer player)
|
||||
{
|
||||
super();
|
||||
this.tileSemifluidGenerator = tileSemifluidGenerator;
|
||||
this.player = player;
|
||||
public ContainerSemifluidGenerator(TileSemifluidGenerator tileSemifluidGenerator,
|
||||
EntityPlayer player) {
|
||||
super();
|
||||
this.tileSemifluidGenerator = tileSemifluidGenerator;
|
||||
this.player = player;
|
||||
|
||||
this.addSlotToContainer(new Slot(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));
|
||||
this.addSlotToContainer(new Slot(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));
|
||||
|
||||
int i;
|
||||
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));
|
||||
}
|
||||
}
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 9; ++i)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
|
||||
142));
|
||||
}
|
||||
}
|
||||
for (i = 0; i < 9; ++i) {
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
|
||||
142));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,44 +8,39 @@ import techreborn.client.SlotOutput;
|
|||
import techreborn.tiles.TileThermalGenerator;
|
||||
|
||||
public class ContainerThermalGenerator extends TechRebornContainer {
|
||||
public TileThermalGenerator tileThermalGenerator;
|
||||
public EntityPlayer player;
|
||||
public TileThermalGenerator tileThermalGenerator;
|
||||
public EntityPlayer player;
|
||||
|
||||
public ContainerThermalGenerator(TileThermalGenerator tileThermalGenerator,
|
||||
EntityPlayer player)
|
||||
{
|
||||
super();
|
||||
this.tileThermalGenerator = tileThermalGenerator;
|
||||
this.player = player;
|
||||
public ContainerThermalGenerator(TileThermalGenerator tileThermalGenerator,
|
||||
EntityPlayer player) {
|
||||
super();
|
||||
this.tileThermalGenerator = tileThermalGenerator;
|
||||
this.player = player;
|
||||
|
||||
this.addSlotToContainer(new SlotFluid(tileThermalGenerator.inventory, 0, 80,
|
||||
17));
|
||||
this.addSlotToContainer(new SlotOutput(tileThermalGenerator.inventory,
|
||||
1, 80, 53));
|
||||
this.addSlotToContainer(new SlotFake(tileThermalGenerator.inventory, 2,
|
||||
59, 42, false, false, 1));
|
||||
this.addSlotToContainer(new SlotFluid(tileThermalGenerator.inventory, 0, 80,
|
||||
17));
|
||||
this.addSlotToContainer(new SlotOutput(tileThermalGenerator.inventory,
|
||||
1, 80, 53));
|
||||
this.addSlotToContainer(new SlotFake(tileThermalGenerator.inventory, 2,
|
||||
59, 42, false, false, 1));
|
||||
|
||||
int i;
|
||||
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));
|
||||
}
|
||||
}
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 9; ++i)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
|
||||
142));
|
||||
}
|
||||
}
|
||||
for (i = 0; i < 9; ++i) {
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
|
||||
142));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -84,22 +84,19 @@ public abstract class TechRebornContainer extends Container {
|
|||
return changed;
|
||||
}
|
||||
|
||||
private boolean tryShiftItem(ItemStack stackToShift, int numSlots)
|
||||
{
|
||||
for (int machineIndex = 0; machineIndex < numSlots - 9 * 4; machineIndex++)
|
||||
{
|
||||
Slot slot = (Slot) inventorySlots.get(machineIndex);
|
||||
if (slot instanceof SlotFake)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if (!slot.isItemValid(stackToShift))
|
||||
continue;
|
||||
if (shiftItemStack(stackToShift, machineIndex, machineIndex + 1))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
private boolean tryShiftItem(ItemStack stackToShift, int numSlots) {
|
||||
for (int machineIndex = 0; machineIndex < numSlots - 9 * 4; machineIndex++) {
|
||||
Slot slot = (Slot) inventorySlots.get(machineIndex);
|
||||
if (slot instanceof SlotFake) {
|
||||
continue;
|
||||
}
|
||||
if (!slot.isItemValid(stackToShift))
|
||||
continue;
|
||||
if (shiftItemStack(stackToShift, machineIndex, machineIndex + 1))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean canStacksMerge(ItemStack stack1, ItemStack stack2) {
|
||||
if (stack1 == null || stack2 == null) {
|
||||
|
|
|
@ -14,57 +14,54 @@ import java.awt.*;
|
|||
|
||||
public class GuiAesu extends GuiContainer {
|
||||
|
||||
private static final ResourceLocation texture = new ResourceLocation(
|
||||
"techreborn", "textures/gui/aesu.png");
|
||||
private static final ResourceLocation texture = new ResourceLocation(
|
||||
"techreborn", "textures/gui/aesu.png");
|
||||
|
||||
TileAesu aesu;
|
||||
TileAesu aesu;
|
||||
|
||||
ContainerAesu containerAesu;
|
||||
ContainerAesu containerAesu;
|
||||
|
||||
public GuiAesu(EntityPlayer player,
|
||||
TileAesu tileaesu)
|
||||
{
|
||||
super(new ContainerAesu(tileaesu, player));
|
||||
this.xSize = 156;
|
||||
this.ySize = 200;
|
||||
aesu = tileaesu;
|
||||
this.containerAesu = (ContainerAesu) this.inventorySlots;
|
||||
}
|
||||
public GuiAesu(EntityPlayer player,
|
||||
TileAesu tileaesu) {
|
||||
super(new ContainerAesu(tileaesu, player));
|
||||
this.xSize = 156;
|
||||
this.ySize = 200;
|
||||
aesu = tileaesu;
|
||||
this.containerAesu = (ContainerAesu) this.inventorySlots;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initGui() {
|
||||
super.initGui();
|
||||
this.buttonList.clear();
|
||||
int k = (this.width - this.xSize) / 2;
|
||||
int l = (this.height - this.ySize) / 2;
|
||||
this.buttonList.add(new GuiButton(0, k + 96, l + 8, 18, 20, "++"));
|
||||
this.buttonList.add(new GuiButton(1, k + 96, l + 8 + 22, 18, 20, "+"));
|
||||
this.buttonList.add(new GuiButton(2, k + 96, l + 8 + (22*2), 18, 20, "-"));
|
||||
this.buttonList.add(new GuiButton(3, k + 96, l + 8 + (22*3), 18, 20, "--"));
|
||||
}
|
||||
@Override
|
||||
public void initGui() {
|
||||
super.initGui();
|
||||
this.buttonList.clear();
|
||||
int k = (this.width - this.xSize) / 2;
|
||||
int l = (this.height - this.ySize) / 2;
|
||||
this.buttonList.add(new GuiButton(0, k + 96, l + 8, 18, 20, "++"));
|
||||
this.buttonList.add(new GuiButton(1, k + 96, l + 8 + 22, 18, 20, "+"));
|
||||
this.buttonList.add(new GuiButton(2, k + 96, l + 8 + (22 * 2), 18, 20, "-"));
|
||||
this.buttonList.add(new GuiButton(3, k + 96, l + 8 + (22 * 3), 18, 20, "--"));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_,
|
||||
int p_146976_2_, int p_146976_3_)
|
||||
{
|
||||
this.mc.getTextureManager().bindTexture(texture);
|
||||
int k = (this.width - this.xSize) / 2;
|
||||
int l = (this.height - this.ySize) / 2;
|
||||
this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
|
||||
}
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_,
|
||||
int p_146976_2_, int p_146976_3_) {
|
||||
this.mc.getTextureManager().bindTexture(texture);
|
||||
int k = (this.width - this.xSize) / 2;
|
||||
int l = (this.height - this.ySize) / 2;
|
||||
this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
|
||||
}
|
||||
|
||||
protected void drawGuiContainerForegroundLayer(int p_146979_1_,
|
||||
int p_146979_2_)
|
||||
{
|
||||
this.fontRendererObj.drawString(StatCollector.translateToLocal("tile.techreborn.aesu.name"), 40, 10, Color.WHITE.getRGB());
|
||||
this.fontRendererObj.drawString((int)containerAesu.euOut + " eu/tick", 10, 20, Color.WHITE.getRGB());
|
||||
this.fontRendererObj.drawString((int)containerAesu.storedEu + " eu", 10, 30, Color.WHITE.getRGB());
|
||||
this.fontRendererObj.drawString((int)containerAesu.euChange + " eu change", 10, 40, Color.WHITE.getRGB());
|
||||
}
|
||||
protected void drawGuiContainerForegroundLayer(int p_146979_1_,
|
||||
int p_146979_2_) {
|
||||
this.fontRendererObj.drawString(StatCollector.translateToLocal("tile.techreborn.aesu.name"), 40, 10, Color.WHITE.getRGB());
|
||||
this.fontRendererObj.drawString((int) containerAesu.euOut + " eu/tick", 10, 20, Color.WHITE.getRGB());
|
||||
this.fontRendererObj.drawString((int) containerAesu.storedEu + " eu", 10, 30, Color.WHITE.getRGB());
|
||||
this.fontRendererObj.drawString((int) containerAesu.euChange + " eu change", 10, 40, Color.WHITE.getRGB());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void actionPerformed(GuiButton button) {
|
||||
super.actionPerformed(button);
|
||||
PacketHandler.sendPacketToServer(new PacketAesu(button.id, aesu));
|
||||
}
|
||||
@Override
|
||||
protected void actionPerformed(GuiButton button) {
|
||||
super.actionPerformed(button);
|
||||
PacketHandler.sendPacketToServer(new PacketAesu(button.id, aesu));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,19 +10,18 @@ import techreborn.tiles.TileAlloyFurnace;
|
|||
|
||||
public class GuiAlloyFurnace extends GuiContainer {
|
||||
|
||||
private static final ResourceLocation texture = new ResourceLocation(
|
||||
"techreborn", "textures/gui/alloy_furnace.png");
|
||||
private static final ResourceLocation texture = new ResourceLocation(
|
||||
"techreborn", "textures/gui/alloy_furnace.png");
|
||||
|
||||
TileAlloyFurnace alloyfurnace;
|
||||
TileAlloyFurnace alloyfurnace;
|
||||
|
||||
public GuiAlloyFurnace(EntityPlayer player,
|
||||
TileAlloyFurnace tileAlloyFurnace) {
|
||||
super(new ContainerAlloyFurnace(tileAlloyFurnace, player));
|
||||
this.xSize = 176;
|
||||
this.ySize = 167;
|
||||
}
|
||||
|
||||
public GuiAlloyFurnace(EntityPlayer player,
|
||||
TileAlloyFurnace tileAlloyFurnace)
|
||||
{
|
||||
super(new ContainerAlloyFurnace(tileAlloyFurnace, player));
|
||||
this.xSize = 176;
|
||||
this.ySize = 167;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initGui() {
|
||||
int k = (this.width - this.xSize) / 2;
|
||||
|
@ -30,24 +29,22 @@ public class GuiAlloyFurnace extends GuiContainer {
|
|||
super.initGui();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_,
|
||||
int p_146976_2_, int p_146976_3_)
|
||||
{
|
||||
this.mc.getTextureManager().bindTexture(texture);
|
||||
int k = (this.width - this.xSize) / 2;
|
||||
int l = (this.height - this.ySize) / 2;
|
||||
this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
|
||||
}
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_,
|
||||
int p_146976_2_, int p_146976_3_) {
|
||||
this.mc.getTextureManager().bindTexture(texture);
|
||||
int k = (this.width - this.xSize) / 2;
|
||||
int l = (this.height - this.ySize) / 2;
|
||||
this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
|
||||
}
|
||||
|
||||
protected void drawGuiContainerForegroundLayer(int p_146979_1_,
|
||||
int p_146979_2_)
|
||||
{
|
||||
String name = StatCollector.translateToLocal("tile.techreborn.alloyfurnace.name");
|
||||
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
|
||||
this.fontRendererObj.drawString(
|
||||
I18n.format("container.inventory", new Object[0]), 8,
|
||||
this.ySize - 96 + 2, 4210752);
|
||||
protected void drawGuiContainerForegroundLayer(int p_146979_1_,
|
||||
int p_146979_2_) {
|
||||
String name = StatCollector.translateToLocal("tile.techreborn.alloyfurnace.name");
|
||||
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
|
||||
this.fontRendererObj.drawString(
|
||||
I18n.format("container.inventory", new Object[0]), 8,
|
||||
this.ySize - 96 + 2, 4210752);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,17 +10,17 @@ import techreborn.tiles.TileAlloySmelter;
|
|||
|
||||
public class GuiAlloySmelter extends GuiContainer {
|
||||
|
||||
private static final ResourceLocation texture = new ResourceLocation("techreborn", "textures/gui/electric_alloy_furnace.png");
|
||||
private static final ResourceLocation texture = new ResourceLocation("techreborn", "textures/gui/electric_alloy_furnace.png");
|
||||
|
||||
TileAlloySmelter alloysmelter;
|
||||
TileAlloySmelter alloysmelter;
|
||||
|
||||
public GuiAlloySmelter(EntityPlayer player, TileAlloySmelter tilealloysmelter) {
|
||||
super(new ContainerAlloySmelter(tilealloysmelter, player));
|
||||
this.xSize = 176;
|
||||
this.ySize = 167;
|
||||
alloysmelter = tilealloysmelter;
|
||||
}
|
||||
|
||||
public GuiAlloySmelter(EntityPlayer player, TileAlloySmelter tilealloysmelter) {
|
||||
super(new ContainerAlloySmelter(tilealloysmelter, player));
|
||||
this.xSize = 176;
|
||||
this.ySize = 167;
|
||||
alloysmelter = tilealloysmelter;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initGui() {
|
||||
int k = (this.width - this.xSize) / 2;
|
||||
|
@ -28,29 +28,29 @@ public class GuiAlloySmelter extends GuiContainer {
|
|||
super.initGui();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
|
||||
this.mc.getTextureManager().bindTexture(texture);
|
||||
int k = (this.width - this.xSize) / 2;
|
||||
int l = (this.height - this.ySize) / 2;
|
||||
this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
|
||||
this.mc.getTextureManager().bindTexture(texture);
|
||||
int k = (this.width - this.xSize) / 2;
|
||||
int l = (this.height - this.ySize) / 2;
|
||||
this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
|
||||
|
||||
int j = 0;
|
||||
int j = 0;
|
||||
|
||||
j = alloysmelter.getProgressScaled(24);
|
||||
if(j > 0) {
|
||||
this.drawTexturedModalRect(k + 79, l + 34, 176, 14, j + 1, 16);
|
||||
}
|
||||
if (j > 0) {
|
||||
this.drawTexturedModalRect(k + 79, l + 34, 176, 14, j + 1, 16);
|
||||
}
|
||||
|
||||
j = alloysmelter.getEnergyScaled(12);
|
||||
if(j > 0) {
|
||||
if (j > 0) {
|
||||
this.drawTexturedModalRect(k + 56, l + 36 + 12 - j, 176, 12 - j, 14, j + 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_) {
|
||||
String name = StatCollector.translateToLocal("tile.techreborn.alloysmelter.name");
|
||||
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
|
||||
this.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, 4210752);
|
||||
}
|
||||
protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_) {
|
||||
String name = StatCollector.translateToLocal("tile.techreborn.alloysmelter.name");
|
||||
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
|
||||
this.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, 4210752);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,19 +10,19 @@ import techreborn.tiles.TileAssemblingMachine;
|
|||
|
||||
public class GuiAssemblingMachine extends GuiContainer {
|
||||
|
||||
private static final ResourceLocation texture = new ResourceLocation("techreborn", "textures/gui/assembling_machine.png");
|
||||
private static final ResourceLocation texture = new ResourceLocation("techreborn", "textures/gui/assembling_machine.png");
|
||||
|
||||
TileAssemblingMachine assemblingmachine;
|
||||
TileAssemblingMachine assemblingmachine;
|
||||
ContainerAssemblingMachine containerAssemblingMachine;
|
||||
|
||||
public GuiAssemblingMachine(EntityPlayer player, TileAssemblingMachine tileassemblinmachine) {
|
||||
super(new ContainerAssemblingMachine(tileassemblinmachine, player));
|
||||
public GuiAssemblingMachine(EntityPlayer player, TileAssemblingMachine tileassemblinmachine) {
|
||||
super(new ContainerAssemblingMachine(tileassemblinmachine, player));
|
||||
containerAssemblingMachine = (ContainerAssemblingMachine) this.inventorySlots;
|
||||
this.xSize = 176;
|
||||
this.ySize = 167;
|
||||
assemblingmachine = tileassemblinmachine;
|
||||
}
|
||||
|
||||
this.xSize = 176;
|
||||
this.ySize = 167;
|
||||
assemblingmachine = tileassemblinmachine;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initGui() {
|
||||
int k = (this.width - this.xSize) / 2;
|
||||
|
@ -30,29 +30,29 @@ public class GuiAssemblingMachine extends GuiContainer {
|
|||
super.initGui();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
|
||||
this.mc.getTextureManager().bindTexture(texture);
|
||||
int k = (this.width - this.xSize) / 2;
|
||||
int l = (this.height - this.ySize) / 2;
|
||||
this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
|
||||
this.mc.getTextureManager().bindTexture(texture);
|
||||
int k = (this.width - this.xSize) / 2;
|
||||
int l = (this.height - this.ySize) / 2;
|
||||
this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
|
||||
|
||||
int j = 0;
|
||||
int j = 0;
|
||||
|
||||
j = assemblingmachine.getProgressScaled(20);
|
||||
if(j > 0) {
|
||||
this.drawTexturedModalRect(k + 86, l + 34, 176, 14, j + 1, 16);
|
||||
}
|
||||
j = assemblingmachine.getProgressScaled(20);
|
||||
if (j > 0) {
|
||||
this.drawTexturedModalRect(k + 86, l + 34, 176, 14, j + 1, 16);
|
||||
}
|
||||
|
||||
j = assemblingmachine.getEnergyScaled(12);
|
||||
if(j > 0) {
|
||||
this.drawTexturedModalRect(k + 56, l + 36 + 12 - j, 176, 12 - j, 14, j + 2);
|
||||
}
|
||||
}
|
||||
j = assemblingmachine.getEnergyScaled(12);
|
||||
if (j > 0) {
|
||||
this.drawTexturedModalRect(k + 56, l + 36 + 12 - j, 176, 12 - j, 14, j + 2);
|
||||
}
|
||||
}
|
||||
|
||||
protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_) {
|
||||
String name = StatCollector.translateToLocal("tile.techreborn.assemblinmachine.name");
|
||||
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
|
||||
this.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, 4210752);
|
||||
}
|
||||
protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_) {
|
||||
String name = StatCollector.translateToLocal("tile.techreborn.assemblinmachine.name");
|
||||
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
|
||||
this.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, 4210752);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,20 +13,19 @@ import techreborn.tiles.TileBlastFurnace;
|
|||
|
||||
public class GuiBlastFurnace extends GuiContainer {
|
||||
|
||||
private static final ResourceLocation texture = new ResourceLocation("techreborn", "textures/gui/industrial_blast_furnace.png");
|
||||
private static final ResourceLocation texture = new ResourceLocation("techreborn", "textures/gui/industrial_blast_furnace.png");
|
||||
|
||||
TileBlastFurnace blastfurnace;
|
||||
|
||||
ContainerBlastFurnace containerBlastFurnace;
|
||||
|
||||
public GuiBlastFurnace(EntityPlayer player, TileBlastFurnace tileblastfurnace)
|
||||
{
|
||||
super(new ContainerBlastFurnace(tileblastfurnace, player));
|
||||
this.xSize = 176;
|
||||
this.ySize = 167;
|
||||
blastfurnace = tileblastfurnace;
|
||||
public GuiBlastFurnace(EntityPlayer player, TileBlastFurnace tileblastfurnace) {
|
||||
super(new ContainerBlastFurnace(tileblastfurnace, player));
|
||||
this.xSize = 176;
|
||||
this.ySize = 167;
|
||||
blastfurnace = tileblastfurnace;
|
||||
this.containerBlastFurnace = (ContainerBlastFurnace) this.inventorySlots;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initGui() {
|
||||
|
@ -36,41 +35,38 @@ public class GuiBlastFurnace extends GuiContainer {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_)
|
||||
{
|
||||
this.mc.getTextureManager().bindTexture(texture);
|
||||
int k = (this.width - this.xSize) / 2;
|
||||
int l = (this.height - this.ySize) / 2;
|
||||
this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
|
||||
|
||||
if(containerBlastFurnace.heat == 0)
|
||||
{
|
||||
GuiUtil.drawTooltipBox(k + 30, l + 50 + 12 - 0, 114, 10);
|
||||
this.fontRendererObj.drawString(ModInfo.MISSING_MULTIBLOCK, k + 38, l + 52 + 12 - 0, -1);
|
||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
|
||||
this.mc.getTextureManager().bindTexture(texture);
|
||||
int k = (this.width - this.xSize) / 2;
|
||||
int l = (this.height - this.ySize) / 2;
|
||||
this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
|
||||
|
||||
if (containerBlastFurnace.heat == 0) {
|
||||
GuiUtil.drawTooltipBox(k + 30, l + 50 + 12 - 0, 114, 10);
|
||||
this.fontRendererObj.drawString(ModInfo.MISSING_MULTIBLOCK, k + 38, l + 52 + 12 - 0, -1);
|
||||
}
|
||||
|
||||
int j = 0;
|
||||
this.mc.getTextureManager().bindTexture(texture);
|
||||
j = blastfurnace.getProgressScaled(24);
|
||||
if(j > 0) {
|
||||
if (j > 0) {
|
||||
this.drawTexturedModalRect(k + 64, l + 37, 176, 14, j + 1, 16);
|
||||
}
|
||||
|
||||
j = blastfurnace.getEnergyScaled(12);
|
||||
if(j > 0) {
|
||||
if (j > 0) {
|
||||
this.drawTexturedModalRect(k + 9, l + 36 + 12 - j, 176, 12 - j, 14, j + 2);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_)
|
||||
{
|
||||
protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_) {
|
||||
super.drawGuiContainerForegroundLayer(p_146979_1_, p_146979_2_);
|
||||
String name = StatCollector.translateToLocal("tile.techreborn.blastfurnace.name");
|
||||
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
|
||||
if(containerBlastFurnace.heat != 0){
|
||||
String name = StatCollector.translateToLocal("tile.techreborn.blastfurnace.name");
|
||||
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
|
||||
if (containerBlastFurnace.heat != 0) {
|
||||
this.fontRendererObj.drawString("Current Heat: " + containerBlastFurnace.heat, 40, 60, 4210752);
|
||||
}
|
||||
this.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, 4210752);
|
||||
}
|
||||
this.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, 4210752);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@ public class GuiCentrifuge extends GuiContainer {
|
|||
int j = 0;
|
||||
|
||||
j = centrifuge.getProgressScaled(11);
|
||||
if(j > 0) {
|
||||
if (j > 0) {
|
||||
this.drawTexturedModalRect(k + 83, l + 23 + 10 - j, 177, 15 + 10 - j, 10, j);
|
||||
this.drawTexturedModalRect(k + 98, l + 38, 177, 51, j, 10);
|
||||
this.drawTexturedModalRect(k + 83, l + 53, 177, 39, 10, j);
|
||||
|
@ -47,10 +47,10 @@ public class GuiCentrifuge extends GuiContainer {
|
|||
|
||||
j = centrifuge.getEnergyScaled(12);
|
||||
|
||||
if(j > 0) {
|
||||
if (j > 0) {
|
||||
this.drawTexturedModalRect(k + 9, l + 32 + 12 - j, 176, 12 - j, 14, j + 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_) {
|
||||
String namePt1 = StatCollector.translateToLocal("tile.techreborn.industrialBlock.name");
|
||||
|
|
|
@ -10,17 +10,17 @@ import techreborn.tiles.TileChargeBench;
|
|||
|
||||
public class GuiChargeBench extends GuiContainer {
|
||||
|
||||
private static final ResourceLocation texture = new ResourceLocation("techreborn", "textures/gui/chargebench.png");
|
||||
private static final ResourceLocation texture = new ResourceLocation("techreborn", "textures/gui/chargebench.png");
|
||||
|
||||
TileChargeBench chargebench;
|
||||
TileChargeBench chargebench;
|
||||
|
||||
public GuiChargeBench(EntityPlayer player, TileChargeBench tile) {
|
||||
super(new ContainerChargeBench(tile, player));
|
||||
this.xSize = 176;
|
||||
this.ySize = 167;
|
||||
chargebench = tile;
|
||||
}
|
||||
|
||||
public GuiChargeBench(EntityPlayer player, TileChargeBench tile) {
|
||||
super(new ContainerChargeBench(tile, player));
|
||||
this.xSize = 176;
|
||||
this.ySize = 167;
|
||||
chargebench = tile;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initGui() {
|
||||
int k = (this.width - this.xSize) / 2;
|
||||
|
@ -28,24 +28,24 @@ public class GuiChargeBench extends GuiContainer {
|
|||
super.initGui();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
|
||||
this.mc.getTextureManager().bindTexture(texture);
|
||||
int k = (this.width - this.xSize) / 2;
|
||||
int l = (this.height - this.ySize) / 2;
|
||||
this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
|
||||
|
||||
int j = 0;
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
|
||||
this.mc.getTextureManager().bindTexture(texture);
|
||||
int k = (this.width - this.xSize) / 2;
|
||||
int l = (this.height - this.ySize) / 2;
|
||||
this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
|
||||
|
||||
int j = 0;
|
||||
|
||||
j = chargebench.getEnergyScaled(12);
|
||||
if(j > 0) {
|
||||
if (j > 0) {
|
||||
this.drawTexturedModalRect(k + 10, l + 32 + 12 - j, 176, 12 - j, 14, j + 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_) {
|
||||
String name = StatCollector.translateToLocal("tile.techreborn.chargebench.name");
|
||||
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
|
||||
this.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, 4210752);
|
||||
}
|
||||
protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_) {
|
||||
String name = StatCollector.translateToLocal("tile.techreborn.chargebench.name");
|
||||
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
|
||||
this.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, 4210752);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,19 +10,19 @@ import techreborn.tiles.TileChemicalReactor;
|
|||
|
||||
public class GuiChemicalReactor extends GuiContainer {
|
||||
|
||||
private static final ResourceLocation texture = new ResourceLocation("techreborn", "textures/gui/chemical_reactor.png");
|
||||
private static final ResourceLocation texture = new ResourceLocation("techreborn", "textures/gui/chemical_reactor.png");
|
||||
|
||||
TileChemicalReactor chemicalReactor;
|
||||
TileChemicalReactor chemicalReactor;
|
||||
ContainerChemicalReactor containerChemicalReactor;
|
||||
|
||||
public GuiChemicalReactor(EntityPlayer player, TileChemicalReactor tilechemicalReactor) {
|
||||
super(new ContainerChemicalReactor(tilechemicalReactor, player));
|
||||
public GuiChemicalReactor(EntityPlayer player, TileChemicalReactor tilechemicalReactor) {
|
||||
super(new ContainerChemicalReactor(tilechemicalReactor, player));
|
||||
containerChemicalReactor = (ContainerChemicalReactor) this.inventorySlots;
|
||||
this.xSize = 176;
|
||||
this.ySize = 167;
|
||||
chemicalReactor = tilechemicalReactor;
|
||||
}
|
||||
|
||||
this.xSize = 176;
|
||||
this.ySize = 167;
|
||||
chemicalReactor = tilechemicalReactor;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initGui() {
|
||||
int k = (this.width - this.xSize) / 2;
|
||||
|
@ -30,30 +30,30 @@ public class GuiChemicalReactor extends GuiContainer {
|
|||
super.initGui();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
|
||||
this.mc.getTextureManager().bindTexture(texture);
|
||||
int k = (this.width - this.xSize) / 2;
|
||||
int l = (this.height - this.ySize) / 2;
|
||||
this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
|
||||
this.mc.getTextureManager().bindTexture(texture);
|
||||
int k = (this.width - this.xSize) / 2;
|
||||
int l = (this.height - this.ySize) / 2;
|
||||
this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
|
||||
|
||||
int j = 0;
|
||||
int j = 0;
|
||||
|
||||
j = chemicalReactor.getProgressScaled(11);
|
||||
if(j > 0) {
|
||||
this.drawTexturedModalRect(k + 73, l + 39, 177, 15, 30, j);
|
||||
}
|
||||
j = chemicalReactor.getProgressScaled(11);
|
||||
if (j > 0) {
|
||||
this.drawTexturedModalRect(k + 73, l + 39, 177, 15, 30, j);
|
||||
}
|
||||
|
||||
j = chemicalReactor.getEnergyScaled(12);
|
||||
if(j > 0) {
|
||||
this.drawTexturedModalRect(k + 9, l + 32 + 12 - j, 176, 12 - j, 14, j + 2);
|
||||
}
|
||||
j = chemicalReactor.getEnergyScaled(12);
|
||||
if (j > 0) {
|
||||
this.drawTexturedModalRect(k + 9, l + 32 + 12 - j, 176, 12 - j, 14, j + 2);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_) {
|
||||
String name = StatCollector.translateToLocal("tile.techreborn.chemicalreactor.name");
|
||||
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
|
||||
this.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, 4210752);
|
||||
}
|
||||
protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_) {
|
||||
String name = StatCollector.translateToLocal("tile.techreborn.chemicalreactor.name");
|
||||
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
|
||||
this.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, 4210752);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,62 +9,58 @@ import net.minecraft.util.StatCollector;
|
|||
import techreborn.client.container.ContainerChunkloader;
|
||||
import techreborn.tiles.TileChunkLoader;
|
||||
|
||||
public class GuiChunkLoader extends GuiContainer{
|
||||
|
||||
private GuiButton plusOneButton;
|
||||
private GuiButton plusTenButton;
|
||||
private GuiButton minusOneButton;
|
||||
private GuiButton minusTenButton;
|
||||
|
||||
private static final ResourceLocation texture = new ResourceLocation(
|
||||
"techreborn", "textures/gui/industrial_chunkloader.png");
|
||||
public class GuiChunkLoader extends GuiContainer {
|
||||
|
||||
TileChunkLoader chunkloader;
|
||||
private GuiButton plusOneButton;
|
||||
private GuiButton plusTenButton;
|
||||
private GuiButton minusOneButton;
|
||||
private GuiButton minusTenButton;
|
||||
|
||||
public GuiChunkLoader(EntityPlayer player, TileChunkLoader tilechunkloader)
|
||||
{
|
||||
super(new ContainerChunkloader(tilechunkloader, player));
|
||||
this.xSize = 176;
|
||||
this.ySize = 167;
|
||||
chunkloader = tilechunkloader;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initGui()
|
||||
{
|
||||
super.initGui();
|
||||
this.guiLeft = this.width / 2 - this.xSize / 2;
|
||||
this.guiTop = this.height / 2 - this.ySize / 2;
|
||||
plusOneButton = new GuiButton(0, guiLeft + 5, guiTop + 37, 40, 20, "+1");
|
||||
plusTenButton = new GuiButton(0, guiLeft + 45, guiTop + 37, 40, 20, "+10");
|
||||
|
||||
minusOneButton = new GuiButton(0, guiLeft + 90, guiTop + 37, 40, 20, "-1");
|
||||
minusTenButton = new GuiButton(0, guiLeft + 130, guiTop + 37, 40, 20, "-10");
|
||||
private static final ResourceLocation texture = new ResourceLocation(
|
||||
"techreborn", "textures/gui/industrial_chunkloader.png");
|
||||
|
||||
buttonList.add(plusOneButton);
|
||||
buttonList.add(plusTenButton);
|
||||
buttonList.add(minusOneButton);
|
||||
buttonList.add(minusTenButton);
|
||||
}
|
||||
TileChunkLoader chunkloader;
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_,
|
||||
int p_146976_2_, int p_146976_3_)
|
||||
{
|
||||
this.mc.getTextureManager().bindTexture(texture);
|
||||
int k = (this.width - this.xSize) / 2;
|
||||
int l = (this.height - this.ySize) / 2;
|
||||
this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
|
||||
}
|
||||
public GuiChunkLoader(EntityPlayer player, TileChunkLoader tilechunkloader) {
|
||||
super(new ContainerChunkloader(tilechunkloader, player));
|
||||
this.xSize = 176;
|
||||
this.ySize = 167;
|
||||
chunkloader = tilechunkloader;
|
||||
}
|
||||
|
||||
protected void drawGuiContainerForegroundLayer(int p_146979_1_,
|
||||
int p_146979_2_)
|
||||
{
|
||||
String name = StatCollector.translateToLocal("tile.techreborn.chunkloader.name");
|
||||
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
|
||||
this.fontRendererObj.drawString(
|
||||
I18n.format("container.inventory", new Object[0]), 8,
|
||||
this.ySize - 96 + 2, 4210752);
|
||||
}
|
||||
@Override
|
||||
public void initGui() {
|
||||
super.initGui();
|
||||
this.guiLeft = this.width / 2 - this.xSize / 2;
|
||||
this.guiTop = this.height / 2 - this.ySize / 2;
|
||||
plusOneButton = new GuiButton(0, guiLeft + 5, guiTop + 37, 40, 20, "+1");
|
||||
plusTenButton = new GuiButton(0, guiLeft + 45, guiTop + 37, 40, 20, "+10");
|
||||
|
||||
minusOneButton = new GuiButton(0, guiLeft + 90, guiTop + 37, 40, 20, "-1");
|
||||
minusTenButton = new GuiButton(0, guiLeft + 130, guiTop + 37, 40, 20, "-10");
|
||||
|
||||
buttonList.add(plusOneButton);
|
||||
buttonList.add(plusTenButton);
|
||||
buttonList.add(minusOneButton);
|
||||
buttonList.add(minusTenButton);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_,
|
||||
int p_146976_2_, int p_146976_3_) {
|
||||
this.mc.getTextureManager().bindTexture(texture);
|
||||
int k = (this.width - this.xSize) / 2;
|
||||
int l = (this.height - this.ySize) / 2;
|
||||
this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
|
||||
}
|
||||
|
||||
protected void drawGuiContainerForegroundLayer(int p_146979_1_,
|
||||
int p_146979_2_) {
|
||||
String name = StatCollector.translateToLocal("tile.techreborn.chunkloader.name");
|
||||
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
|
||||
this.fontRendererObj.drawString(
|
||||
I18n.format("container.inventory", new Object[0]), 8,
|
||||
this.ySize - 96 + 2, 4210752);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -9,27 +9,27 @@ import net.minecraft.util.StatCollector;
|
|||
|
||||
public class GuiDestructoPack extends GuiContainer {
|
||||
|
||||
private static final ResourceLocation texture = new ResourceLocation(
|
||||
"techreborn", "textures/gui/destructopack.png");
|
||||
|
||||
public GuiDestructoPack(Container container) {
|
||||
super(container);
|
||||
this.xSize = 176;
|
||||
this.ySize = 166;
|
||||
}
|
||||
private static final ResourceLocation texture = new ResourceLocation(
|
||||
"techreborn", "textures/gui/destructopack.png");
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float arg0, int arg1, int arg2) {
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(texture);
|
||||
drawTexturedModalRect(guiLeft, guiTop, 0, 0, 176, 166);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int arg0, int arg1) {
|
||||
String name = StatCollector.translateToLocal("item.techreborn.part.destructoPack.name");
|
||||
fontRendererObj.drawString(name, xSize / 2 - fontRendererObj.getStringWidth(name) / 2, 5, 4210752);
|
||||
this.fontRendererObj.drawString(I18n.format("container.inventory"), 8,
|
||||
this.ySize - 96 + 2, 4210752);
|
||||
super.drawGuiContainerForegroundLayer(arg0, arg1);
|
||||
}
|
||||
public GuiDestructoPack(Container container) {
|
||||
super(container);
|
||||
this.xSize = 176;
|
||||
this.ySize = 166;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float arg0, int arg1, int arg2) {
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(texture);
|
||||
drawTexturedModalRect(guiLeft, guiTop, 0, 0, 176, 166);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int arg0, int arg1) {
|
||||
String name = StatCollector.translateToLocal("item.techreborn.part.destructoPack.name");
|
||||
fontRendererObj.drawString(name, xSize / 2 - fontRendererObj.getStringWidth(name) / 2, 5, 4210752);
|
||||
this.fontRendererObj.drawString(I18n.format("container.inventory"), 8,
|
||||
this.ySize - 96 + 2, 4210752);
|
||||
super.drawGuiContainerForegroundLayer(arg0, arg1);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,39 +10,36 @@ import techreborn.tiles.TileDieselGenerator;
|
|||
|
||||
public class GuiDieselGenerator extends GuiContainer {
|
||||
|
||||
private static final ResourceLocation texture = new ResourceLocation(
|
||||
"techreborn", "textures/gui/ThermalGenerator.png");
|
||||
private static final ResourceLocation texture = new ResourceLocation(
|
||||
"techreborn", "textures/gui/ThermalGenerator.png");
|
||||
|
||||
TileDieselGenerator tile;
|
||||
TileDieselGenerator tile;
|
||||
|
||||
public GuiDieselGenerator(EntityPlayer player, TileDieselGenerator tile)
|
||||
{
|
||||
super(new ContainerDieselGenerator(tile, player));
|
||||
this.xSize = 176;
|
||||
this.ySize = 167;
|
||||
this.tile = tile;
|
||||
}
|
||||
public GuiDieselGenerator(EntityPlayer player, TileDieselGenerator tile) {
|
||||
super(new ContainerDieselGenerator(tile, player));
|
||||
this.xSize = 176;
|
||||
this.ySize = 167;
|
||||
this.tile = tile;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_,
|
||||
int p_146976_2_, int p_146976_3_)
|
||||
{
|
||||
this.mc.getTextureManager().bindTexture(texture);
|
||||
int k = (this.width - this.xSize) / 2;
|
||||
int l = (this.height - this.ySize) / 2;
|
||||
this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
|
||||
}
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_,
|
||||
int p_146976_2_, int p_146976_3_) {
|
||||
this.mc.getTextureManager().bindTexture(texture);
|
||||
int k = (this.width - this.xSize) / 2;
|
||||
int l = (this.height - this.ySize) / 2;
|
||||
this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
|
||||
}
|
||||
|
||||
protected void drawGuiContainerForegroundLayer(int p_146979_1_,
|
||||
int p_146979_2_)
|
||||
{
|
||||
String name = StatCollector.translateToLocal("tile.techreborn.dieselgenerator.name");
|
||||
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
|
||||
this.fontRendererObj.drawString(
|
||||
I18n.format("container.inventory", new Object[0]), 8,
|
||||
this.ySize - 96 + 2, 4210752);
|
||||
this.fontRendererObj.drawString("Liquid Amount", 10, 20, 16448255);
|
||||
this.fontRendererObj.drawString(tile.tank.getFluidAmount() + "", 10,
|
||||
30, 16448255);
|
||||
}
|
||||
protected void drawGuiContainerForegroundLayer(int p_146979_1_,
|
||||
int p_146979_2_) {
|
||||
String name = StatCollector.translateToLocal("tile.techreborn.dieselgenerator.name");
|
||||
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
|
||||
this.fontRendererObj.drawString(
|
||||
I18n.format("container.inventory", new Object[0]), 8,
|
||||
this.ySize - 96 + 2, 4210752);
|
||||
this.fontRendererObj.drawString("Liquid Amount", 10, 20, 16448255);
|
||||
this.fontRendererObj.drawString(tile.tank.getFluidAmount() + "", 10,
|
||||
30, 16448255);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,40 +10,37 @@ import techreborn.tiles.TileDigitalChest;
|
|||
|
||||
public class GuiDigitalChest extends GuiContainer {
|
||||
|
||||
private static final ResourceLocation texture = new ResourceLocation(
|
||||
"techreborn", "textures/gui/ThermalGenerator.png");
|
||||
private static final ResourceLocation texture = new ResourceLocation(
|
||||
"techreborn", "textures/gui/ThermalGenerator.png");
|
||||
|
||||
TileDigitalChest tile;
|
||||
TileDigitalChest tile;
|
||||
|
||||
public GuiDigitalChest(EntityPlayer player, TileDigitalChest tile)
|
||||
{
|
||||
super(new ContainerDigitalChest(tile, player));
|
||||
this.xSize = 176;
|
||||
this.ySize = 167;
|
||||
this.tile = tile;
|
||||
}
|
||||
public GuiDigitalChest(EntityPlayer player, TileDigitalChest tile) {
|
||||
super(new ContainerDigitalChest(tile, player));
|
||||
this.xSize = 176;
|
||||
this.ySize = 167;
|
||||
this.tile = tile;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_,
|
||||
int p_146976_2_, int p_146976_3_)
|
||||
{
|
||||
this.mc.getTextureManager().bindTexture(texture);
|
||||
int k = (this.width - this.xSize) / 2;
|
||||
int l = (this.height - this.ySize) / 2;
|
||||
this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
|
||||
}
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_,
|
||||
int p_146976_2_, int p_146976_3_) {
|
||||
this.mc.getTextureManager().bindTexture(texture);
|
||||
int k = (this.width - this.xSize) / 2;
|
||||
int l = (this.height - this.ySize) / 2;
|
||||
this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
|
||||
}
|
||||
|
||||
protected void drawGuiContainerForegroundLayer(int p_146979_1_,
|
||||
int p_146979_2_)
|
||||
{
|
||||
String name = StatCollector.translateToLocal("tile.techreborn.digitalChest.name");
|
||||
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
|
||||
this.fontRendererObj.drawString(
|
||||
I18n.format("container.inventory", new Object[0]), 8,
|
||||
this.ySize - 96 + 2, 4210752);
|
||||
this.fontRendererObj.drawString("Amount", 10, 20, 16448255);
|
||||
if (tile.storedItem != null)
|
||||
this.fontRendererObj.drawString(tile.storedItem.stackSize + "", 10,
|
||||
30, 16448255);
|
||||
}
|
||||
protected void drawGuiContainerForegroundLayer(int p_146979_1_,
|
||||
int p_146979_2_) {
|
||||
String name = StatCollector.translateToLocal("tile.techreborn.digitalChest.name");
|
||||
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
|
||||
this.fontRendererObj.drawString(
|
||||
I18n.format("container.inventory", new Object[0]), 8,
|
||||
this.ySize - 96 + 2, 4210752);
|
||||
this.fontRendererObj.drawString("Amount", 10, 20, 16448255);
|
||||
if (tile.storedItem != null)
|
||||
this.fontRendererObj.drawString(tile.storedItem.stackSize + "", 10,
|
||||
30, 16448255);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,39 +9,36 @@ import techreborn.tiles.TileGasTurbine;
|
|||
|
||||
public class GuiGasTurbine extends GuiContainer {
|
||||
|
||||
//TODO: use semifluid generator texture
|
||||
private static final ResourceLocation texture = new ResourceLocation(
|
||||
"techreborn", "textures/gui/ThermalGenerator.png");
|
||||
//TODO: use semifluid generator texture
|
||||
private static final ResourceLocation texture = new ResourceLocation(
|
||||
"techreborn", "textures/gui/ThermalGenerator.png");
|
||||
|
||||
TileGasTurbine tile;
|
||||
TileGasTurbine tile;
|
||||
|
||||
public GuiGasTurbine(EntityPlayer player, TileGasTurbine tile)
|
||||
{
|
||||
super(new ContainerGasTurbine(tile, player));
|
||||
this.xSize = 176;
|
||||
this.ySize = 167;
|
||||
this.tile = tile;
|
||||
}
|
||||
public GuiGasTurbine(EntityPlayer player, TileGasTurbine tile) {
|
||||
super(new ContainerGasTurbine(tile, player));
|
||||
this.xSize = 176;
|
||||
this.ySize = 167;
|
||||
this.tile = tile;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_)
|
||||
{
|
||||
this.mc.getTextureManager().bindTexture(texture);
|
||||
int k = (this.width - this.xSize) / 2;
|
||||
int l = (this.height - this.ySize) / 2;
|
||||
this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
|
||||
}
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
|
||||
this.mc.getTextureManager().bindTexture(texture);
|
||||
int k = (this.width - this.xSize) / 2;
|
||||
int l = (this.height - this.ySize) / 2;
|
||||
this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
|
||||
}
|
||||
|
||||
protected void drawGuiContainerForegroundLayer(int p_146979_1_,
|
||||
int p_146979_2_)
|
||||
{
|
||||
String name = "Gas Turbine";
|
||||
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
|
||||
this.fontRendererObj.drawString(
|
||||
I18n.format("container.inventory", new Object[0]), 8,
|
||||
this.ySize - 96 + 2, 4210752);
|
||||
this.fontRendererObj.drawString("Liquid Amount", 10, 20, 16448255);
|
||||
this.fontRendererObj.drawString(tile.tank.getFluidAmount() + "", 10,
|
||||
30, 16448255);
|
||||
}
|
||||
protected void drawGuiContainerForegroundLayer(int p_146979_1_,
|
||||
int p_146979_2_) {
|
||||
String name = "Gas Turbine";
|
||||
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
|
||||
this.fontRendererObj.drawString(
|
||||
I18n.format("container.inventory", new Object[0]), 8,
|
||||
this.ySize - 96 + 2, 4210752);
|
||||
this.fontRendererObj.drawString("Liquid Amount", 10, 20, 16448255);
|
||||
this.fontRendererObj.drawString(tile.tank.getFluidAmount() + "", 10,
|
||||
30, 16448255);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,45 +13,44 @@ import techreborn.client.container.ContainerGrinder;
|
|||
import techreborn.lib.ModInfo;
|
||||
import techreborn.tiles.TileGrinder;
|
||||
|
||||
public class GuiGrinder extends GuiContainer{
|
||||
|
||||
private static final ResourceLocation texture = new ResourceLocation("techreborn", "textures/gui/industrial_grinder.png");
|
||||
public class GuiGrinder extends GuiContainer {
|
||||
|
||||
TileGrinder grinder;
|
||||
|
||||
public GuiGrinder(EntityPlayer player, TileGrinder tilegrinder) {
|
||||
super(new ContainerGrinder(tilegrinder, player));
|
||||
this.xSize = 176;
|
||||
this.ySize = 167;
|
||||
grinder = tilegrinder;
|
||||
}
|
||||
private static final ResourceLocation texture = new ResourceLocation("techreborn", "textures/gui/industrial_grinder.png");
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
|
||||
this.mc.getTextureManager().bindTexture(texture);
|
||||
int k = (this.width - this.xSize) / 2;
|
||||
int l = (this.height - this.ySize) / 2;
|
||||
this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
|
||||
TileGrinder grinder;
|
||||
|
||||
public GuiGrinder(EntityPlayer player, TileGrinder tilegrinder) {
|
||||
super(new ContainerGrinder(tilegrinder, player));
|
||||
this.xSize = 176;
|
||||
this.ySize = 167;
|
||||
grinder = tilegrinder;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
|
||||
this.mc.getTextureManager().bindTexture(texture);
|
||||
int k = (this.width - this.xSize) / 2;
|
||||
int l = (this.height - this.ySize) / 2;
|
||||
this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
|
||||
|
||||
int j = 0;
|
||||
|
||||
j = grinder.getProgressScaled(24);
|
||||
if(j > 0) {
|
||||
if (j > 0) {
|
||||
this.drawTexturedModalRect(k + 50, l + 36, 176, 14, j + 1, 16);
|
||||
}
|
||||
|
||||
j = grinder.getEnergyScaled(12);
|
||||
if(j > 0) {
|
||||
if (j > 0) {
|
||||
this.drawTexturedModalRect(k + 132, l + 63 + 12 - j, 176, 12 - j, 14, j + 2);
|
||||
}
|
||||
|
||||
if(grinder.getMutliBlock() != true)
|
||||
{
|
||||
GuiDraw.drawTooltipBox(k + 30, l + 50 + 12 - j, 114, 10);
|
||||
this.fontRendererObj.drawString(ModInfo.MISSING_MULTIBLOCK, k + 38, l + 52 + 12 - j, -1);
|
||||
|
||||
if (grinder.getMutliBlock() != true) {
|
||||
GuiDraw.drawTooltipBox(k + 30, l + 50 + 12 - j, 114, 10);
|
||||
this.fontRendererObj.drawString(ModInfo.MISSING_MULTIBLOCK, k + 38, l + 52 + 12 - j, -1);
|
||||
}
|
||||
|
||||
if(grinder.tank.getFluidAmount() != 0) {
|
||||
if (grinder.tank.getFluidAmount() != 0) {
|
||||
IIcon fluidIcon = grinder.tank.getFluid().getFluid().getIcon();
|
||||
if (fluidIcon != null) {
|
||||
drawTexturedModalRect(k + 7, l + 15, 176, 31, 20, 55);
|
||||
|
@ -65,12 +64,12 @@ public class GuiGrinder extends GuiContainer{
|
|||
drawTexturedModalRect(k + 11, l + 19, 176, 86, 12, 47);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_) {
|
||||
String name = StatCollector.translateToLocal("tile.techreborn.grinder.name");
|
||||
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
|
||||
this.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, 4210752);
|
||||
}
|
||||
protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_) {
|
||||
String name = StatCollector.translateToLocal("tile.techreborn.grinder.name");
|
||||
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
|
||||
this.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, 4210752);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -10,7 +10,6 @@ import techreborn.cofhLib.gui.GuiBase;
|
|||
import techreborn.cofhLib.gui.element.ElementListBox;
|
||||
import techreborn.cofhLib.gui.element.ElementTextField;
|
||||
import techreborn.cofhLib.gui.element.ElementTextFieldLimited;
|
||||
import techreborn.packets.PacketHandler;
|
||||
import techreborn.packets.PacketIdsu;
|
||||
import techreborn.tiles.idsu.TileIDSU;
|
||||
import techreborn.util.LogHelper;
|
||||
|
@ -18,88 +17,88 @@ import techreborn.util.LogHelper;
|
|||
public class GuiIDSU extends GuiBase {
|
||||
|
||||
|
||||
TileIDSU idsu;
|
||||
TileIDSU idsu;
|
||||
|
||||
ContainerIDSU containerIDSU;
|
||||
ContainerIDSU containerIDSU;
|
||||
|
||||
public static ElementListBox listBox = new ElementListBox(null, 10, 28, 80, 60);
|
||||
public static ElementListBox listBox = new ElementListBox(null, 10, 28, 80, 60);
|
||||
|
||||
ElementTextFieldLimited idFeild;
|
||||
ElementTextField nameFeild;
|
||||
ElementTextFieldLimited idFeild;
|
||||
ElementTextField nameFeild;
|
||||
|
||||
|
||||
public GuiIDSU(EntityPlayer player,
|
||||
TileIDSU tileIDSU) {
|
||||
super(new ContainerIDSU(tileIDSU, player));
|
||||
this.xSize = 156;
|
||||
this.ySize = 200;
|
||||
idsu = tileIDSU;
|
||||
this.containerIDSU = (ContainerIDSU) this.inventorySlots;
|
||||
texture = new ResourceLocation(
|
||||
"techreborn", "textures/gui/aesu.png");
|
||||
drawTitle = false;
|
||||
drawInventory = false;
|
||||
name = StatCollector.translateToLocal("tile.techreborn.aesu.name");
|
||||
}
|
||||
public GuiIDSU(EntityPlayer player,
|
||||
TileIDSU tileIDSU) {
|
||||
super(new ContainerIDSU(tileIDSU, player));
|
||||
this.xSize = 156;
|
||||
this.ySize = 200;
|
||||
idsu = tileIDSU;
|
||||
this.containerIDSU = (ContainerIDSU) this.inventorySlots;
|
||||
texture = new ResourceLocation(
|
||||
"techreborn", "textures/gui/aesu.png");
|
||||
drawTitle = false;
|
||||
drawInventory = false;
|
||||
name = StatCollector.translateToLocal("tile.techreborn.aesu.name");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initGui() {
|
||||
super.initGui();
|
||||
this.buttonList.clear();
|
||||
int k = (this.width - this.xSize) / 2;
|
||||
int l = (this.height - this.ySize) / 2;
|
||||
this.buttonList.add(new GuiButton(0, k + 96, l + 8, 18, 20, "++"));
|
||||
this.buttonList.add(new GuiButton(1, k + 96, l + 8 + 22, 18, 20, "+"));
|
||||
this.buttonList.add(new GuiButton(2, k + 96, l + 8 + (22 * 2), 18, 20, "-"));
|
||||
this.buttonList.add(new GuiButton(3, k + 96, l + 8 + (22 * 3), 18, 20, "--"));
|
||||
this.buttonList.add(new GuiButton(4, k + 40, l + 10, 10, 10, "+"));
|
||||
@Override
|
||||
public void initGui() {
|
||||
super.initGui();
|
||||
this.buttonList.clear();
|
||||
int k = (this.width - this.xSize) / 2;
|
||||
int l = (this.height - this.ySize) / 2;
|
||||
this.buttonList.add(new GuiButton(0, k + 96, l + 8, 18, 20, "++"));
|
||||
this.buttonList.add(new GuiButton(1, k + 96, l + 8 + 22, 18, 20, "+"));
|
||||
this.buttonList.add(new GuiButton(2, k + 96, l + 8 + (22 * 2), 18, 20, "-"));
|
||||
this.buttonList.add(new GuiButton(3, k + 96, l + 8 + (22 * 3), 18, 20, "--"));
|
||||
this.buttonList.add(new GuiButton(4, k + 40, l + 10, 10, 10, "+"));
|
||||
|
||||
listBox.gui = this;
|
||||
listBox.setSelectedIndex(containerIDSU.channel);
|
||||
listBox.gui = this;
|
||||
listBox.setSelectedIndex(containerIDSU.channel);
|
||||
|
||||
// listBox.borderColor = new GuiColor(120, 120, 120, 0).getColor();
|
||||
// listBox.backgroundColor = new GuiColor(0, 0, 0, 32).getColor();
|
||||
addElement(listBox);
|
||||
addElement(listBox);
|
||||
|
||||
idFeild = new ElementTextFieldLimited(this, 10, 10, 30, 10, (short) 4);
|
||||
idFeild.setFilter("1234567890", false);
|
||||
idFeild = new ElementTextFieldLimited(this, 10, 10, 30, 10, (short) 4);
|
||||
idFeild.setFilter("1234567890", false);
|
||||
|
||||
addElement(idFeild);
|
||||
addElement(idFeild);
|
||||
|
||||
nameFeild = new ElementTextField(this, 10, 100, 50, 10);
|
||||
nameFeild = new ElementTextField(this, 10, 100, 50, 10);
|
||||
|
||||
addElement(nameFeild);
|
||||
addElement(nameFeild);
|
||||
|
||||
// tabs.add(new TabIDConfig(this));
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void actionPerformed(GuiButton button) {
|
||||
super.actionPerformed(button);
|
||||
if (isInteger(idFeild.getText())) {
|
||||
@Override
|
||||
protected void actionPerformed(GuiButton button) {
|
||||
super.actionPerformed(button);
|
||||
if (isInteger(idFeild.getText())) {
|
||||
Core.packetPipeline.sendToServer(new PacketIdsu(button.id, idsu, Integer.parseInt(idFeild.getText()), nameFeild.getText()));
|
||||
} else {
|
||||
LogHelper.info("There was an issue in the gui!, Please report this to the TechReborn Devs");
|
||||
}
|
||||
LogHelper.info("There was an issue in the gui!, Please report this to the TechReborn Devs");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean isInteger(String s) {
|
||||
return isInteger(s, 10);
|
||||
}
|
||||
public static boolean isInteger(String s) {
|
||||
return isInteger(s, 10);
|
||||
}
|
||||
|
||||
public static boolean isInteger(String s, int radix) {
|
||||
if (s.isEmpty()) return false;
|
||||
for (int i = 0; i < s.length(); i++) {
|
||||
if (i == 0 && s.charAt(i) == '-') {
|
||||
if (s.length() == 1) return false;
|
||||
else continue;
|
||||
}
|
||||
if (Character.digit(s.charAt(i), radix) < 0) return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
public static boolean isInteger(String s, int radix) {
|
||||
if (s.isEmpty()) return false;
|
||||
for (int i = 0; i < s.length(); i++) {
|
||||
if (i == 0 && s.charAt(i) == '-') {
|
||||
if (s.length() == 1) return false;
|
||||
else continue;
|
||||
}
|
||||
if (Character.digit(s.charAt(i), radix) < 0) return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
|
@ -10,21 +10,21 @@ import techreborn.client.container.ContainerImplosionCompressor;
|
|||
import techreborn.lib.ModInfo;
|
||||
import techreborn.tiles.TileImplosionCompressor;
|
||||
|
||||
public class GuiImplosionCompressor extends GuiContainer{
|
||||
|
||||
private static final ResourceLocation texture = new ResourceLocation("techreborn", "textures/gui/implosion_compressor.png");
|
||||
public class GuiImplosionCompressor extends GuiContainer {
|
||||
|
||||
TileImplosionCompressor compresser;
|
||||
private static final ResourceLocation texture = new ResourceLocation("techreborn", "textures/gui/implosion_compressor.png");
|
||||
|
||||
TileImplosionCompressor compresser;
|
||||
ContainerImplosionCompressor containerImplosionCompressor;
|
||||
|
||||
public GuiImplosionCompressor(EntityPlayer player, TileImplosionCompressor tilecompresser) {
|
||||
super(new ContainerImplosionCompressor(tilecompresser, player));
|
||||
|
||||
public GuiImplosionCompressor(EntityPlayer player, TileImplosionCompressor tilecompresser) {
|
||||
super(new ContainerImplosionCompressor(tilecompresser, player));
|
||||
containerImplosionCompressor = (ContainerImplosionCompressor) this.inventorySlots;
|
||||
this.xSize = 176;
|
||||
this.ySize = 167;
|
||||
compresser = tilecompresser;
|
||||
}
|
||||
|
||||
this.xSize = 176;
|
||||
this.ySize = 167;
|
||||
compresser = tilecompresser;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initGui() {
|
||||
int k = (this.width - this.xSize) / 2;
|
||||
|
@ -32,36 +32,35 @@ public class GuiImplosionCompressor extends GuiContainer{
|
|||
super.initGui();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
|
||||
this.mc.getTextureManager().bindTexture(texture);
|
||||
int k = (this.width - this.xSize) / 2;
|
||||
int l = (this.height - this.ySize) / 2;
|
||||
this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
|
||||
this.mc.getTextureManager().bindTexture(texture);
|
||||
int k = (this.width - this.xSize) / 2;
|
||||
int l = (this.height - this.ySize) / 2;
|
||||
this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
|
||||
|
||||
int j = 0;
|
||||
if(this.compresser.crafter.currentTickTime != 0){
|
||||
if (this.compresser.crafter.currentTickTime != 0) {
|
||||
j = this.compresser.crafter.currentTickTime * 20 / this.compresser.crafter.currentNeededTicks;
|
||||
}
|
||||
|
||||
if(compresser.getMutliBlock() != true)
|
||||
{
|
||||
GuiDraw.drawTooltipBox(k + 30, l + 50 + 12 - j, 114, 10);
|
||||
this.fontRendererObj.drawString(ModInfo.MISSING_MULTIBLOCK, k + 38, l + 52 + 12 - j, -1);
|
||||
|
||||
if (compresser.getMutliBlock() != true) {
|
||||
GuiDraw.drawTooltipBox(k + 30, l + 50 + 12 - j, 114, 10);
|
||||
this.fontRendererObj.drawString(ModInfo.MISSING_MULTIBLOCK, k + 38, l + 52 + 12 - j, -1);
|
||||
}
|
||||
|
||||
this.drawTexturedModalRect(k + 60, l + 38, 176, 14, j + 1, 16);
|
||||
this.drawTexturedModalRect(k + 60, l + 38, 176, 14, j + 1, 16);
|
||||
|
||||
j = (int) (this.compresser.crafter.energy.getEnergy() * 12 / this.compresser.getMaxPower());
|
||||
if(j > 0) {
|
||||
this.drawTexturedModalRect(k + 16, l + 37 + 12 - j, 176, 12 - j, 14, j + 2);
|
||||
}
|
||||
}
|
||||
j = (int) (this.compresser.crafter.energy.getEnergy() * 12 / this.compresser.getMaxPower());
|
||||
if (j > 0) {
|
||||
this.drawTexturedModalRect(k + 16, l + 37 + 12 - j, 176, 12 - j, 14, j + 2);
|
||||
}
|
||||
}
|
||||
|
||||
protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_) {
|
||||
String name = StatCollector.translateToLocal("tile.techreborn.implosioncompressor.name");
|
||||
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
|
||||
this.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, 4210752);
|
||||
}
|
||||
protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_) {
|
||||
String name = StatCollector.translateToLocal("tile.techreborn.implosioncompressor.name");
|
||||
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
|
||||
this.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, 4210752);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
package techreborn.client.gui;
|
||||
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import techreborn.client.container.ContainerIndustrialElectrolyzer;
|
||||
|
@ -12,21 +10,20 @@ import techreborn.tiles.TileIndustrialElectrolyzer;
|
|||
|
||||
public class GuiIndustrialElectrolyzer extends GuiContainer {
|
||||
|
||||
private static final ResourceLocation texture = new ResourceLocation("techreborn", "textures/gui/industrial_electrolyzer.png");
|
||||
private static final ResourceLocation texture = new ResourceLocation("techreborn", "textures/gui/industrial_electrolyzer.png");
|
||||
|
||||
TileIndustrialElectrolyzer eletrolyzer;
|
||||
TileIndustrialElectrolyzer eletrolyzer;
|
||||
|
||||
ContainerIndustrialElectrolyzer containerIndustrialElectrolyzer;
|
||||
|
||||
public GuiIndustrialElectrolyzer(EntityPlayer player, TileIndustrialElectrolyzer tileeletrolyzer)
|
||||
{
|
||||
super(new ContainerIndustrialElectrolyzer(tileeletrolyzer, player));
|
||||
this.xSize = 176;
|
||||
this.ySize = 167;
|
||||
eletrolyzer = tileeletrolyzer;
|
||||
public GuiIndustrialElectrolyzer(EntityPlayer player, TileIndustrialElectrolyzer tileeletrolyzer) {
|
||||
super(new ContainerIndustrialElectrolyzer(tileeletrolyzer, player));
|
||||
this.xSize = 176;
|
||||
this.ySize = 167;
|
||||
eletrolyzer = tileeletrolyzer;
|
||||
containerIndustrialElectrolyzer = (ContainerIndustrialElectrolyzer) this.inventorySlots;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initGui() {
|
||||
int k = (this.width - this.xSize) / 2;
|
||||
|
@ -34,32 +31,30 @@ public class GuiIndustrialElectrolyzer extends GuiContainer {
|
|||
super.initGui();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_)
|
||||
{
|
||||
this.mc.getTextureManager().bindTexture(texture);
|
||||
int k = (this.width - this.xSize) / 2;
|
||||
int l = (this.height - this.ySize) / 2;
|
||||
this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
|
||||
|
||||
int j = 0;
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
|
||||
this.mc.getTextureManager().bindTexture(texture);
|
||||
int k = (this.width - this.xSize) / 2;
|
||||
int l = (this.height - this.ySize) / 2;
|
||||
this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
|
||||
|
||||
int j = 0;
|
||||
|
||||
j = eletrolyzer.getProgressScaled(24);
|
||||
if(j > 0) {
|
||||
this.drawTexturedModalRect(k + 72, l + 38, 176, 14, j + 1, 16);
|
||||
}
|
||||
if (j > 0) {
|
||||
this.drawTexturedModalRect(k + 72, l + 38, 176, 14, j + 1, 16);
|
||||
}
|
||||
|
||||
j = eletrolyzer.getEnergyScaled(12);
|
||||
if(j > 0) {
|
||||
if (j > 0) {
|
||||
this.drawTexturedModalRect(k + 134, l + 36 + 12 - j, 176, 12 - j, 14, j + 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_)
|
||||
{
|
||||
String name = StatCollector.translateToLocal("tile.techreborn.industrialelectrolyzer.name");
|
||||
this.fontRendererObj.drawString(name, (this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2), 6, 4210752);
|
||||
this.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8,
|
||||
this.ySize - 96 + 2, 4210752);
|
||||
}
|
||||
protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_) {
|
||||
String name = StatCollector.translateToLocal("tile.techreborn.industrialelectrolyzer.name");
|
||||
this.fontRendererObj.drawString(name, (this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2), 6, 4210752);
|
||||
this.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8,
|
||||
this.ySize - 96 + 2, 4210752);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,20 +14,19 @@ import techreborn.tiles.TileIndustrialSawmill;
|
|||
|
||||
public class GuiIndustrialSawmill extends GuiContainer {
|
||||
|
||||
private static final ResourceLocation texture = new ResourceLocation(
|
||||
"techreborn", "textures/gui/industrial_sawmill.png");
|
||||
private static final ResourceLocation texture = new ResourceLocation(
|
||||
"techreborn", "textures/gui/industrial_sawmill.png");
|
||||
|
||||
TileIndustrialSawmill sawmill;
|
||||
TileIndustrialSawmill sawmill;
|
||||
|
||||
public GuiIndustrialSawmill(EntityPlayer player,
|
||||
TileIndustrialSawmill tilesawmill) {
|
||||
super(new ContainerIndustrialSawmill(tilesawmill, player));
|
||||
this.xSize = 176;
|
||||
this.ySize = 167;
|
||||
sawmill = tilesawmill;
|
||||
}
|
||||
|
||||
public GuiIndustrialSawmill(EntityPlayer player,
|
||||
TileIndustrialSawmill tilesawmill)
|
||||
{
|
||||
super(new ContainerIndustrialSawmill(tilesawmill, player));
|
||||
this.xSize = 176;
|
||||
this.ySize = 167;
|
||||
sawmill = tilesawmill;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initGui() {
|
||||
int k = (this.width - this.xSize) / 2;
|
||||
|
@ -35,61 +34,56 @@ public class GuiIndustrialSawmill extends GuiContainer {
|
|||
super.initGui();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_,
|
||||
int p_146976_2_, int p_146976_3_)
|
||||
{
|
||||
this.mc.getTextureManager().bindTexture(texture);
|
||||
int k = (this.width - this.xSize) / 2;
|
||||
int l = (this.height - this.ySize) / 2;
|
||||
this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_,
|
||||
int p_146976_2_, int p_146976_3_) {
|
||||
this.mc.getTextureManager().bindTexture(texture);
|
||||
int k = (this.width - this.xSize) / 2;
|
||||
int l = (this.height - this.ySize) / 2;
|
||||
this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
|
||||
|
||||
int j = 0;
|
||||
|
||||
j = sawmill.getProgressScaled(24);
|
||||
if(j > 0) {
|
||||
if (j > 0) {
|
||||
this.drawTexturedModalRect(k + 56, l + 38, 176, 14, j - 1, 11);
|
||||
}
|
||||
|
||||
|
||||
j = sawmill.getEnergyScaled(12);
|
||||
if(j > 0) {
|
||||
this.drawTexturedModalRect(k + 33, l + 65 + 12 - j, 176, 12 - j, 14, j + 2);
|
||||
}
|
||||
|
||||
if (sawmill.tank.getFluidAmount() != 0)
|
||||
{
|
||||
IIcon fluidIcon = sawmill.tank.getFluid().getFluid().getIcon();
|
||||
if (fluidIcon != null)
|
||||
{
|
||||
drawTexturedModalRect(k + 7, l + 15, 176, 31, 20, 55);
|
||||
|
||||
this.mc.renderEngine
|
||||
.bindTexture(TextureMap.locationBlocksTexture);
|
||||
int liquidHeight = sawmill.tank.getFluidAmount() * 47
|
||||
/ sawmill.tank.getCapacity();
|
||||
GuiUtil.drawRepeated(fluidIcon, k + 11, l + 19 + 47
|
||||
- liquidHeight, 12.0D, liquidHeight, this.zLevel);
|
||||
|
||||
this.mc.renderEngine.bindTexture(texture);
|
||||
drawTexturedModalRect(k + 11, l + 19, 176, 86, 12, 47);
|
||||
}
|
||||
}
|
||||
|
||||
if(sawmill.getMutliBlock() != true)
|
||||
{
|
||||
GuiUtil.drawTooltipBox(k + 30, l + 50 + 12 - 0, 114, 10);
|
||||
this.fontRendererObj.drawString(ModInfo.MISSING_MULTIBLOCK, k + 38, l + 52 + 12 - 0, -1);
|
||||
j = sawmill.getEnergyScaled(12);
|
||||
if (j > 0) {
|
||||
this.drawTexturedModalRect(k + 33, l + 65 + 12 - j, 176, 12 - j, 14, j + 2);
|
||||
}
|
||||
|
||||
}
|
||||
if (sawmill.tank.getFluidAmount() != 0) {
|
||||
IIcon fluidIcon = sawmill.tank.getFluid().getFluid().getIcon();
|
||||
if (fluidIcon != null) {
|
||||
drawTexturedModalRect(k + 7, l + 15, 176, 31, 20, 55);
|
||||
|
||||
protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_)
|
||||
{
|
||||
String name = StatCollector.translateToLocal("tile.techreborn.industrialSawmill.name");
|
||||
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
|
||||
this.fontRendererObj.drawString(
|
||||
I18n.format("container.inventory", new Object[0]), 58,
|
||||
this.ySize - 96 + 2, 4210752);
|
||||
}
|
||||
this.mc.renderEngine
|
||||
.bindTexture(TextureMap.locationBlocksTexture);
|
||||
int liquidHeight = sawmill.tank.getFluidAmount() * 47
|
||||
/ sawmill.tank.getCapacity();
|
||||
GuiUtil.drawRepeated(fluidIcon, k + 11, l + 19 + 47
|
||||
- liquidHeight, 12.0D, liquidHeight, this.zLevel);
|
||||
|
||||
this.mc.renderEngine.bindTexture(texture);
|
||||
drawTexturedModalRect(k + 11, l + 19, 176, 86, 12, 47);
|
||||
}
|
||||
}
|
||||
|
||||
if (sawmill.getMutliBlock() != true) {
|
||||
GuiUtil.drawTooltipBox(k + 30, l + 50 + 12 - 0, 114, 10);
|
||||
this.fontRendererObj.drawString(ModInfo.MISSING_MULTIBLOCK, k + 38, l + 52 + 12 - 0, -1);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_) {
|
||||
String name = StatCollector.translateToLocal("tile.techreborn.industrialSawmill.name");
|
||||
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
|
||||
this.fontRendererObj.drawString(
|
||||
I18n.format("container.inventory", new Object[0]), 58,
|
||||
this.ySize - 96 + 2, 4210752);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,19 +10,19 @@ import techreborn.tiles.TileLathe;
|
|||
|
||||
public class GuiLathe extends GuiContainer {
|
||||
|
||||
private static final ResourceLocation texture = new ResourceLocation("techreborn", "textures/gui/lathe.png");
|
||||
private static final ResourceLocation texture = new ResourceLocation("techreborn", "textures/gui/lathe.png");
|
||||
|
||||
TileLathe lathe;
|
||||
TileLathe lathe;
|
||||
ContainerLathe containerLathe;
|
||||
|
||||
public GuiLathe(EntityPlayer player, TileLathe tilelathe) {
|
||||
super(new ContainerLathe(tilelathe, player));
|
||||
public GuiLathe(EntityPlayer player, TileLathe tilelathe) {
|
||||
super(new ContainerLathe(tilelathe, player));
|
||||
containerLathe = (ContainerLathe) this.inventorySlots;
|
||||
this.xSize = 176;
|
||||
this.ySize = 167;
|
||||
lathe = tilelathe;
|
||||
}
|
||||
|
||||
this.xSize = 176;
|
||||
this.ySize = 167;
|
||||
lathe = tilelathe;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initGui() {
|
||||
int k = (this.width - this.xSize) / 2;
|
||||
|
@ -30,29 +30,29 @@ public class GuiLathe extends GuiContainer {
|
|||
super.initGui();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
|
||||
this.mc.getTextureManager().bindTexture(texture);
|
||||
int k = (this.width - this.xSize) / 2;
|
||||
int l = (this.height - this.ySize) / 2;
|
||||
this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
|
||||
this.mc.getTextureManager().bindTexture(texture);
|
||||
int k = (this.width - this.xSize) / 2;
|
||||
int l = (this.height - this.ySize) / 2;
|
||||
this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
|
||||
|
||||
int j = 0;
|
||||
int j = 0;
|
||||
|
||||
j = lathe.getProgressScaled(20);
|
||||
if(j > 0) {
|
||||
this.drawTexturedModalRect(k + 80, l + 34, 176, 14, j, 16);
|
||||
}
|
||||
j = lathe.getProgressScaled(20);
|
||||
if (j > 0) {
|
||||
this.drawTexturedModalRect(k + 80, l + 34, 176, 14, j, 16);
|
||||
}
|
||||
|
||||
j = lathe.getEnergyScaled(12);
|
||||
if(j > 0) {
|
||||
this.drawTexturedModalRect(k + 56, l + 36 + 12 - j, 176, 12 - j, 14, j + 2);
|
||||
}
|
||||
}
|
||||
j = lathe.getEnergyScaled(12);
|
||||
if (j > 0) {
|
||||
this.drawTexturedModalRect(k + 56, l + 36 + 12 - j, 176, 12 - j, 14, j + 2);
|
||||
}
|
||||
}
|
||||
|
||||
protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_) {
|
||||
String name = StatCollector.translateToLocal("tile.techreborn.lathe.name");
|
||||
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
|
||||
this.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, 4210752);
|
||||
}
|
||||
protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_) {
|
||||
String name = StatCollector.translateToLocal("tile.techreborn.lathe.name");
|
||||
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
|
||||
this.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, 4210752);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,19 +19,17 @@ public class GuiLesu extends GuiContainer {
|
|||
ContainerLesu containerLesu;
|
||||
|
||||
public GuiLesu(EntityPlayer player,
|
||||
TileLesu tileaesu)
|
||||
{
|
||||
TileLesu tileaesu) {
|
||||
super(new ContainerLesu(tileaesu, player));
|
||||
this.xSize = 156;
|
||||
this.ySize = 200;
|
||||
aesu = tileaesu;
|
||||
this.containerLesu = (ContainerLesu) this.inventorySlots;
|
||||
this.containerLesu = (ContainerLesu) this.inventorySlots;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_,
|
||||
int p_146976_2_, int p_146976_3_)
|
||||
{
|
||||
int p_146976_2_, int p_146976_3_) {
|
||||
this.mc.getTextureManager().bindTexture(texture);
|
||||
int k = (this.width - this.xSize) / 2;
|
||||
int l = (this.height - this.ySize) / 2;
|
||||
|
@ -39,8 +37,7 @@ public class GuiLesu extends GuiContainer {
|
|||
}
|
||||
|
||||
protected void drawGuiContainerForegroundLayer(int p_146979_1_,
|
||||
int p_146979_2_)
|
||||
{
|
||||
int p_146979_2_) {
|
||||
this.fontRendererObj.drawString(StatCollector.translateToLocal("tile.techreborn.lesu.name"), 40, 10, Color.WHITE.getRGB());
|
||||
this.fontRendererObj.drawString(GetEUString(containerLesu.euOut) + "/t", 10, 20, Color.WHITE.getRGB());
|
||||
this.fontRendererObj.drawString(GetEUString(containerLesu.storedEu), 10, 30, Color.WHITE.getRGB());
|
||||
|
@ -49,18 +46,15 @@ public class GuiLesu extends GuiContainer {
|
|||
this.fontRendererObj.drawString(GetEUString(containerLesu.euStorage) + " max", 10, 60, Color.WHITE.getRGB());
|
||||
}
|
||||
|
||||
private String GetEUString(double euValue)
|
||||
{
|
||||
if (euValue >= 1000000) {
|
||||
double tenX = Math.round(euValue / 100000);
|
||||
return Double.toString(tenX / 10.0).concat(" m EU");
|
||||
}
|
||||
else if (euValue >= 1000) {
|
||||
double tenX = Math.round(euValue / 100);
|
||||
return Double.toString(tenX / 10.0).concat(" k EU");
|
||||
}
|
||||
else {
|
||||
return Double.toString(Math.floor(euValue)).concat(" EU");
|
||||
}
|
||||
}
|
||||
private String GetEUString(double euValue) {
|
||||
if (euValue >= 1000000) {
|
||||
double tenX = Math.round(euValue / 100000);
|
||||
return Double.toString(tenX / 10.0).concat(" m EU");
|
||||
} else if (euValue >= 1000) {
|
||||
double tenX = Math.round(euValue / 100);
|
||||
return Double.toString(tenX / 10.0).concat(" k EU");
|
||||
} else {
|
||||
return Double.toString(Math.floor(euValue)).concat(" EU");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,50 +8,47 @@ import net.minecraft.util.StatCollector;
|
|||
import techreborn.client.container.ContainerMatterFabricator;
|
||||
import techreborn.tiles.TileMatterFabricator;
|
||||
|
||||
public class GuiMatterFabricator extends GuiContainer{
|
||||
|
||||
private static final ResourceLocation texture = new ResourceLocation(
|
||||
"techreborn", "textures/gui/matterfabricator.png");
|
||||
public class GuiMatterFabricator extends GuiContainer {
|
||||
|
||||
TileMatterFabricator matterfab;
|
||||
private static final ResourceLocation texture = new ResourceLocation(
|
||||
"techreborn", "textures/gui/matterfabricator.png");
|
||||
|
||||
ContainerMatterFabricator containerMatterFabricator;
|
||||
|
||||
public GuiMatterFabricator(EntityPlayer player, TileMatterFabricator tilematterfab)
|
||||
{
|
||||
super(new ContainerMatterFabricator(tilematterfab, player));
|
||||
this.xSize = 176;
|
||||
this.ySize = 167;
|
||||
matterfab = tilematterfab;
|
||||
containerMatterFabricator = (ContainerMatterFabricator) this.inventorySlots;
|
||||
}
|
||||
TileMatterFabricator matterfab;
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_,
|
||||
int p_146976_2_, int p_146976_3_)
|
||||
{
|
||||
this.mc.getTextureManager().bindTexture(texture);
|
||||
int k = (this.width - this.xSize) / 2;
|
||||
int l = (this.height - this.ySize) / 2;
|
||||
this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
|
||||
ContainerMatterFabricator containerMatterFabricator;
|
||||
|
||||
int j = containerMatterFabricator.getProgressScaled(24);
|
||||
if(j > 0) {
|
||||
this.drawTexturedModalRect(k + 79, l + 34, 176, 14, j + 1, 16);
|
||||
}
|
||||
}
|
||||
public GuiMatterFabricator(EntityPlayer player, TileMatterFabricator tilematterfab) {
|
||||
super(new ContainerMatterFabricator(tilematterfab, player));
|
||||
this.xSize = 176;
|
||||
this.ySize = 167;
|
||||
matterfab = tilematterfab;
|
||||
containerMatterFabricator = (ContainerMatterFabricator) this.inventorySlots;
|
||||
}
|
||||
|
||||
protected void drawGuiContainerForegroundLayer(int p_146979_1_,
|
||||
int p_146979_2_)
|
||||
{
|
||||
int k = (this.width - this.xSize) / 2;
|
||||
int l = (this.height - this.ySize) / 2;
|
||||
String name = StatCollector.translateToLocal("tile.techreborn.matterfabricator.name");
|
||||
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
|
||||
this.fontRendererObj.drawString(
|
||||
I18n.format("container.inventory", new Object[0]), 8,
|
||||
this.ySize - 96 + 2, 4210752);
|
||||
this.fontRendererObj.drawString(containerMatterFabricator.getProgressScaled(100) + "%", 80, 50, 4210752);
|
||||
}
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_,
|
||||
int p_146976_2_, int p_146976_3_) {
|
||||
this.mc.getTextureManager().bindTexture(texture);
|
||||
int k = (this.width - this.xSize) / 2;
|
||||
int l = (this.height - this.ySize) / 2;
|
||||
this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
|
||||
|
||||
int j = containerMatterFabricator.getProgressScaled(24);
|
||||
if (j > 0) {
|
||||
this.drawTexturedModalRect(k + 79, l + 34, 176, 14, j + 1, 16);
|
||||
}
|
||||
}
|
||||
|
||||
protected void drawGuiContainerForegroundLayer(int p_146979_1_,
|
||||
int p_146979_2_) {
|
||||
int k = (this.width - this.xSize) / 2;
|
||||
int l = (this.height - this.ySize) / 2;
|
||||
String name = StatCollector.translateToLocal("tile.techreborn.matterfabricator.name");
|
||||
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
|
||||
this.fontRendererObj.drawString(
|
||||
I18n.format("container.inventory", new Object[0]), 8,
|
||||
this.ySize - 96 + 2, 4210752);
|
||||
this.fontRendererObj.drawString(containerMatterFabricator.getProgressScaled(100) + "%", 80, 50, 4210752);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -10,20 +10,20 @@ import techreborn.tiles.TilePlateCuttingMachine;
|
|||
|
||||
public class GuiPlateCuttingMachine extends GuiContainer {
|
||||
|
||||
private static final ResourceLocation texture = new ResourceLocation("techreborn", "textures/gui/plate_cutting_machine.png");
|
||||
private static final ResourceLocation texture = new ResourceLocation("techreborn", "textures/gui/plate_cutting_machine.png");
|
||||
|
||||
TilePlateCuttingMachine platecuttingmachine;
|
||||
TilePlateCuttingMachine platecuttingmachine;
|
||||
|
||||
ContainerPlateCuttingMachine containerPlateCuttingMachine;
|
||||
|
||||
public GuiPlateCuttingMachine(EntityPlayer player, TilePlateCuttingMachine tileplatecuttingmachine) {
|
||||
super(new ContainerPlateCuttingMachine(tileplatecuttingmachine, player));
|
||||
public GuiPlateCuttingMachine(EntityPlayer player, TilePlateCuttingMachine tileplatecuttingmachine) {
|
||||
super(new ContainerPlateCuttingMachine(tileplatecuttingmachine, player));
|
||||
containerPlateCuttingMachine = (ContainerPlateCuttingMachine) this.inventorySlots;
|
||||
this.xSize = 176;
|
||||
this.ySize = 167;
|
||||
platecuttingmachine = tileplatecuttingmachine;
|
||||
}
|
||||
|
||||
this.xSize = 176;
|
||||
this.ySize = 167;
|
||||
platecuttingmachine = tileplatecuttingmachine;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initGui() {
|
||||
int k = (this.width - this.xSize) / 2;
|
||||
|
@ -31,29 +31,29 @@ public class GuiPlateCuttingMachine extends GuiContainer {
|
|||
super.initGui();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
|
||||
this.mc.getTextureManager().bindTexture(texture);
|
||||
int k = (this.width - this.xSize) / 2;
|
||||
int l = (this.height - this.ySize) / 2;
|
||||
this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
|
||||
this.mc.getTextureManager().bindTexture(texture);
|
||||
int k = (this.width - this.xSize) / 2;
|
||||
int l = (this.height - this.ySize) / 2;
|
||||
this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
|
||||
|
||||
int j = 0;
|
||||
int j = 0;
|
||||
|
||||
j = platecuttingmachine.getProgressScaled(20);
|
||||
if(j > 0) {
|
||||
this.drawTexturedModalRect(k + 83, l + 34, 176, 14, j, 16);
|
||||
}
|
||||
j = platecuttingmachine.getProgressScaled(20);
|
||||
if (j > 0) {
|
||||
this.drawTexturedModalRect(k + 83, l + 34, 176, 14, j, 16);
|
||||
}
|
||||
|
||||
j = platecuttingmachine.getEnergyScaled(12);
|
||||
if(j > 0) {
|
||||
this.drawTexturedModalRect(k + 56, l + 36 + 12 - j, 176, 12 - j, 14, j + 2);
|
||||
}
|
||||
}
|
||||
j = platecuttingmachine.getEnergyScaled(12);
|
||||
if (j > 0) {
|
||||
this.drawTexturedModalRect(k + 56, l + 36 + 12 - j, 176, 12 - j, 14, j + 2);
|
||||
}
|
||||
}
|
||||
|
||||
protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_) {
|
||||
String name = StatCollector.translateToLocal("tile.techreborn.platecuttingmachine.name");
|
||||
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
|
||||
this.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, 4210752);
|
||||
}
|
||||
protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_) {
|
||||
String name = StatCollector.translateToLocal("tile.techreborn.platecuttingmachine.name");
|
||||
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
|
||||
this.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, 4210752);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,40 +10,37 @@ import techreborn.tiles.TileQuantumChest;
|
|||
|
||||
public class GuiQuantumChest extends GuiContainer {
|
||||
|
||||
private static final ResourceLocation texture = new ResourceLocation(
|
||||
"techreborn", "textures/gui/ThermalGenerator.png");
|
||||
private static final ResourceLocation texture = new ResourceLocation(
|
||||
"techreborn", "textures/gui/ThermalGenerator.png");
|
||||
|
||||
TileQuantumChest tile;
|
||||
TileQuantumChest tile;
|
||||
|
||||
public GuiQuantumChest(EntityPlayer player, TileQuantumChest tile)
|
||||
{
|
||||
super(new ContainerQuantumChest(tile, player));
|
||||
this.xSize = 176;
|
||||
this.ySize = 167;
|
||||
this.tile = tile;
|
||||
}
|
||||
public GuiQuantumChest(EntityPlayer player, TileQuantumChest tile) {
|
||||
super(new ContainerQuantumChest(tile, player));
|
||||
this.xSize = 176;
|
||||
this.ySize = 167;
|
||||
this.tile = tile;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_,
|
||||
int p_146976_2_, int p_146976_3_)
|
||||
{
|
||||
this.mc.getTextureManager().bindTexture(texture);
|
||||
int k = (this.width - this.xSize) / 2;
|
||||
int l = (this.height - this.ySize) / 2;
|
||||
this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
|
||||
}
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_,
|
||||
int p_146976_2_, int p_146976_3_) {
|
||||
this.mc.getTextureManager().bindTexture(texture);
|
||||
int k = (this.width - this.xSize) / 2;
|
||||
int l = (this.height - this.ySize) / 2;
|
||||
this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
|
||||
}
|
||||
|
||||
protected void drawGuiContainerForegroundLayer(int p_146979_1_,
|
||||
int p_146979_2_)
|
||||
{
|
||||
String name = StatCollector.translateToLocal("tile.techreborn.quantumChest.name");
|
||||
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
|
||||
this.fontRendererObj.drawString(
|
||||
I18n.format("container.inventory", new Object[0]), 8,
|
||||
this.ySize - 96 + 2, 4210752);
|
||||
this.fontRendererObj.drawString("Amount", 10, 20, 16448255);
|
||||
if (tile.storedItem != null)
|
||||
this.fontRendererObj.drawString(tile.storedItem.stackSize + "", 10,
|
||||
30, 16448255);
|
||||
}
|
||||
protected void drawGuiContainerForegroundLayer(int p_146979_1_,
|
||||
int p_146979_2_) {
|
||||
String name = StatCollector.translateToLocal("tile.techreborn.quantumChest.name");
|
||||
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
|
||||
this.fontRendererObj.drawString(
|
||||
I18n.format("container.inventory", new Object[0]), 8,
|
||||
this.ySize - 96 + 2, 4210752);
|
||||
this.fontRendererObj.drawString("Amount", 10, 20, 16448255);
|
||||
if (tile.storedItem != null)
|
||||
this.fontRendererObj.drawString(tile.storedItem.stackSize + "", 10,
|
||||
30, 16448255);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,39 +10,36 @@ import techreborn.tiles.TileQuantumTank;
|
|||
|
||||
public class GuiQuantumTank extends GuiContainer {
|
||||
|
||||
private static final ResourceLocation texture = new ResourceLocation(
|
||||
"techreborn", "textures/gui/ThermalGenerator.png");
|
||||
private static final ResourceLocation texture = new ResourceLocation(
|
||||
"techreborn", "textures/gui/ThermalGenerator.png");
|
||||
|
||||
TileQuantumTank tile;
|
||||
TileQuantumTank tile;
|
||||
|
||||
public GuiQuantumTank(EntityPlayer player, TileQuantumTank tile)
|
||||
{
|
||||
super(new ContainerQuantumTank(tile, player));
|
||||
this.xSize = 176;
|
||||
this.ySize = 167;
|
||||
this.tile = tile;
|
||||
}
|
||||
public GuiQuantumTank(EntityPlayer player, TileQuantumTank tile) {
|
||||
super(new ContainerQuantumTank(tile, player));
|
||||
this.xSize = 176;
|
||||
this.ySize = 167;
|
||||
this.tile = tile;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_,
|
||||
int p_146976_2_, int p_146976_3_)
|
||||
{
|
||||
this.mc.getTextureManager().bindTexture(texture);
|
||||
int k = (this.width - this.xSize) / 2;
|
||||
int l = (this.height - this.ySize) / 2;
|
||||
this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
|
||||
}
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_,
|
||||
int p_146976_2_, int p_146976_3_) {
|
||||
this.mc.getTextureManager().bindTexture(texture);
|
||||
int k = (this.width - this.xSize) / 2;
|
||||
int l = (this.height - this.ySize) / 2;
|
||||
this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
|
||||
}
|
||||
|
||||
protected void drawGuiContainerForegroundLayer(int p_146979_1_,
|
||||
int p_146979_2_)
|
||||
{
|
||||
String name = StatCollector.translateToLocal("tile.techreborn.quantumTank.name");
|
||||
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
|
||||
this.fontRendererObj.drawString(
|
||||
I18n.format("container.inventory", new Object[0]), 8,
|
||||
this.ySize - 96 + 2, 4210752);
|
||||
this.fontRendererObj.drawString("Liquid Amount", 10, 20, 16448255);
|
||||
this.fontRendererObj.drawString(tile.tank.getFluidAmount() + "", 10,
|
||||
30, 16448255);
|
||||
}
|
||||
protected void drawGuiContainerForegroundLayer(int p_146979_1_,
|
||||
int p_146979_2_) {
|
||||
String name = StatCollector.translateToLocal("tile.techreborn.quantumTank.name");
|
||||
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
|
||||
this.fontRendererObj.drawString(
|
||||
I18n.format("container.inventory", new Object[0]), 8,
|
||||
this.ySize - 96 + 2, 4210752);
|
||||
this.fontRendererObj.drawString("Liquid Amount", 10, 20, 16448255);
|
||||
this.fontRendererObj.drawString(tile.tank.getFluidAmount() + "", 10,
|
||||
30, 16448255);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,44 +11,40 @@ import techreborn.tiles.TileRollingMachine;
|
|||
|
||||
public class GuiRollingMachine extends GuiContainer {
|
||||
|
||||
private static final ResourceLocation texture = new ResourceLocation(
|
||||
"techreborn", "textures/gui/rolling_machine.png");
|
||||
TileRollingMachine rollingMachine;
|
||||
private static final ResourceLocation texture = new ResourceLocation(
|
||||
"techreborn", "textures/gui/rolling_machine.png");
|
||||
TileRollingMachine rollingMachine;
|
||||
|
||||
public GuiRollingMachine(EntityPlayer player, TileRollingMachine tileRollingmachine)
|
||||
{
|
||||
super(new ContainerRollingMachine(tileRollingmachine, player));
|
||||
this.xSize = 176;
|
||||
this.ySize = 167;
|
||||
rollingMachine = tileRollingmachine;
|
||||
}
|
||||
public GuiRollingMachine(EntityPlayer player, TileRollingMachine tileRollingmachine) {
|
||||
super(new ContainerRollingMachine(tileRollingmachine, player));
|
||||
this.xSize = 176;
|
||||
this.ySize = 167;
|
||||
rollingMachine = tileRollingmachine;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_)
|
||||
{
|
||||
this.mc.getTextureManager().bindTexture(texture);
|
||||
int k = (this.width - this.xSize) / 2;
|
||||
int l = (this.height - this.ySize) / 2;
|
||||
this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
|
||||
}
|
||||
|
||||
protected void drawGuiContainerForegroundLayer(int p_146979_1_,
|
||||
int p_146979_2_)
|
||||
{
|
||||
String name = StatCollector.translateToLocal("tile.techreborn.rollingmachine.name");
|
||||
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
|
||||
this.fontRendererObj.drawString(
|
||||
I18n.format("container.inventory", new Object[0]), 8,
|
||||
this.ySize - 96 + 2, 4210752);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initGui()
|
||||
{
|
||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
|
||||
this.mc.getTextureManager().bindTexture(texture);
|
||||
int k = (this.width - this.xSize) / 2;
|
||||
int l = (this.height - this.ySize) / 2;
|
||||
this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
|
||||
}
|
||||
|
||||
protected void drawGuiContainerForegroundLayer(int p_146979_1_,
|
||||
int p_146979_2_) {
|
||||
String name = StatCollector.translateToLocal("tile.techreborn.rollingmachine.name");
|
||||
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
|
||||
this.fontRendererObj.drawString(
|
||||
I18n.format("container.inventory", new Object[0]), 8,
|
||||
this.ySize - 96 + 2, 4210752);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initGui() {
|
||||
this.buttonList.clear();
|
||||
int k = (this.width - this.xSize) / 2;
|
||||
int l = (this.height - this.ySize) / 2;
|
||||
this.buttonList.add(new GuiButton(0, k + 4, l + 4, 20, 20, "R"));
|
||||
this.buttonList.add(new GuiButton(0, k + 4, l + 4, 20, 20, "R"));
|
||||
super.initGui();
|
||||
}
|
||||
|
||||
|
|
|
@ -9,39 +9,36 @@ import techreborn.tiles.TileSemifluidGenerator;
|
|||
|
||||
public class GuiSemifluidGenerator extends GuiContainer {
|
||||
|
||||
//TODO: use semifluid generator texture
|
||||
private static final ResourceLocation texture = new ResourceLocation(
|
||||
"techreborn", "textures/gui/ThermalGenerator.png");
|
||||
//TODO: use semifluid generator texture
|
||||
private static final ResourceLocation texture = new ResourceLocation(
|
||||
"techreborn", "textures/gui/ThermalGenerator.png");
|
||||
|
||||
TileSemifluidGenerator tile;
|
||||
TileSemifluidGenerator tile;
|
||||
|
||||
public GuiSemifluidGenerator(EntityPlayer player, TileSemifluidGenerator tile)
|
||||
{
|
||||
super(new ContainerSemifluidGenerator(tile, player));
|
||||
this.xSize = 176;
|
||||
this.ySize = 167;
|
||||
this.tile = tile;
|
||||
}
|
||||
public GuiSemifluidGenerator(EntityPlayer player, TileSemifluidGenerator tile) {
|
||||
super(new ContainerSemifluidGenerator(tile, player));
|
||||
this.xSize = 176;
|
||||
this.ySize = 167;
|
||||
this.tile = tile;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_)
|
||||
{
|
||||
this.mc.getTextureManager().bindTexture(texture);
|
||||
int k = (this.width - this.xSize) / 2;
|
||||
int l = (this.height - this.ySize) / 2;
|
||||
this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
|
||||
}
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
|
||||
this.mc.getTextureManager().bindTexture(texture);
|
||||
int k = (this.width - this.xSize) / 2;
|
||||
int l = (this.height - this.ySize) / 2;
|
||||
this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
|
||||
}
|
||||
|
||||
protected void drawGuiContainerForegroundLayer(int p_146979_1_,
|
||||
int p_146979_2_)
|
||||
{
|
||||
String name = "Semifluid Generator";
|
||||
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
|
||||
this.fontRendererObj.drawString(
|
||||
I18n.format("container.inventory", new Object[0]), 8,
|
||||
this.ySize - 96 + 2, 4210752);
|
||||
this.fontRendererObj.drawString("Liquid Amount", 10, 20, 16448255);
|
||||
this.fontRendererObj.drawString(tile.tank.getFluidAmount() + "", 10,
|
||||
30, 16448255);
|
||||
}
|
||||
protected void drawGuiContainerForegroundLayer(int p_146979_1_,
|
||||
int p_146979_2_) {
|
||||
String name = "Semifluid Generator";
|
||||
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
|
||||
this.fontRendererObj.drawString(
|
||||
I18n.format("container.inventory", new Object[0]), 8,
|
||||
this.ySize - 96 + 2, 4210752);
|
||||
this.fontRendererObj.drawString("Liquid Amount", 10, 20, 16448255);
|
||||
this.fontRendererObj.drawString(tile.tank.getFluidAmount() + "", 10,
|
||||
30, 16448255);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,39 +10,36 @@ import techreborn.tiles.TileThermalGenerator;
|
|||
|
||||
public class GuiThermalGenerator extends GuiContainer {
|
||||
|
||||
private static final ResourceLocation texture = new ResourceLocation(
|
||||
"techreborn", "textures/gui/ThermalGenerator.png");
|
||||
private static final ResourceLocation texture = new ResourceLocation(
|
||||
"techreborn", "textures/gui/ThermalGenerator.png");
|
||||
|
||||
TileThermalGenerator tile;
|
||||
TileThermalGenerator tile;
|
||||
|
||||
public GuiThermalGenerator(EntityPlayer player, TileThermalGenerator tile)
|
||||
{
|
||||
super(new ContainerThermalGenerator(tile, player));
|
||||
this.xSize = 176;
|
||||
this.ySize = 167;
|
||||
this.tile = tile;
|
||||
}
|
||||
public GuiThermalGenerator(EntityPlayer player, TileThermalGenerator tile) {
|
||||
super(new ContainerThermalGenerator(tile, player));
|
||||
this.xSize = 176;
|
||||
this.ySize = 167;
|
||||
this.tile = tile;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_,
|
||||
int p_146976_2_, int p_146976_3_)
|
||||
{
|
||||
this.mc.getTextureManager().bindTexture(texture);
|
||||
int k = (this.width - this.xSize) / 2;
|
||||
int l = (this.height - this.ySize) / 2;
|
||||
this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
|
||||
}
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_,
|
||||
int p_146976_2_, int p_146976_3_) {
|
||||
this.mc.getTextureManager().bindTexture(texture);
|
||||
int k = (this.width - this.xSize) / 2;
|
||||
int l = (this.height - this.ySize) / 2;
|
||||
this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
|
||||
}
|
||||
|
||||
protected void drawGuiContainerForegroundLayer(int p_146979_1_,
|
||||
int p_146979_2_)
|
||||
{
|
||||
String name = StatCollector.translateToLocal("tile.techreborn.thermalGenerator.name");
|
||||
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
|
||||
this.fontRendererObj.drawString(
|
||||
I18n.format("container.inventory", new Object[0]), 8,
|
||||
this.ySize - 96 + 2, 4210752);
|
||||
this.fontRendererObj.drawString("Liquid Amount", 10, 20, 16448255);
|
||||
this.fontRendererObj.drawString(tile.tank.getFluidAmount() + "", 10,
|
||||
30, 16448255);
|
||||
}
|
||||
protected void drawGuiContainerForegroundLayer(int p_146979_1_,
|
||||
int p_146979_2_) {
|
||||
String name = StatCollector.translateToLocal("tile.techreborn.thermalGenerator.name");
|
||||
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
|
||||
this.fontRendererObj.drawString(
|
||||
I18n.format("container.inventory", new Object[0]), 8,
|
||||
this.ySize - 96 + 2, 4210752);
|
||||
this.fontRendererObj.drawString("Liquid Amount", 10, 20, 16448255);
|
||||
this.fontRendererObj.drawString(tile.tank.getFluidAmount() + "", 10,
|
||||
30, 16448255);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,43 +9,36 @@ import org.lwjgl.opengl.GL11;
|
|||
|
||||
public class GuiHiddenButton extends GuiButton {
|
||||
|
||||
public GuiHiddenButton(int id, int xPosition, int yPosition, String displayString) {
|
||||
super(id, xPosition, yPosition, displayString);
|
||||
}
|
||||
public GuiHiddenButton(int id, int xPosition, int yPosition, String displayString) {
|
||||
super(id, xPosition, yPosition, displayString);
|
||||
}
|
||||
|
||||
public GuiHiddenButton(int id, int xPosition, int yPosition, int width, int height, String displayString) {
|
||||
super(id, xPosition, yPosition, width, height, displayString);
|
||||
}
|
||||
public GuiHiddenButton(int id, int xPosition, int yPosition, int width, int height, String displayString) {
|
||||
super(id, xPosition, yPosition, width, height, displayString);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawButton(Minecraft p_146112_1_, int p_146112_2_, int p_146112_3_)
|
||||
{
|
||||
if (this.visible)
|
||||
{
|
||||
FontRenderer fontrenderer = p_146112_1_.fontRenderer;
|
||||
p_146112_1_.getTextureManager().bindTexture(buttonTextures);
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
this.field_146123_n = p_146112_2_ >= this.xPosition && p_146112_3_ >= this.yPosition && p_146112_2_ < this.xPosition + this.width && p_146112_3_ < this.yPosition + this.height;
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
this.mouseDragged(p_146112_1_, p_146112_2_, p_146112_3_);
|
||||
int l = 14737632;
|
||||
@Override
|
||||
public void drawButton(Minecraft p_146112_1_, int p_146112_2_, int p_146112_3_) {
|
||||
if (this.visible) {
|
||||
FontRenderer fontrenderer = p_146112_1_.fontRenderer;
|
||||
p_146112_1_.getTextureManager().bindTexture(buttonTextures);
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
this.field_146123_n = p_146112_2_ >= this.xPosition && p_146112_3_ >= this.yPosition && p_146112_2_ < this.xPosition + this.width && p_146112_3_ < this.yPosition + this.height;
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
this.mouseDragged(p_146112_1_, p_146112_2_, p_146112_3_);
|
||||
int l = 14737632;
|
||||
|
||||
if (packedFGColour != 0)
|
||||
{
|
||||
l = packedFGColour;
|
||||
}
|
||||
else if (!this.enabled)
|
||||
{
|
||||
l = 10526880;
|
||||
}
|
||||
else if (this.field_146123_n)
|
||||
{
|
||||
l = 16777120;
|
||||
}
|
||||
if (packedFGColour != 0) {
|
||||
l = packedFGColour;
|
||||
} else if (!this.enabled) {
|
||||
l = 10526880;
|
||||
} else if (this.field_146123_n) {
|
||||
l = 16777120;
|
||||
}
|
||||
|
||||
this.drawCenteredString(fontrenderer, this.displayString, this.xPosition + this.width / 2, this.yPosition + (this.height - 8) / 2, l);
|
||||
}
|
||||
}
|
||||
this.drawCenteredString(fontrenderer, this.displayString, this.xPosition + this.width / 2, this.yPosition + (this.height - 8) / 2, l);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ import techreborn.cofhLib.gui.element.TabBase;
|
|||
* Created by mark on 18/06/15.
|
||||
*/
|
||||
public class TabIDConfig extends TabBase {
|
||||
public TabIDConfig(GuiBase gui) {
|
||||
super(gui);
|
||||
}
|
||||
public TabIDConfig(GuiBase gui) {
|
||||
super(gui);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,113 +19,96 @@ import techreborn.client.keybindings.KeyBindings;
|
|||
import techreborn.config.ConfigTechReborn;
|
||||
import techreborn.util.Color;
|
||||
|
||||
public class ChargeHud
|
||||
{
|
||||
public static final ChargeHud instance = new ChargeHud();
|
||||
private static Minecraft mc = Minecraft.getMinecraft();
|
||||
public static KeyBindings key;
|
||||
public static boolean showHud = true;
|
||||
public class ChargeHud {
|
||||
public static final ChargeHud instance = new ChargeHud();
|
||||
private static Minecraft mc = Minecraft.getMinecraft();
|
||||
public static KeyBindings key;
|
||||
public static boolean showHud = true;
|
||||
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@SubscribeEvent(priority = EventPriority.LOW)
|
||||
public void onRenderExperienceBar(RenderGameOverlayEvent event)
|
||||
{
|
||||
if (key.config.isPressed())
|
||||
{
|
||||
showHud = !showHud;
|
||||
}
|
||||
|
||||
if (event.isCancelable() || event.type != ElementType.ALL)
|
||||
return;
|
||||
|
||||
if (mc.inGameHasFocus || (mc.currentScreen != null && mc.gameSettings.showDebugInfo))
|
||||
{
|
||||
if (ConfigTechReborn.ShowChargeHud && ElectricItem.manager != null)
|
||||
drawChargeHud(event.resolution);
|
||||
}
|
||||
}
|
||||
|
||||
public void drawChargeHud(ScaledResolution res)
|
||||
{
|
||||
EntityPlayer player = mc.thePlayer;
|
||||
ItemStack stack = player.getCurrentArmor(2);
|
||||
ItemStack stack2 = mc.thePlayer.inventory.getCurrentItem();
|
||||
if (showHud)
|
||||
{
|
||||
if(stack2 != null)
|
||||
{
|
||||
if ((stack2.getItem() instanceof IElectricItem))
|
||||
{
|
||||
double MaxCharge = ((IElectricItem) stack2.getItem()).getMaxCharge(stack2);
|
||||
double CurrentCharge = ElectricItem.manager.getCharge(stack2);
|
||||
Color color = Color.GREEN;
|
||||
double quarter = MaxCharge / 4;
|
||||
double half = MaxCharge / 2;
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GL11.glEnable(32826);
|
||||
RenderHelper.enableStandardItemLighting();
|
||||
RenderHelper.enableGUIStandardItemLighting();
|
||||
RenderItem.getInstance().renderItemAndEffectIntoGUI(mc.fontRenderer, mc.renderEngine, stack2, 0, 20);
|
||||
RenderItem.getInstance().renderItemOverlayIntoGUI(mc.fontRenderer, mc.renderEngine, stack2, 0, 20);
|
||||
if(CurrentCharge <= half)
|
||||
{
|
||||
color = Color.YELLOW;
|
||||
}
|
||||
if(CurrentCharge <= quarter)
|
||||
{
|
||||
color = Color.DARK_RED;
|
||||
}
|
||||
mc.fontRenderer.drawString(color + GetEUString(CurrentCharge) + "/" + GetEUString(MaxCharge), 20, 25, 0);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if(stack != null)
|
||||
{
|
||||
if((stack.getItem() instanceof IElectricItem) && ConfigTechReborn.ShowChargeHud)
|
||||
{
|
||||
double MaxCharge = ((IElectricItem) stack.getItem()).getMaxCharge(stack);
|
||||
double CurrentCharge = ElectricItem.manager.getCharge(stack);
|
||||
Color color = Color.GREEN;
|
||||
double quarter = MaxCharge / 4;
|
||||
double half = MaxCharge / 2;
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GL11.glEnable(32826);
|
||||
RenderHelper.enableStandardItemLighting();
|
||||
RenderHelper.enableGUIStandardItemLighting();
|
||||
//Render the stack
|
||||
RenderItem.getInstance().renderItemAndEffectIntoGUI(mc.fontRenderer, mc.renderEngine, stack, 0, 0);
|
||||
//Render Overlay
|
||||
RenderItem.getInstance().renderItemOverlayIntoGUI(mc.fontRenderer, mc.renderEngine, stack, 0, 0);
|
||||
//Get the color depending on current charge
|
||||
if(CurrentCharge <= half)
|
||||
{
|
||||
color = Color.YELLOW;
|
||||
}
|
||||
if(CurrentCharge <= quarter)
|
||||
{
|
||||
color = Color.DARK_RED;
|
||||
}
|
||||
mc.fontRenderer.drawString(color + GetEUString(CurrentCharge) + "/" + GetEUString(MaxCharge), 20, 5, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
@SubscribeEvent(priority = EventPriority.LOW)
|
||||
public void onRenderExperienceBar(RenderGameOverlayEvent event) {
|
||||
if (key.config.isPressed()) {
|
||||
showHud = !showHud;
|
||||
}
|
||||
|
||||
if (event.isCancelable() || event.type != ElementType.ALL)
|
||||
return;
|
||||
|
||||
if (mc.inGameHasFocus || (mc.currentScreen != null && mc.gameSettings.showDebugInfo)) {
|
||||
if (ConfigTechReborn.ShowChargeHud && ElectricItem.manager != null)
|
||||
drawChargeHud(event.resolution);
|
||||
}
|
||||
}
|
||||
|
||||
public void drawChargeHud(ScaledResolution res) {
|
||||
EntityPlayer player = mc.thePlayer;
|
||||
ItemStack stack = player.getCurrentArmor(2);
|
||||
ItemStack stack2 = mc.thePlayer.inventory.getCurrentItem();
|
||||
if (showHud) {
|
||||
if (stack2 != null) {
|
||||
if ((stack2.getItem() instanceof IElectricItem)) {
|
||||
double MaxCharge = ((IElectricItem) stack2.getItem()).getMaxCharge(stack2);
|
||||
double CurrentCharge = ElectricItem.manager.getCharge(stack2);
|
||||
Color color = Color.GREEN;
|
||||
double quarter = MaxCharge / 4;
|
||||
double half = MaxCharge / 2;
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GL11.glEnable(32826);
|
||||
RenderHelper.enableStandardItemLighting();
|
||||
RenderHelper.enableGUIStandardItemLighting();
|
||||
RenderItem.getInstance().renderItemAndEffectIntoGUI(mc.fontRenderer, mc.renderEngine, stack2, 0, 20);
|
||||
RenderItem.getInstance().renderItemOverlayIntoGUI(mc.fontRenderer, mc.renderEngine, stack2, 0, 20);
|
||||
if (CurrentCharge <= half) {
|
||||
color = Color.YELLOW;
|
||||
}
|
||||
if (CurrentCharge <= quarter) {
|
||||
color = Color.DARK_RED;
|
||||
}
|
||||
mc.fontRenderer.drawString(color + GetEUString(CurrentCharge) + "/" + GetEUString(MaxCharge), 20, 25, 0);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (stack != null) {
|
||||
if ((stack.getItem() instanceof IElectricItem) && ConfigTechReborn.ShowChargeHud) {
|
||||
double MaxCharge = ((IElectricItem) stack.getItem()).getMaxCharge(stack);
|
||||
double CurrentCharge = ElectricItem.manager.getCharge(stack);
|
||||
Color color = Color.GREEN;
|
||||
double quarter = MaxCharge / 4;
|
||||
double half = MaxCharge / 2;
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GL11.glEnable(32826);
|
||||
RenderHelper.enableStandardItemLighting();
|
||||
RenderHelper.enableGUIStandardItemLighting();
|
||||
//Render the stack
|
||||
RenderItem.getInstance().renderItemAndEffectIntoGUI(mc.fontRenderer, mc.renderEngine, stack, 0, 0);
|
||||
//Render Overlay
|
||||
RenderItem.getInstance().renderItemOverlayIntoGUI(mc.fontRenderer, mc.renderEngine, stack, 0, 0);
|
||||
//Get the color depending on current charge
|
||||
if (CurrentCharge <= half) {
|
||||
color = Color.YELLOW;
|
||||
}
|
||||
if (CurrentCharge <= quarter) {
|
||||
color = Color.DARK_RED;
|
||||
}
|
||||
mc.fontRenderer.drawString(color + GetEUString(CurrentCharge) + "/" + GetEUString(MaxCharge), 20, 5, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
}
|
||||
}
|
||||
|
||||
private String GetEUString(double euValue)
|
||||
{
|
||||
if (euValue > 1000000) {
|
||||
double tenX = Math.round(euValue / 100000);
|
||||
return Double.toString(tenX / 10.0).concat("M ");
|
||||
}
|
||||
else if (euValue > 1000) {
|
||||
double tenX = Math.round(euValue / 100);
|
||||
return Double.toString(tenX / 10.0).concat("k ");
|
||||
}
|
||||
else {
|
||||
return Double.toString(Math.floor(euValue)).concat(" EU");
|
||||
}
|
||||
}
|
||||
private String GetEUString(double euValue) {
|
||||
if (euValue > 1000000) {
|
||||
double tenX = Math.round(euValue / 100000);
|
||||
return Double.toString(tenX / 10.0).concat("M ");
|
||||
} else if (euValue > 1000) {
|
||||
double tenX = Math.round(euValue / 100);
|
||||
return Double.toString(tenX / 10.0).concat("k ");
|
||||
} else {
|
||||
return Double.toString(Math.floor(euValue)).concat(" EU");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,8 +5,8 @@ import org.lwjgl.input.Keyboard;
|
|||
import techreborn.lib.ModInfo;
|
||||
|
||||
public class KeyBindings {
|
||||
|
||||
public static KeyBinding config = new KeyBinding(ModInfo.Keys.CONFIG,
|
||||
Keyboard.KEY_P, ModInfo.Keys.CATEGORY);
|
||||
|
||||
public static KeyBinding config = new KeyBinding(ModInfo.Keys.CONFIG,
|
||||
Keyboard.KEY_P, ModInfo.Keys.CATEGORY);
|
||||
|
||||
}
|
||||
|
|
|
@ -5,21 +5,18 @@ import cpw.mods.fml.common.gameevent.InputEvent;
|
|||
import techreborn.lib.Key;
|
||||
import techreborn.util.LogHelper;
|
||||
|
||||
public class KeyInputEventHandler
|
||||
{
|
||||
private static Key getPressedKeybinding()
|
||||
{
|
||||
if (KeyBindings.config.isPressed()) {
|
||||
return Key.CONFIG;
|
||||
}
|
||||
public class KeyInputEventHandler {
|
||||
private static Key getPressedKeybinding() {
|
||||
if (KeyBindings.config.isPressed()) {
|
||||
return Key.CONFIG;
|
||||
}
|
||||
|
||||
return Key.UNKNOWN;
|
||||
}
|
||||
return Key.UNKNOWN;
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void handleKeyInputEvent(InputEvent.KeyInputEvent event)
|
||||
{
|
||||
LogHelper.info(getPressedKeybinding());
|
||||
}
|
||||
@SubscribeEvent
|
||||
public void handleKeyInputEvent(InputEvent.KeyInputEvent event) {
|
||||
LogHelper.info(getPressedKeybinding());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -17,93 +17,93 @@ import techreborn.partSystem.parts.CablePart;
|
|||
public class RenderCablePart {
|
||||
|
||||
|
||||
public static void renderBox(Vecs3dCube cube, Block block, Tessellator tessellator, RenderBlocks renderblocks, IIcon texture, Double xD, Double yD, double zD, float thickness) {
|
||||
block.setBlockBounds((float) cube.getMinX(), (float) cube.getMinY(), (float) cube.getMinZ(), (float) cube.getMaxX() + thickness, (float) cube.getMaxY() + thickness, (float) cube.getMaxZ() + thickness);
|
||||
renderblocks.setRenderBoundsFromBlock(block);
|
||||
tessellator.setColorOpaque_F(0.5F, 0.5F, 0.5F);
|
||||
renderblocks.renderFaceYNeg(block, xD, yD, zD, texture);
|
||||
tessellator.setColorOpaque_F(1.0F, 1.0F, 1.0F);
|
||||
renderblocks.renderFaceYPos(block, xD, yD, zD, texture);
|
||||
tessellator.setColorOpaque_F(0.8F, 0.8F, 0.8F);
|
||||
renderblocks.renderFaceZNeg(block, xD, yD, zD, texture);
|
||||
renderblocks.renderFaceZPos(block, xD, yD, zD, texture);
|
||||
tessellator.setColorOpaque_F(0.6F, 0.6F, 0.6F);
|
||||
renderblocks.renderFaceXNeg(block, xD, yD, zD, texture);
|
||||
renderblocks.renderFaceXPos(block, xD, yD, zD, texture);
|
||||
}
|
||||
public static void renderBox(Vecs3dCube cube, Block block, Tessellator tessellator, RenderBlocks renderblocks, IIcon texture, Double xD, Double yD, double zD, float thickness) {
|
||||
block.setBlockBounds((float) cube.getMinX(), (float) cube.getMinY(), (float) cube.getMinZ(), (float) cube.getMaxX() + thickness, (float) cube.getMaxY() + thickness, (float) cube.getMaxZ() + thickness);
|
||||
renderblocks.setRenderBoundsFromBlock(block);
|
||||
tessellator.setColorOpaque_F(0.5F, 0.5F, 0.5F);
|
||||
renderblocks.renderFaceYNeg(block, xD, yD, zD, texture);
|
||||
tessellator.setColorOpaque_F(1.0F, 1.0F, 1.0F);
|
||||
renderblocks.renderFaceYPos(block, xD, yD, zD, texture);
|
||||
tessellator.setColorOpaque_F(0.8F, 0.8F, 0.8F);
|
||||
renderblocks.renderFaceZNeg(block, xD, yD, zD, texture);
|
||||
renderblocks.renderFaceZPos(block, xD, yD, zD, texture);
|
||||
tessellator.setColorOpaque_F(0.6F, 0.6F, 0.6F);
|
||||
renderblocks.renderFaceXNeg(block, xD, yD, zD, texture);
|
||||
renderblocks.renderFaceXPos(block, xD, yD, zD, texture);
|
||||
}
|
||||
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public static boolean renderStatic(Vecs3d translation, int pass, CablePart part) {
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
IIcon texture = getIconFromType(part.type);
|
||||
RenderBlocks renderblocks = RenderBlocks.getInstance();
|
||||
double xD = part.xCoord;
|
||||
double yD = part.yCoord;
|
||||
double zD = part.zCoord;
|
||||
Block block = part.getBlockType();
|
||||
tessellator.setBrightness(block.getMixedBrightnessForBlock(part.getWorld(), part.getX(), part.getY(), part.getZ()));
|
||||
renderBox(part.boundingBoxes[6], block, tessellator, renderblocks, texture, xD, yD, zD, 0F);
|
||||
for (ForgeDirection direction : ForgeDirection.values()) {
|
||||
if (part.connectedSides.get(direction) != null) {
|
||||
renderBox(part.boundingBoxes[Functions.getIntDirFromDirection(direction)], block, tessellator, renderblocks, texture, xD, yD, zD, 0f);
|
||||
}
|
||||
}
|
||||
block.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
|
||||
renderblocks.setRenderBoundsFromBlock(block);
|
||||
return true;
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
public static boolean renderStatic(Vecs3d translation, int pass, CablePart part) {
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
IIcon texture = getIconFromType(part.type);
|
||||
RenderBlocks renderblocks = RenderBlocks.getInstance();
|
||||
double xD = part.xCoord;
|
||||
double yD = part.yCoord;
|
||||
double zD = part.zCoord;
|
||||
Block block = part.getBlockType();
|
||||
tessellator.setBrightness(block.getMixedBrightnessForBlock(part.getWorld(), part.getX(), part.getY(), part.getZ()));
|
||||
renderBox(part.boundingBoxes[6], block, tessellator, renderblocks, texture, xD, yD, zD, 0F);
|
||||
for (ForgeDirection direction : ForgeDirection.values()) {
|
||||
if (part.connectedSides.get(direction) != null) {
|
||||
renderBox(part.boundingBoxes[Functions.getIntDirFromDirection(direction)], block, tessellator, renderblocks, texture, xD, yD, zD, 0f);
|
||||
}
|
||||
}
|
||||
block.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
|
||||
renderblocks.setRenderBoundsFromBlock(block);
|
||||
return true;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public static IIcon getIconFromType(int cableType) {
|
||||
IIcon p = null;
|
||||
switch (cableType) {
|
||||
case 0:
|
||||
p = IconSupplier.insulatedCopperCable;
|
||||
break;
|
||||
case 1:
|
||||
p = IconSupplier.copperCable;
|
||||
break;
|
||||
case 2:
|
||||
p = IconSupplier.goldCable;
|
||||
break;
|
||||
case 3:
|
||||
p = IconSupplier.insulatedGoldCable;
|
||||
break;
|
||||
case 4:
|
||||
p = IconSupplier.doubleInsulatedGoldCable;
|
||||
break;
|
||||
case 5:
|
||||
p = IconSupplier.ironCable;
|
||||
break;
|
||||
case 6:
|
||||
p = IconSupplier.insulatedIronCable;
|
||||
break;
|
||||
case 7:
|
||||
p = IconSupplier.doubleInsulatedIronCable;
|
||||
break;
|
||||
case 8:
|
||||
p = IconSupplier.trippleInsulatedIronCable;
|
||||
break;
|
||||
case 9:
|
||||
p = IconSupplier.glassFiberCable;
|
||||
break;
|
||||
case 10:
|
||||
p = IconSupplier.tinCable;
|
||||
break;
|
||||
case 11:
|
||||
p = IconSupplier.detectorCableBlock;//Detector
|
||||
break;
|
||||
case 12:
|
||||
p = IconSupplier.splitterCableBlock;// Splitter
|
||||
break;
|
||||
case 13:
|
||||
p = IconSupplier.insulatedtinCableBlock;
|
||||
break;
|
||||
case 14:
|
||||
p = IconSupplier.copperCable; // unused?
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
public static IIcon getIconFromType(int cableType) {
|
||||
IIcon p = null;
|
||||
switch (cableType) {
|
||||
case 0:
|
||||
p = IconSupplier.insulatedCopperCable;
|
||||
break;
|
||||
case 1:
|
||||
p = IconSupplier.copperCable;
|
||||
break;
|
||||
case 2:
|
||||
p = IconSupplier.goldCable;
|
||||
break;
|
||||
case 3:
|
||||
p = IconSupplier.insulatedGoldCable;
|
||||
break;
|
||||
case 4:
|
||||
p = IconSupplier.doubleInsulatedGoldCable;
|
||||
break;
|
||||
case 5:
|
||||
p = IconSupplier.ironCable;
|
||||
break;
|
||||
case 6:
|
||||
p = IconSupplier.insulatedIronCable;
|
||||
break;
|
||||
case 7:
|
||||
p = IconSupplier.doubleInsulatedIronCable;
|
||||
break;
|
||||
case 8:
|
||||
p = IconSupplier.trippleInsulatedIronCable;
|
||||
break;
|
||||
case 9:
|
||||
p = IconSupplier.glassFiberCable;
|
||||
break;
|
||||
case 10:
|
||||
p = IconSupplier.tinCable;
|
||||
break;
|
||||
case 11:
|
||||
p = IconSupplier.detectorCableBlock;//Detector
|
||||
break;
|
||||
case 12:
|
||||
p = IconSupplier.splitterCableBlock;// Splitter
|
||||
break;
|
||||
case 13:
|
||||
p = IconSupplier.insulatedtinCableBlock;
|
||||
break;
|
||||
case 14:
|
||||
p = IconSupplier.copperCable; // unused?
|
||||
}
|
||||
|
||||
return p;
|
||||
}
|
||||
return p;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,76 +19,76 @@ import java.util.ArrayList;
|
|||
public class RenderFarmInventoryCable {
|
||||
|
||||
|
||||
public static void renderBox(Vecs3dCube cube, Block block, Tessellator tessellator, RenderBlocks renderblocks, IIcon texture, Double xD, Double yD, double zD, float thickness) {
|
||||
block.setBlockBounds((float) cube.getMinX(), (float) cube.getMinY(), (float) cube.getMinZ(), (float) cube.getMaxX() + thickness, (float) cube.getMaxY() + thickness, (float) cube.getMaxZ() + thickness);
|
||||
renderblocks.setRenderBoundsFromBlock(block);
|
||||
tessellator.setColorOpaque_F(0.5F, 0.5F, 0.5F);
|
||||
renderblocks.renderFaceYNeg(block, xD, yD, zD, texture);
|
||||
tessellator.setColorOpaque_F(1.0F, 1.0F, 1.0F);
|
||||
renderblocks.renderFaceYPos(block, xD, yD, zD, texture);
|
||||
tessellator.setColorOpaque_F(0.8F, 0.8F, 0.8F);
|
||||
renderblocks.renderFaceZNeg(block, xD, yD, zD, texture);
|
||||
renderblocks.renderFaceZPos(block, xD, yD, zD, texture);
|
||||
tessellator.setColorOpaque_F(0.6F, 0.6F, 0.6F);
|
||||
renderblocks.renderFaceXNeg(block, xD, yD, zD, texture);
|
||||
renderblocks.renderFaceXPos(block, xD, yD, zD, texture);
|
||||
}
|
||||
public static void renderBox(Vecs3dCube cube, Block block, Tessellator tessellator, RenderBlocks renderblocks, IIcon texture, Double xD, Double yD, double zD, float thickness) {
|
||||
block.setBlockBounds((float) cube.getMinX(), (float) cube.getMinY(), (float) cube.getMinZ(), (float) cube.getMaxX() + thickness, (float) cube.getMaxY() + thickness, (float) cube.getMaxZ() + thickness);
|
||||
renderblocks.setRenderBoundsFromBlock(block);
|
||||
tessellator.setColorOpaque_F(0.5F, 0.5F, 0.5F);
|
||||
renderblocks.renderFaceYNeg(block, xD, yD, zD, texture);
|
||||
tessellator.setColorOpaque_F(1.0F, 1.0F, 1.0F);
|
||||
renderblocks.renderFaceYPos(block, xD, yD, zD, texture);
|
||||
tessellator.setColorOpaque_F(0.8F, 0.8F, 0.8F);
|
||||
renderblocks.renderFaceZNeg(block, xD, yD, zD, texture);
|
||||
renderblocks.renderFaceZPos(block, xD, yD, zD, texture);
|
||||
tessellator.setColorOpaque_F(0.6F, 0.6F, 0.6F);
|
||||
renderblocks.renderFaceXNeg(block, xD, yD, zD, texture);
|
||||
renderblocks.renderFaceXPos(block, xD, yD, zD, texture);
|
||||
}
|
||||
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public static boolean renderStatic(Vecs3d translation, int pass, FarmInventoryCable part) {
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
IIcon stone = Blocks.stone.getIcon(0, 0);
|
||||
@SideOnly(Side.CLIENT)
|
||||
public static boolean renderStatic(Vecs3d translation, int pass, FarmInventoryCable part) {
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
IIcon stone = Blocks.stone.getIcon(0, 0);
|
||||
IIcon redstone = Blocks.redstone_block.getIcon(0, 0);
|
||||
IIcon quartz = Blocks.quartz_block.getIcon(0, 0);
|
||||
RenderBlocks renderblocks = RenderBlocks.getInstance();
|
||||
double xD = part.xCoord;
|
||||
double yD = part.yCoord;
|
||||
double zD = part.zCoord;
|
||||
Block block = part.getBlockType();
|
||||
tessellator.setBrightness(block.getMixedBrightnessForBlock(part.getWorld(), part.getX(), part.getY(), part.getZ()));
|
||||
Vecs3dCube cube = new Vecs3dCube(part.boundingBoxes[6].getMinX() + 0.1, part.boundingBoxes[6].getMinY() + 0.1,part.boundingBoxes[6].getMinZ() + 0.1,part.boundingBoxes[6].getMaxX() - 0.1, part.boundingBoxes[6].getMaxY() - 0.1,part.boundingBoxes[6].getMaxZ() - 0.1);
|
||||
renderBox(cube, block, tessellator, renderblocks, stone, xD, yD, zD, 0F);
|
||||
RenderBlocks renderblocks = RenderBlocks.getInstance();
|
||||
double xD = part.xCoord;
|
||||
double yD = part.yCoord;
|
||||
double zD = part.zCoord;
|
||||
Block block = part.getBlockType();
|
||||
tessellator.setBrightness(block.getMixedBrightnessForBlock(part.getWorld(), part.getX(), part.getY(), part.getZ()));
|
||||
Vecs3dCube cube = new Vecs3dCube(part.boundingBoxes[6].getMinX() + 0.1, part.boundingBoxes[6].getMinY() + 0.1, part.boundingBoxes[6].getMinZ() + 0.1, part.boundingBoxes[6].getMaxX() - 0.1, part.boundingBoxes[6].getMaxY() - 0.1, part.boundingBoxes[6].getMaxZ() - 0.1);
|
||||
renderBox(cube, block, tessellator, renderblocks, stone, xD, yD, zD, 0F);
|
||||
|
||||
ArrayList<Vecs3dCube> cubes = new ArrayList<Vecs3dCube>();
|
||||
|
||||
cube = new Vecs3dCube(0.15, 0.15,0.15, 0.3, 0.3,0.85);
|
||||
cube = new Vecs3dCube(0.15, 0.15, 0.15, 0.3, 0.3, 0.85);
|
||||
cubes.add(cube);
|
||||
|
||||
cube = new Vecs3dCube(0.15, 0.15,0.15, 0.85, 0.3,0.3);
|
||||
cube = new Vecs3dCube(0.15, 0.15, 0.15, 0.85, 0.3, 0.3);
|
||||
cubes.add(cube);
|
||||
|
||||
cube = new Vecs3dCube(0.15, 0.15,0.15, 0.3, 0.85,0.3);
|
||||
cube = new Vecs3dCube(0.15, 0.15, 0.15, 0.3, 0.85, 0.3);
|
||||
renderBox(cube, block, tessellator, renderblocks, redstone, xD, yD, zD, 0F);
|
||||
|
||||
cube = new Vecs3dCube(0.85, 0.85,0.85, 0.7, 0.15,0.7);
|
||||
cube = new Vecs3dCube(0.85, 0.85, 0.85, 0.7, 0.15, 0.7);
|
||||
cubes.add(cube);
|
||||
|
||||
cube = new Vecs3dCube(0.85, 0.85,0.85, 0.7, 0.7,0.15);
|
||||
cube = new Vecs3dCube(0.85, 0.85, 0.85, 0.7, 0.7, 0.15);
|
||||
cubes.add(cube);
|
||||
|
||||
cube = new Vecs3dCube(0.85, 0.85,0.85, 0.15, 0.7,0.7);
|
||||
cube = new Vecs3dCube(0.85, 0.85, 0.85, 0.15, 0.7, 0.7);
|
||||
cubes.add(cube);
|
||||
|
||||
cube = new Vecs3dCube(0.15, 0.85,0.85, 0.3, 0.15,0.7);
|
||||
cube = new Vecs3dCube(0.15, 0.85, 0.85, 0.3, 0.15, 0.7);
|
||||
cubes.add(cube);
|
||||
|
||||
cube = new Vecs3dCube(0.85, 0.85,0.15, 0.7, 0.15,0.3);
|
||||
cube = new Vecs3dCube(0.85, 0.85, 0.15, 0.7, 0.15, 0.3);
|
||||
cubes.add(cube);
|
||||
|
||||
cube = new Vecs3dCube(0.85, 0.15,0.85, 0.7, 0.3,0.15);
|
||||
cube = new Vecs3dCube(0.85, 0.15, 0.85, 0.7, 0.3, 0.15);
|
||||
cubes.add(cube);
|
||||
|
||||
cube = new Vecs3dCube(0.85, 0.15,0.85, 0.15, 0.3,0.7);
|
||||
cube = new Vecs3dCube(0.85, 0.15, 0.85, 0.15, 0.3, 0.7);
|
||||
cubes.add(cube);
|
||||
|
||||
cube = new Vecs3dCube(0.15, 0.85,0.15, 0.85, 0.7,0.3);
|
||||
cube = new Vecs3dCube(0.15, 0.85, 0.15, 0.85, 0.7, 0.3);
|
||||
cubes.add(cube);
|
||||
|
||||
cube = new Vecs3dCube(0.15, 0.85,0.15, 0.3, 0.7,0.85);
|
||||
cube = new Vecs3dCube(0.15, 0.85, 0.15, 0.3, 0.7, 0.85);
|
||||
cubes.add(cube);
|
||||
|
||||
for(Vecs3dCube vecs3dCube : cubes){
|
||||
for (Vecs3dCube vecs3dCube : cubes) {
|
||||
renderBox(vecs3dCube, block, tessellator, renderblocks, redstone, xD, yD, zD, 0f);
|
||||
}
|
||||
|
||||
|
@ -97,9 +97,9 @@ public class RenderFarmInventoryCable {
|
|||
renderBox(part.boundingBoxes[Functions.getIntDirFromDirection(direction)], block, tessellator, renderblocks, quartz, xD, yD, zD, 0f);
|
||||
}
|
||||
}
|
||||
block.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
|
||||
renderblocks.setRenderBoundsFromBlock(block);
|
||||
return true;
|
||||
}
|
||||
block.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
|
||||
renderblocks.setRenderBoundsFromBlock(block);
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue