aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gtPlusPlus/xmod/gregtech/api
diff options
context:
space:
mode:
authorAlkalus <3060479+draknyte1@users.noreply.github.com>2022-01-16 19:51:13 +0000
committerAlkalus <3060479+draknyte1@users.noreply.github.com>2022-01-16 19:51:13 +0000
commite5eeec1ffc3eab063c765da7bb889017d87aabdd (patch)
tree9387d445ff67c9001ac69c760184c6573afa7147 /src/main/java/gtPlusPlus/xmod/gregtech/api
parent222b1d640fb66dff8a865307c3ecf27db34f17ae (diff)
downloadGT5-Unofficial-e5eeec1ffc3eab063c765da7bb889017d87aabdd.tar.gz
GT5-Unofficial-e5eeec1ffc3eab063c765da7bb889017d87aabdd.tar.bz2
GT5-Unofficial-e5eeec1ffc3eab063c765da7bb889017d87aabdd.zip
Added Recipe for Computer Cube MKII, Turbine Shaft, Rotor Assembly & Elemental Duplicator.
Removed a whole heap of pointless Reactor Planner files/functions. Hide some of the modes in the Computer Cube.
Diffstat (limited to 'src/main/java/gtPlusPlus/xmod/gregtech/api')
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java17
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/computer/GT_Container_ComputerCube.java207
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/computer/GT_GUIContainer_ComputerCube.java49
3 files changed, 159 insertions, 114 deletions
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java
index c61195a9e8..4d67603db0 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java
@@ -501,12 +501,25 @@ public enum GregtechItemList implements GregtechItemContainer {
Hatch_SuperBus_Output_MAX,
-
-
//----------------------------------------------------------------------------
+ /**
+ * Blocks
+ */
+
+
+ ResonanceChamber_I,
+ ResonanceChamber_II,
+ ResonanceChamber_III,
+ ResonanceChamber_IV,
+
+ Modulator_I,
+ Modulator_II,
+ Modulator_III,
+ Modulator_IV,
+ //----------------------------------------------------------------------------
/**
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/computer/GT_Container_ComputerCube.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/computer/GT_Container_ComputerCube.java
index 80202695e7..8abe7bff66 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/computer/GT_Container_ComputerCube.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/computer/GT_Container_ComputerCube.java
@@ -4,22 +4,16 @@ import java.util.Iterator;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
-import gregtech.api.gui.GT_ContainerMetaTile_Machine;
-import gregtech.api.gui.GT_Slot_Holo;
-import gregtech.api.gui.GT_Slot_Output;
+import gregtech.api.gui.*;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.objects.GT_ItemStack;
import gtPlusPlus.api.objects.Logger;
+import gtPlusPlus.core.slots.SlotDataStick;
import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.math.MathUtils;
import gtPlusPlus.xmod.gregtech.common.tileentities.misc.GT_TileEntity_ComputerCube;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.EntityPlayerMP;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.inventory.Container;
-import net.minecraft.inventory.ICrafting;
-import net.minecraft.inventory.IInventory;
-import net.minecraft.inventory.Slot;
+import net.minecraft.entity.player.*;
+import net.minecraft.inventory.*;
import net.minecraft.item.ItemStack;
public class GT_Container_ComputerCube extends GT_ContainerMetaTile_Machine {
@@ -39,6 +33,13 @@ public class GT_Container_ComputerCube extends GT_ContainerMetaTile_Machine {
public long mEU;
public int mEU1;
public int mEU2;
+
+ public long mStoredEU;
+ public int mStoredEU1;
+ public int mStoredEU2;
+ public long mMaxStoredEU;
+ public int mMaxStoredEU1;
+ public int mMaxStoredEU2;
public int mProgress;
@@ -66,90 +67,72 @@ public class GT_Container_ComputerCube extends GT_ContainerMetaTile_Machine {
int y;
mID = ((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).mMode;
Logger.INFO(""+(Utils.isClient() ? "Client" : "Server")+" Mode: " + mID);
- addSlotToContainer(new GT_Slot_Holo((IInventory) this.mTileEntity, 58, 156 + ((this.mID == 5) ? 50 : 0), 4, false, false, 1));
+ addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 58, 156 + ((this.mID == 5) ? 50 : 0), 4, false, false, 1));
switch (this.mID) {
case 1 :
- addSlotToContainer(new GT_Slot_Holo((IInventory) this.mTileEntity, 58, 156, 86, false, false, 1));
- addSlotToContainer(new GT_Slot_Holo((IInventory) this.mTileEntity, 58, 156, 70, false, false, 1));
- addSlotToContainer(new GT_Slot_Holo((IInventory) this.mTileEntity, 58, 156, 54, false, false, 1));
+ addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 58, 156, 86, false, false, 1));
+ addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 58, 156, 70, false, false, 1));
+ addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 58, 156, 54, false, false, 1));
for (y = 0; y < 6; y++) {
for (int x = 0; x < 9; x++)
- addSlotToContainer(new GT_Slot_Holo((IInventory) this.mTileEntity, x + y * 9, 5 + x * 16, 5 + y * 16, false, false, 64));
+ addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, x + y * 9, 5 + x * 16, 5 + y * 16, false, false, 64));
}
- addSlotToContainer(new GT_Slot_Holo((IInventory) this.mTileEntity, 113, 153, 28, false, false, 64));
+ addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 113, 153, 28, false, false, 64));
break;
case 2 :
- addSlotToContainer(new Slot((IInventory) this.mTileEntity, 54, 8, 28));
- addSlotToContainer(new Slot((IInventory) this.mTileEntity, 55, 26, 28));
- addSlotToContainer(new GT_Slot_Output((IInventory) this.mTileEntity, 56, 134, 28));
- addSlotToContainer(new GT_Slot_Output((IInventory) this.mTileEntity, 57, 152, 28));
+ addSlotToContainer(new SlotDataStick(this.mTileEntity, 54, 8, 28));
+ addSlotToContainer(new Slot(this.mTileEntity, 55, 26, 28));
+ addSlotToContainer(new GT_Slot_Output(this.mTileEntity, 56, 134, 28));
+ addSlotToContainer(new GT_Slot_Output(this.mTileEntity, 57, 152, 28));
break;
case 3 :
- addSlotToContainer(new GT_Slot_Holo((IInventory) this.mTileEntity, 58, 88, 65, false, false, 1));
- addSlotToContainer(new GT_Slot_Holo((IInventory) this.mTileEntity, 58, 104, 65, false, false, 1));
- addSlotToContainer(new GT_Slot_Holo((IInventory) this.mTileEntity, 59, 122, 35, false, false, 64));
- addSlotToContainer(new GT_Slot_Holo((IInventory) this.mTileEntity, 60, 92, 5, false, false, 64));
- addSlotToContainer(new GT_Slot_Holo((IInventory) this.mTileEntity, 61, 122, 5, false, false, 64));
- addSlotToContainer(new GT_Slot_Holo((IInventory) this.mTileEntity, 62, 152, 35, false, false, 64));
- addSlotToContainer(new GT_Slot_Holo((IInventory) this.mTileEntity, 63, 122, 65, false, false, 64));
- addSlotToContainer(new GT_Slot_Holo((IInventory) this.mTileEntity, 64, 92, 35, false, false, 64));
+ addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 58, 88, 65, false, false, 1));
+ addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 58, 104, 65, false, false, 1));
+ addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 59, 122, 35, false, false, 64));
+ addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 60, 92, 5, false, false, 64));
+ addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 61, 122, 5, false, false, 64));
+ addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 62, 152, 35, false, false, 64));
+ addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 63, 122, 65, false, false, 64));
+ addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 64, 92, 35, false, false, 64));
break;
case 4 :
- addSlotToContainer(new GT_Slot_Holo((IInventory) this.mTileEntity, 58, 88, 65, false, false, 1));
- addSlotToContainer(new GT_Slot_Holo((IInventory) this.mTileEntity, 58, 104, 65, false, false, 1));
- addSlotToContainer(new GT_Slot_Holo((IInventory) this.mTileEntity, 59, 122, 5, false, false, 64));
- addSlotToContainer(new GT_Slot_Holo((IInventory) this.mTileEntity, 60, 122, 65, false, false, 64));
- addSlotToContainer(new GT_Slot_Holo((IInventory) this.mTileEntity, 61, 152, 35, false, false, 64));
+ addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 58, 88, 65, false, false, 1));
+ addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 58, 104, 65, false, false, 1));
+ addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 59, 122, 5, false, false, 64));
+ addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 60, 122, 65, false, false, 64));
+ addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 61, 152, 35, false, false, 64));
break;
case 5 :
- addSlotToContainer(new GT_Slot_Holo((IInventory) this.mTileEntity, 58, 190, 146, false, false, 1));
- addSlotToContainer(new GT_Slot_Holo((IInventory) this.mTileEntity, 58, 206, 146, false, false, 1));
- addSlotToContainer(new GT_Slot_Holo((IInventory) this.mTileEntity, 59, 206, 38, false, false, 64));
- addSlotToContainer(new GT_Slot_Holo((IInventory) this.mTileEntity, 60, 206, 56, false, false, 64));
- addSlotToContainer(new GT_Slot_Holo((IInventory) this.mTileEntity, 61, 206, 74, false, false, 64));
- addSlotToContainer(new GT_Slot_Holo((IInventory) this.mTileEntity, 62, 206, 92, false, false, 64));
- addSlotToContainer(new GT_Slot_Holo((IInventory) this.mTileEntity, 63, 206, 110, false, false, 64));
- addSlotToContainer(new GT_Slot_Holo((IInventory) this.mTileEntity, 64, 153, 7, false, false, 64));
- addSlotToContainer(new GT_Slot_Holo((IInventory) this.mTileEntity, 65, 169, 7, false, false, 64));
- addSlotToContainer(new GT_Slot_Holo((IInventory) this.mTileEntity, 66, 185, 7, false, false, 64));
- addSlotToContainer(new GT_Slot_Holo((IInventory) this.mTileEntity, 67, 153, 23, false, false, 64));
- addSlotToContainer(new GT_Slot_Holo((IInventory) this.mTileEntity, 68, 169, 23, false, false, 64));
- addSlotToContainer(new GT_Slot_Holo((IInventory) this.mTileEntity, 69, 185, 23, false, false, 64));
- addSlotToContainer(new GT_Slot_Holo((IInventory) this.mTileEntity, 70, 153, 39, false, false, 64));
- addSlotToContainer(new GT_Slot_Holo((IInventory) this.mTileEntity, 71, 169, 39, false, false, 64));
- addSlotToContainer(new GT_Slot_Holo((IInventory) this.mTileEntity, 72, 185, 39, false, false, 64));
+ addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 58, 190, 146, false, false, 1));
+ addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 58, 206, 146, false, false, 1));
+ addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 59, 206, 38, false, false, 64));
+ addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 60, 206, 56, false, false, 64));
+ addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 61, 206, 74, false, false, 64));
+ addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 62, 206, 92, false, false, 64));
+ addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 63, 206, 110, false, false, 64));
+ addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 64, 153, 7, false, false, 64));
+ addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 65, 169, 7, false, false, 64));
+ addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 66, 185, 7, false, false, 64));
+ addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 67, 153, 23, false, false, 64));
+ addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 68, 169, 23, false, false, 64));
+ addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 69, 185, 23, false, false, 64));
+ addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 70, 153, 39, false, false, 64));
+ addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 71, 169, 39, false, false, 64));
+ addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 72, 185, 39, false, false, 64));
break;
case 6 :
- addSlotToContainer(new GT_Slot_Holo((IInventory) this.mTileEntity, 58, 88, 65, false, false, 1));
- addSlotToContainer(new GT_Slot_Holo((IInventory) this.mTileEntity, 58, 104, 65, false, false, 1));
- addSlotToContainer(new GT_Slot_Holo((IInventory) this.mTileEntity, 59, 122, 35, false, false, 64));
- addSlotToContainer(new GT_Slot_Holo((IInventory) this.mTileEntity, 60, 92, 5, false, false, 64));
- addSlotToContainer(new GT_Slot_Holo((IInventory) this.mTileEntity, 61, 122, 5, false, false, 64));
- addSlotToContainer(new GT_Slot_Holo((IInventory) this.mTileEntity, 62, 152, 35, false, false, 64));
- addSlotToContainer(new GT_Slot_Holo((IInventory) this.mTileEntity, 63, 122, 65, false, false, 64));
- addSlotToContainer(new GT_Slot_Holo((IInventory) this.mTileEntity, 64, 92, 35, false, false, 64));
+ addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 58, 88, 65, false, false, 1));
+ addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 58, 104, 65, false, false, 1));
+ addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 59, 122, 35, false, false, 64));
+ addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 60, 92, 5, false, false, 64));
+ addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 61, 122, 5, false, false, 64));
+ addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 62, 152, 35, false, false, 64));
+ addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 63, 122, 65, false, false, 64));
+ addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 64, 92, 35, false, false, 64));
break;
}
}
- public int getComputerCubeGUIID() {
- switch (getMode()) {
- case 1 :
- return 32;
- case 2 :
- return 34;
- case 3 :
- return 35;
- case 4 :
- return 36;
- case 5 :
- return 37;
- case 6 :
- return 38;
- }
- return 4;
- }
-
public ItemStack slotClick(int aSlotIndex, int aMouseclick, int aShifthold, EntityPlayer aPlayer) {
//Logger.INFO("Clicked slot " + aSlotIndex);
if (aSlotIndex < 0) {
@@ -187,51 +170,51 @@ public class GT_Container_ComputerCube extends GT_ContainerMetaTile_Machine {
else if (aSlotIndex <= 2 && this.mID == 3) {
if (aSlotIndex == 1) {
((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).switchCentrifugePageBackward();
- onCraftMatrixChanged((IInventory) this.mTileEntity);
+ onCraftMatrixChanged(this.mTileEntity);
}
else if (aSlotIndex == 2) {
((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).switchCentrifugePageForward();
- onCraftMatrixChanged((IInventory) this.mTileEntity);
+ onCraftMatrixChanged(this.mTileEntity);
}
}
else if (aSlotIndex <= 2 && this.mID == 6) {
if (aSlotIndex == 1) {
((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).switchElectrolyzerPageBackward();
- onCraftMatrixChanged((IInventory) this.mTileEntity);
+ onCraftMatrixChanged(this.mTileEntity);
}
else if (aSlotIndex == 2) {
((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).switchElectrolyzerPageForward();
- onCraftMatrixChanged((IInventory) this.mTileEntity);
+ onCraftMatrixChanged(this.mTileEntity);
}
}
else if (aSlotIndex <= 2 && this.mID == 4) {
if (aSlotIndex == 1) {
((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).switchFusionPageBackward();
- onCraftMatrixChanged((IInventory) this.mTileEntity);
+ onCraftMatrixChanged(this.mTileEntity);
}
else if (aSlotIndex == 2) {
((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).switchFusionPageForward();
- onCraftMatrixChanged((IInventory) this.mTileEntity);
+ onCraftMatrixChanged(this.mTileEntity);
}
}
else if (aSlotIndex <= 2 && this.mID == 5) {
if (aSlotIndex == 1) {
((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).switchDescriptionPageBackward();
- onCraftMatrixChanged((IInventory) this.mTileEntity);
+ onCraftMatrixChanged(this.mTileEntity);
}
else if (aSlotIndex == 2) {
((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).switchDescriptionPageForward();
- onCraftMatrixChanged((IInventory) this.mTileEntity);
+ onCraftMatrixChanged(this.mTileEntity);
}
}
else if (aSlotIndex <= 58 && this.mID == 1) {
if (aSlotIndex == 1) {
((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).switchNuclearReactor();
- onCraftMatrixChanged((IInventory) this.mTileEntity);
+ onCraftMatrixChanged(this.mTileEntity);
}
else if (aSlotIndex == 2) {
((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).loadNuclearReactor();
- onCraftMatrixChanged((IInventory) this.mTileEntity);
+ onCraftMatrixChanged(this.mTileEntity);
}
else if (aSlotIndex == 3) {
((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).saveNuclearReactor();
@@ -307,6 +290,16 @@ public class GT_Container_ComputerCube extends GT_ContainerMetaTile_Machine {
if (mTileEntity.isClientSide() || mTileEntity.getMetaTileEntity() == null) {
return;
}
+ mStoredEU = mTileEntity.getStoredEU();
+ mMaxStoredEU = mTileEntity.getEUCapacity();
+ int[] aStored = MathUtils.splitLongIntoTwoIntegers(mStoredEU);
+ int[] aMaxStorage = MathUtils.splitLongIntoTwoIntegers(mMaxStoredEU);
+ mStoredEU1 = aStored[0];
+ mStoredEU2 = aStored[1];
+ mMaxStoredEU1 = aMaxStorage[0];
+ mMaxStoredEU2 = aMaxStorage[1];
+
+
this.mID = ((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).mMode;
this.mEUOut = ((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).mEUOut;
int[] aEUSplit1 = MathUtils.splitLongIntoTwoIntegers(mEUOut);
@@ -318,24 +311,30 @@ public class GT_Container_ComputerCube extends GT_ContainerMetaTile_Machine {
this.mExplosionStrength = (int) (((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).mExplosionStrength * 100.0F);
this.mEU = ((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).mEU;
this.mProgress = ((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).mProgress;
+ this.mMaxProgressTime = ((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).mMaxProgress;
+ this.mProgressTime = (int) ((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).getEUVar();
int[] aEUSplit2 = MathUtils.splitLongIntoTwoIntegers(mEU);
this.mEU1 = aEUSplit2[0];
this.mEU2 = aEUSplit2[1];
Iterator<ICrafting> var2 = this.crafters.iterator();
while (var2.hasNext()) {
ICrafting var1 = var2.next();
- var1.sendProgressBarUpdate((Container) this, 101, this.mID);
- var1.sendProgressBarUpdate((Container) this, 102, this.mHeat & 0xFFFF);
- var1.sendProgressBarUpdate((Container) this, 103, this.mMaxHeat & 0xFFFF);
- var1.sendProgressBarUpdate((Container) this, 104, this.mHEM);
- var1.sendProgressBarUpdate((Container) this, 105, this.mExplosionStrength);
- var1.sendProgressBarUpdate((Container) this, 106, this.mHeat >>> 16);
- var1.sendProgressBarUpdate((Container) this, 107, this.mMaxHeat >>> 16);
- var1.sendProgressBarUpdate((Container) this, 108, this.mEU1);
- var1.sendProgressBarUpdate((Container) this, 109, this.mEU2);
- var1.sendProgressBarUpdate((Container) this, 110, this.mProgress);
- var1.sendProgressBarUpdate((Container) this, 111, this.mEUOut1);
- var1.sendProgressBarUpdate((Container) this, 112, this.mEUOut2);
+ var1.sendProgressBarUpdate(this, 101, this.mID);
+ var1.sendProgressBarUpdate(this, 102, this.mHeat & 0xFFFF);
+ var1.sendProgressBarUpdate(this, 103, this.mMaxHeat & 0xFFFF);
+ var1.sendProgressBarUpdate(this, 104, this.mHEM);
+ var1.sendProgressBarUpdate(this, 105, this.mExplosionStrength);
+ var1.sendProgressBarUpdate(this, 106, this.mHeat >>> 16);
+ var1.sendProgressBarUpdate(this, 107, this.mMaxHeat >>> 16);
+ var1.sendProgressBarUpdate(this, 108, this.mEU1);
+ var1.sendProgressBarUpdate(this, 109, this.mEU2);
+ var1.sendProgressBarUpdate(this, 110, this.mProgress);
+ var1.sendProgressBarUpdate(this, 111, this.mEUOut1);
+ var1.sendProgressBarUpdate(this, 112, this.mEUOut2);
+ var1.sendProgressBarUpdate(this, 113, mStoredEU1);
+ var1.sendProgressBarUpdate(this, 114, mStoredEU2);
+ var1.sendProgressBarUpdate(this, 115, mMaxStoredEU1);
+ var1.sendProgressBarUpdate(this, 116, mMaxStoredEU2);
}
}
@@ -379,6 +378,20 @@ public class GT_Container_ComputerCube extends GT_ContainerMetaTile_Machine {
this.mEUOut2 = par2;
this.mEUOut = MathUtils.combineTwoIntegersToLong(mEUOut1, mEUOut2);
break;
+ case 113 :
+ mStoredEU1 = par2;
+ break;
+ case 114 :
+ mStoredEU2 = par2;
+ mStoredEU = MathUtils.combineTwoIntegersToLong(mStoredEU1, mStoredEU2);
+ break;
+ case 115 :
+ mMaxStoredEU1 = par2;
+ break;
+ case 116 :
+ mMaxStoredEU2 = par2;
+ mMaxStoredEU = MathUtils.combineTwoIntegersToLong(mMaxStoredEU1, mMaxStoredEU2);
+ break;
}
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/computer/GT_GUIContainer_ComputerCube.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/computer/GT_GUIContainer_ComputerCube.java
index c56e167319..71defdc72a 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/computer/GT_GUIContainer_ComputerCube.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/computer/GT_GUIContainer_ComputerCube.java
@@ -2,21 +2,25 @@ package gtPlusPlus.xmod.gregtech.api.gui.computer;
import gregtech.api.gui.GT_GUIContainerMetaTile_Machine;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Recipe.GT_Recipe_Map;
-import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
+import gtPlusPlus.core.util.Utils;
+import gtPlusPlus.core.util.math.MathUtils;
import gtPlusPlus.xmod.gregtech.common.computer.GT_Computercube_Description;
+import gtPlusPlus.xmod.gregtech.common.tileentities.misc.GT_TileEntity_ComputerCube;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.StatCollector;
public class GT_GUIContainer_ComputerCube extends GT_GUIContainerMetaTile_Machine {
+
+ public final GT_Container_ComputerCube mPowerContainer;
+
public GT_GUIContainer_ComputerCube(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aBaseMetaTileEntity, int aID) {
super(new GT_Container_ComputerCube(aInventoryPlayer, aBaseMetaTileEntity, aID), CORE.RES_PATH_GUI + "computer/"+aID+".png");
- GT_Container_ComputerCube tContainer = (GT_Container_ComputerCube) this.mContainer;
- Logger.INFO("1 GUI Mode: "+aID);
- Logger.INFO("2 GUI Mode: "+tContainer.mID);
- if (tContainer.mID == 5) {
+ mPowerContainer = (GT_Container_ComputerCube) mContainer;
+ if (mPowerContainer.mID == 5) {
this.xSize += 50;
}
}
@@ -43,8 +47,8 @@ public class GT_GUIContainer_ComputerCube extends GT_GUIContainerMetaTile_Machin
if (tContainer != null)
switch (tContainer.mID) {
case 0 :
- this.fontRendererObj.drawString("G.L.A.D.-OS", 64, 61, 16448255);
- this.fontRendererObj.drawString(StatCollector.translateToLocal("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
+ this.fontRendererObj.drawString("Solaris 1.7.10", 56, 70, Utils.rgbtoHexValue(100, 190, 255));
+ //this.fontRendererObj.drawString(StatCollector.translateToLocal("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
break;
case 1 :
this.fontRendererObj.drawString("Reactorstats:", 7, 108, 16448255);
@@ -58,11 +62,13 @@ public class GT_GUIContainer_ComputerCube extends GT_GUIContainerMetaTile_Machin
this.fontRendererObj.drawString("Scanner", 51, 7, 16448255);
if (tContainer.mProgress == 0) {
this.fontRendererObj.drawString("Can be used to", 51, 24, 16448255);
- this.fontRendererObj.drawString("scan Seedbags", 51, 32, 16448255);
+ this.fontRendererObj.drawString("scan things", 51, 32, 16448255);
+ this.fontRendererObj.drawString("Currently", 51, 48, Utils.rgbtoHexValue(200, 20, 20));
+ this.fontRendererObj.drawString("Disabled", 51, 56, Utils.rgbtoHexValue(200, 20, 20));
}
else {
this.fontRendererObj.drawString("Progress:", 51, 24, 16448255);
- this.fontRendererObj.drawString(tContainer.mProgress + "%", 51, 32, 16448255);
+ this.fontRendererObj.drawString(MathUtils.findPercentage(tContainer.mProgress, tContainer.mMaxProgressTime) + " %", 51, 32, 16448255);
}
this.fontRendererObj.drawString(StatCollector.translateToLocal("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
break;
@@ -73,15 +79,17 @@ public class GT_GUIContainer_ComputerCube extends GT_GUIContainerMetaTile_Machin
break;
case 4 :
this.fontRendererObj.drawString("Fusionreactor", 7, 7, 16448255);
- this.fontRendererObj.drawString("Recipe: " + (tContainer.mMaxHeat + 1) + "/" + GT_Recipe_Map.sFusionRecipes.mRecipeList.size(), 7, 23, 16448255);
- this.fontRendererObj.drawString("Start: " + toNumber(tContainer.mEU) + "EU", 7, 31, 16448255);
- this.fontRendererObj.drawString("EU/t: " + toNumber(tContainer.mEUOut), 7, 39, 16448255);
- this.fontRendererObj.drawString(toNumber(tContainer.mHeat) + " Ticks", 7, 47, 16448255);
+ this.fontRendererObj.drawString("Recipe: " + (tContainer.mMaxHeat + 1) + "/" + GT_TileEntity_ComputerCube.sFusionReactorRecipes.size(), 7, 15, 16448255);
+ this.fontRendererObj.drawString("Start: " + toNumber(tContainer.mEU) + "EU", 7, 23, 16448255);
+ this.fontRendererObj.drawString("EU/t: " + toNumber(tContainer.mEUOut), 7, 31, 16448255);
+ this.fontRendererObj.drawString(toNumber(tContainer.mHeat) + " Ticks", 7, 39, 16448255);
+ GT_Recipe tRecipe = GT_TileEntity_ComputerCube.sFusionReactorRecipes.get(tContainer.mMaxHeat);
+ this.fontRendererObj.drawString(""+tRecipe.mFluidOutputs[0].getLocalizedName(), 7, 55, 16448255);
if (tContainer.mEUOut < 0) {
- this.fontRendererObj.drawString("IN: " + toNumber(-tContainer.mEUOut * tContainer.mHeat) + "EU", 7, 55, 16448255);
+ this.fontRendererObj.drawString("IN: " + toNumber(-tContainer.mEUOut * tContainer.mHeat) + "EU", 7, 47, 16448255);
break;
}
- this.fontRendererObj.drawString("OUT: " + toNumber(tContainer.mEUOut * tContainer.mHeat) + "EU", 7, 55, 16448255);
+ this.fontRendererObj.drawString("OUT: " + toNumber(tContainer.mEUOut * tContainer.mHeat) + "EU", 7, 47, 16448255);
break;
case 5 :
if (tContainer.mID == 5 && this.xSize == 176) {
@@ -114,6 +122,17 @@ public class GT_GUIContainer_ComputerCube extends GT_GUIContainerMetaTile_Machin
int y = (height - ySize) / 2;
drawTexturedModalRect(x, y, 0, 0, xSize, ySize);
switch (tContainer.mID) {
+ case 0 :
+ if (this.mPowerContainer.mStoredEU > 0 && this.mPowerContainer.mMaxStoredEU > 0) {
+ final double tScale = MathUtils.findPercentage(this.mPowerContainer.mStoredEU, this.mPowerContainer.mMaxStoredEU);
+ this.drawTexturedModalRect(x + 44, y + 8, 0, 166, Math.min(MathUtils.roundToClosestInt(tScale), 95), 5);
+ }
+ else {
+ //
+ //Logger.INFO("1 No Power? "+tContainer.mProgressTime+" | "+tContainer.mTileEntity.getEUCapacity());
+ //Logger.INFO("2 No Power? "+aComp.getEUVar()+" | "+aComp.maxEUStore());
+ }
+ break;
case 5 :
if (tContainer.mExplosionStrength != 0)
drawTexturedModalRect(x + 152, y + 6, 0, 166, 50, 50);