aboutsummaryrefslogtreecommitdiff
path: root/main/java/gregtech/common/tileentities/machines/multi
diff options
context:
space:
mode:
authorBlood Asp <Blood@Asp>2015-04-26 02:04:07 +0200
committerBlood Asp <Blood@Asp>2015-04-26 02:04:07 +0200
commitf1610b1721ed22fcbd4cafb61b0867d8611c00f6 (patch)
tree8261a571accdd074239edd332398c37b01c77258 /main/java/gregtech/common/tileentities/machines/multi
parent6b80bc2d1cb91bc377a0e549bfffaf3fe7ae08c1 (diff)
downloadGT5-Unofficial-f1610b1721ed22fcbd4cafb61b0867d8611c00f6.tar.gz
GT5-Unofficial-f1610b1721ed22fcbd4cafb61b0867d8611c00f6.tar.bz2
GT5-Unofficial-f1610b1721ed22fcbd4cafb61b0867d8611c00f6.zip
Fusion GUI and Distillation Tower
Diffstat (limited to 'main/java/gregtech/common/tileentities/machines/multi')
-rw-r--r--main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DistillationTower.java29
-rw-r--r--main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer.java15
-rw-r--r--main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer1.java2
-rw-r--r--main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer2.java2
-rw-r--r--main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer3.java2
-rw-r--r--main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java2
6 files changed, 34 insertions, 18 deletions
diff --git a/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DistillationTower.java b/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DistillationTower.java
index 4ab5c7e5a1..c04a61d8bb 100644
--- a/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DistillationTower.java
+++ b/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DistillationTower.java
@@ -7,6 +7,7 @@ import gregtech.api.enums.Textures;
/* 6: */ import gregtech.api.interfaces.ITexture;
/* 7: */ import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
/* 8: */ import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Output;
/* 9: */ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase;
/* 10: */ import gregtech.api.objects.GT_RenderedTexture;
/* 11: */ import gregtech.api.util.GT_Recipe;
@@ -19,6 +20,7 @@ import net.minecraft.block.Block;
/* 15: */ import net.minecraft.entity.player.InventoryPlayer;
/* 16: */ import net.minecraft.item.ItemStack;
/* 17: */ import net.minecraftforge.common.util.ForgeDirection;
+import net.minecraftforge.fluids.FluidStack;
/* 18: */
/* 19: */ public class GT_MetaTileEntity_DistillationTower
/* 20: */ extends GT_MetaTileEntity_MultiBlockBase
@@ -40,7 +42,7 @@ import net.minecraft.block.Block;
/* 36: */
/* 37: */ public String[] getDescription()
/* 38: */ {
-/* 39: 38 */ return new String[] { "Controller Block for the Distillation Tower", "Size: 3x6x3 (Hollow)", "Controller (front bottom)", "1x Input Hatch (anywhere)", "6x Output Hatch (anywhere)", "1x Energy Hatch (anywhere)", "1x Maintenance Hatch (anywhere)", "Clean Stainless Steel Casings for the rest (26 at least!)" };
+/* 39: 38 */ return new String[] { "Controller Block for the Distillation Tower", "Size: 3x6x3 (Hollow)", "Controller (front bottom)", "1x Input Hatch (bottom)", "5x Output Hatch (one each height level besides botton)","1x Output Bus (Botton)", "1x Energy Hatch (anywhere)", "1x Maintenance Hatch (anywhere)", "Clean Stainless Steel Casings for the rest (26 at least!)" };
/* 40: */ }
/* 41: */
/* 42: */ public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone)
@@ -73,15 +75,13 @@ import net.minecraft.block.Block;
/* 69: */
/* 70: */ public boolean checkRecipe(ItemStack aStack)
/* 71: */ {
-/* 72: 66 */ ArrayList<ItemStack> tInputList = getStoredInputs();
-/* 73: 68 */ for (ItemStack tInput : tInputList)
-/* 74: */ {
+/* 72: 66 */
/* 75: 69 */ long tVoltage = getMaxInputVoltage();
/* 76: 70 */ byte tTier = (byte)Math.max(1, GT_Utility.getTier(tVoltage));
-/* 77: */
-/* 78: 72 */ GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sDistillationRecipes.findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], null, new ItemStack[] { tInput });
+/* 77: */ if(this.mInputHatches.size()>0&&this.mInputHatches.get(0)!=null&&this.mInputHatches.get(0).mFluid!=null&&this.mInputHatches.get(0).mFluid.amount>0){
+/* 78: 72 */ GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sDistillationRecipes.findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], new FluidStack[]{this.mInputHatches.get(0).mFluid}, new ItemStack[] {});
/* 79: 73 */ if (tRecipe != null) {
-/* 80: 73 */ if (tRecipe.isRecipeInputEqual(true, null, new ItemStack[] { tInput }))
+/* 80: 73 */ if (tRecipe.isRecipeInputEqual(true, new FluidStack[]{this.mInputHatches.get(0).mFluid}, new ItemStack[] {}))
/* 81: */ {
/* 82: 74 */ this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000);
/* 83: 75 */ this.mEfficiencyIncrease = 10000;
@@ -105,11 +105,12 @@ import net.minecraft.block.Block;
/* 101: */ }
/* 102: 90 */ this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime);
/* 103: 91 */ this.mOutputItems = new ItemStack[] { tRecipe.getOutput(0) };
+ this.mOutputFluids = tRecipe.mFluidOutputs;
/* 104: 92 */ updateSlots();
/* 105: 93 */ return true;
/* 106: */ }
-/* 107: */ }
-/* 108: */ }
+/* 107: */ }}
+/* 108: */
/* 109: 96 */ return false;
/* 110: */ }
/* 111: */ private static boolean controller;
@@ -141,6 +142,16 @@ import net.minecraft.block.Block;
/* 136: */ }
/* 137: */ }
/* 138: */ }
+ if(this.mInputHatches.size()!=1||this.mOutputBusses.size()!=1||this.mInputBusses.size()!=0||this.mOutputHatches.size()!=5){return false;}
+ int height = this.getBaseMetaTileEntity().getYCoord();
+ if(this.mInputHatches.get(0).getBaseMetaTileEntity().getYCoord()!=height||this.mOutputBusses.get(0).getBaseMetaTileEntity().getYCoord()!=height){return false;}
+ GT_MetaTileEntity_Hatch_Output[] tmpHatches = new GT_MetaTileEntity_Hatch_Output[5];
+ for(int i=0;i< this.mOutputHatches.size();i++){
+ int hatchNumber = this.mOutputHatches.get(i).getBaseMetaTileEntity().getYCoord()-1-height;
+ if(tmpHatches[hatchNumber]==null){
+ tmpHatches[hatchNumber]=this.mOutputHatches.get(i);
+ }else{return false;}
+ }
/* 139:116 */ return tAmount >= 26;
/* 140: */ }
diff --git a/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer.java b/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer.java
index 946cb78876..bdfb51d5ac 100644
--- a/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer.java
+++ b/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer.java
@@ -20,6 +20,7 @@ import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
import gregtech.api.metatileentity.implementations.*;
+import gregtech.common.gui.GT_GUIContainer_FusionReactor;
import net.minecraft.block.Block;
/* 8: */ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
@@ -47,11 +48,15 @@ import net.minecraftforge.fluids.FluidStack;
/* 40: */
/* 41: */ public abstract long maxEUStore();
/* 50: */
-/* 51: */ public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer)
-/* 52: */ {
-/* 53: 31 */ getBaseMetaTileEntity().openGUI(aPlayer, 143);
-/* 54: 32 */ return true;
-/* 55: */ }
+ @Override
+ public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
+ return new GT_Container_MultiMachine(aPlayerInventory, aBaseMetaTileEntity);
+ }
+
+ @Override
+ public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
+ return new GT_GUIContainer_FusionReactor(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "FusionComputer.png");
+ }
/* 56: */
/* 57: */ public abstract MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity);
/* 61: */
diff --git a/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer1.java b/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer1.java
index 28c74e7a3d..b99a6678b5 100644
--- a/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer1.java
+++ b/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer1.java
@@ -33,7 +33,7 @@ public class GT_MetaTileEntity_FusionComputer1 extends GT_MetaTileEntity_FusionC
public int getFusionCoilMeta() {return 15;}
public String[] getDescription()
- {return new String[] { "It's over 9000!!!","LuV Casings around Superconducting Coils","2-16 Input Hatches","1-16 Output Hatches","1-16 Energy Hatches","All Hatches must be LuV or better" };}
+ {return new String[] { "It's over 9000!!!","LuV Casings around Superconducting Coils","2-16 Input Hatches","1-16 Output Hatches","1-16 Energy Hatches","All Hatches must be LuV or better","2048EU/t and 10mio EU Cap per Energy Hatch" };}
@Override
public int tierOverclock() {return 1;}
diff --git a/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer2.java b/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer2.java
index 80702a37cf..0f7fab7bd8 100644
--- a/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer2.java
+++ b/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer2.java
@@ -33,7 +33,7 @@ public class GT_MetaTileEntity_FusionComputer2 extends GT_MetaTileEntity_FusionC
public int getFusionCoilMeta() {return 7;}
public String[] getDescription()
- {return new String[] { "It's over 9000!!!","Fusion Casings around Fusion Coils","2-16 Input Hatches","1-16 Output Hatches","1-16 Energy Hatches","All Hatches must be ZPMV or better" };}
+ {return new String[] { "It's over 9000!!!","Fusion Casings around Fusion Coils","2-16 Input Hatches","1-16 Output Hatches","1-16 Energy Hatches","All Hatches must be ZPMV or better","4096EU/t and 20mio EU Cap per Energy Hatch" };}
@Override
public int tierOverclock() {return 2;}
diff --git a/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer3.java b/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer3.java
index 25c0576814..42371fbe82 100644
--- a/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer3.java
+++ b/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer3.java
@@ -33,7 +33,7 @@ public class GT_MetaTileEntity_FusionComputer3 extends GT_MetaTileEntity_FusionC
public int getFusionCoilMeta() {return 7;}
public String[] getDescription()
- {return new String[] { "A SUN DOWN ON EARTH","Fusion Casings MK II around Fusion Coils","2-16 Input Hatches","1-16 Output Hatches","1-16 Energy Hatches","All Hatches must be UV or better" };}
+ {return new String[] { "A SUN DOWN ON EARTH","Fusion Casings MK II around Fusion Coils","2-16 Input Hatches","1-16 Output Hatches","1-16 Energy Hatches","All Hatches must be UV or better","8192EU/t and 40mio EU Cap per Energy Hatch" };}
@Override
public int tierOverclock() {return 4;}
diff --git a/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java b/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java
index 9d5d1691c5..886bfd8a06 100644
--- a/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java
+++ b/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java
@@ -37,7 +37,7 @@ public class GT_MetaTileEntity_ProcessingArray extends GT_MetaTileEntity_MultiBl
/* 36: */
/* 37: */ public String[] getDescription()
/* 38: */ {
- /* 39: 38 */ return new String[] { "Controller Block for the Processing Array", "Size: 3x3x3 (Hollow)", "Controller (front centered)", "1x Input (anywhere)", "1x Output (anywhere)", "1x Energy Hatch (anywhere)", "1x Maintenance Hatch (anywhere)", "Robust Tungstensteel Casings for the rest (16 at least!)","Put up to 16 Basic Machines into the GUI Inventory" };
+ /* 39: 38 */ return new String[] { "Controller Block for the Processing Array", "Size: 3x3x3 (Hollow)", "Controller (front centered)", "1x Input (anywhere)", "1x Output (anywhere)", "1x Energy Hatch (anywhere)", "1x Maintenance Hatch (anywhere)", "Robust Tungstensteel Casings for the rest (16 at least!)","Put up to 16 Basic Machines into the GUI Inventory","Currently only fluid Centrifuge Recipes work correctly","Make Deuterium/Tritium with it." };
/* 40: */ }
/* 41: */
/* 42: */ public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone)