Fusion GUI and Distillation Tower

This commit is contained in:
Blood Asp 2015-04-26 02:04:07 +02:00
parent 6b80bc2d1c
commit f1610b1721
53 changed files with 264 additions and 49 deletions

View file

@ -3,6 +3,7 @@ package gregtech.api.gui;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.util.GT_Log;
import gregtech.api.util.GT_Utility;
import gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_FusionComputer;
import java.util.List;

View file

@ -29,6 +29,19 @@ public class GT_ContainerMetaTile_Machine extends GT_Container {
aInventoryPlayer.player.openContainer = aInventoryPlayer.player.inventoryContainer;
}
}
public GT_ContainerMetaTile_Machine(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, boolean doesBindInventory){
super(aInventoryPlayer, aTileEntity);
mTileEntity = aTileEntity;
if (mTileEntity != null && mTileEntity.getMetaTileEntity() != null) {
addSlots(aInventoryPlayer);
if (doesBindPlayerInventory()&&doesBindInventory) bindPlayerInventory(aInventoryPlayer);
detectAndSendChanges();
} else {
aInventoryPlayer.player.openContainer = aInventoryPlayer.player.inventoryContainer;
}
}
public int mActive = 0, mMaxProgressTime = 0, mProgressTime = 0, mEnergy = 0, mSteam = 0, mSteamStorage = 0, mStorage = 0, mOutput = 0, mInput = 0, mID = 0, mDisplayErrorCode = 0;
private int oActive = 0, oMaxProgressTime = 0, oProgressTime = 0, oEnergy = 0, oSteam = 0, oSteamStorage = 0, oStorage = 0, oOutput = 0, oInput = 0, oID = 0, oDisplayErrorCode = 0, mTimer = 0;

View file

@ -14,6 +14,10 @@ public class GT_Container_MultiMachine extends GT_ContainerMetaTile_Machine {
super(aInventoryPlayer, aTileEntity);
}
public GT_Container_MultiMachine(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, boolean bindInventory) {
super(aInventoryPlayer, aTileEntity, bindInventory);
}
@Override
public void addSlots(InventoryPlayer aInventoryPlayer) {
addSlotToContainer(new Slot(mTileEntity, 1, 152, 5));

View file

@ -239,6 +239,25 @@ public interface IGT_RecipeAdder {
*/
public boolean addGrinderRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4);
/**
* Adds a Distillation Tower Recipe
* @param aInput1 must be != null
* @param aOutputs must be != null 1-5 Fluids
* @param aOutput2 can be null
*/
public boolean addDistillationTowerRecipe(FluidStack aInput, FluidStack[] aOutputs, ItemStack aOutput2, int aDuration, int aEUt);
public boolean addSimpleArcFurnaceRecipe(ItemStack aInput, FluidStack aFluidInput, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUt);
public boolean addPlasmaArcFurnaceRecipe(ItemStack aInput, FluidStack aFluidInput, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUt);
/**
* Adds a Distillation Tower Recipe
*/

View file

@ -169,7 +169,10 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity {
if (mMaxProgresstime > 0 && ++mProgresstime>=mMaxProgresstime) {
if (mOutputItems != null) for (ItemStack tStack : mOutputItems) if (tStack != null) addOutput(tStack);
if (mOutputFluids != null) for (FluidStack tStack : mOutputFluids) if (tStack != null) addOutput(tStack);
if (mOutputFluids != null&&mOutputFluids.length==1) {for (FluidStack tStack : mOutputFluids) if (tStack != null) addOutput(tStack);}
else if(mOutputFluids!=null&&mOutputFluids.length>1){
System.out.println("addfluids");
addFluidOutputs(mOutputFluids);}
mEfficiency = Math.max(0, Math.min(mEfficiency + mEfficiencyIncrease, getMaxEfficiency(mInventory[1]) - ((getIdealStatus() - getRepairStatus()) * 1000)));
mOutputItems = null;
mProgresstime = 0;
@ -378,6 +381,15 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity {
return false;
}
private void addFluidOutputs(FluidStack[] mOutputFluids2) {
for(int i=0;i<mOutputFluids2.length;i++){
if(mOutputHatches.size()>=i&&mOutputHatches.get(i)!=null&&mOutputFluids2[i]!=null&&isValidMetaTileEntity(mOutputHatches.get(i))){
mOutputHatches.get(i).fill(mOutputFluids2[i], true);
}
}
}
public boolean depleteInput(FluidStack aLiquid) {
if (aLiquid == null) return false;
for (GT_MetaTileEntity_Hatch_Input tHatch : mInputHatches) {

View file

@ -280,18 +280,28 @@
/* 278:198 */ new GT_Recipe(aInput1, aInput2, aOutput1, aOutput2);
/* 279:199 */ return true;
/* 280: */ }
/* 281: */
/* 281: */ @Deprecated
/* 282: */ public boolean addDistillationRecipe(ItemStack aInput1, int aInput2, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4, int aDuration, int aEUt)
/* 283: */ {
/* 284:204 */ if ((aInput1 == null) || (aOutput1 == null)) {
/* 285:204 */ return false;
/* 286: */ }
/* 287:205 */ if ((aDuration = GregTech_API.sRecipeFile.get("distillation", aInput1, aDuration)) <= 0) {
/* 288:205 */ return false;
/* 289: */ }
/* 290:206 */ new GT_Recipe(aInput1, aInput2, aOutput1, aOutput2, aOutput3, aOutput4, aDuration, aEUt);
/* 291:207 */ return true;
///* 284:204 */ if ((aInput1 == null) || (aOutput1 == null)) {
///* 285:204 */ return false;
///* 286: */ }
///* 287:205 */ if ((aDuration = GregTech_API.sRecipeFile.get("distillation", aInput1, aDuration)) <= 0) {
///* 288:205 */ return false;
///* 289: */ }
///* 290:206 */ new GT_Recipe(aInput1, aInput2, aOutput1, aOutput2, aOutput3, aOutput4, aDuration, aEUt);
///* 291:207 */ return true;
return false;
/* 292: */ }
public boolean addDistillationTowerRecipe(FluidStack aInput, FluidStack[] aOutputs, ItemStack aOutput2, int aDuration, int aEUt){
if(aInput==null||aOutputs==null||aOutputs.length<1||aOutputs.length>5){return false;}
if((aDuration = GregTech_API.sRecipeFile.get("distillation", aInput.getUnlocalizedName(), aDuration))<=0){
return false;
}
GT_Recipe.GT_Recipe_Map.sDistillationRecipes.addRecipe(true, null,new ItemStack[]{ aOutput2}, null, new FluidStack[]{ aInput}, aOutputs, Math.min(aDuration,16), Math.max(1, aEUt), 0);
return false;
}
/* 293: */
/* 294: */ public boolean addVacuumFreezerRecipe(ItemStack aInput1, ItemStack aOutput1, int aDuration)
/* 295: */ {
@ -620,7 +630,43 @@
/* 618: */ }
/* 619:423 */ return false;
/* 620: */ }
/* 621: */
/* 621: */ public boolean addSimpleArcFurnaceRecipe(ItemStack aInput, FluidStack aFluidInput, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUt)
/* 598: */ {
/* 599:413 */ if ((aInput == null) || (aOutputs == null)||aFluidInput==null) {
/* 600:413 */ return false;
/* 601: */ }
/* 602:414 */ for (ItemStack tStack : aOutputs) {
/* 603:414 */ if (tStack != null)
/* 604: */ {
/* 605:415 */ if ((aDuration = GregTech_API.sRecipeFile.get("arcfurnace", aInput, aDuration)) <= 0) {
/* 606:415 */ return false;
/* 607: */ }
/* 608:416 */ GT_Recipe.GT_Recipe_Map.sArcFurnaceRecipes.addRecipe(true, new ItemStack[] { aInput }, aOutputs, null, aChances, new FluidStack[] { aFluidInput }, null, Math.max(1, aDuration), Math.max(1, aEUt), 0);
/* 609:417 */ return true;
/* 617: */ }
/* 618: */ }
/* 619:423 */ return false;
/* 620: */ }
/* 621: */ public boolean addPlasmaArcFurnaceRecipe(ItemStack aInput, FluidStack aFluidInput, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUt)
/* 598: */ {
/* 599:413 */ if ((aInput == null) || (aOutputs == null)||aFluidInput==null) {
/* 600:413 */ return false;
/* 601: */ }
/* 602:414 */ for (ItemStack tStack : aOutputs) {
/* 603:414 */ if (tStack != null)
/* 604: */ {
/* 605:415 */ if ((aDuration = GregTech_API.sRecipeFile.get("arcfurnace", aInput, aDuration)) <= 0) {
/* 606:415 */ return false;
/* 607: */ }
/* 608:416 */ GT_Recipe.GT_Recipe_Map.sPlasmaArcFurnaceRecipes.addRecipe(true, new ItemStack[] { aInput }, aOutputs, null, aChances, new FluidStack[] { aFluidInput }, null, Math.max(1, aDuration), Math.max(1, aEUt), 0);
/* 609:417 */ return true;
/* 617: */ }
/* 618: */ }
/* 619:423 */ return false;
/* 620: */ }
/* 622: */ public boolean addPulveriserRecipe(ItemStack aInput, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUt)
/* 623: */ {
/* 624:428 */ if ((aInput == null) || (aOutputs == null)) {

View file

@ -0,0 +1,51 @@
package gregtech.common.gui;
import static gregtech.api.enums.GT_Values.RES_PATH_GUI;
import net.minecraft.entity.player.InventoryPlayer;
import gregtech.api.gui.GT_Container_MultiMachine;
import gregtech.api.gui.GT_GUIContainerMetaTile_Machine;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.util.GT_Utility;
public class GT_GUIContainer_FusionReactor extends GT_GUIContainerMetaTile_Machine {
String mName = "";
public GT_GUIContainer_FusionReactor(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName, String aTextureFile) {
super(new GT_Container_MultiMachine(aInventoryPlayer, aTileEntity, false), RES_PATH_GUI + "multimachines/" + (aTextureFile==null?"MultiblockDisplay":aTextureFile));
mName = aName;
}
@Override
protected void drawGuiContainerForegroundLayer(int par1, int par2) {
fontRendererObj.drawString(mName, 8, -10, 16448255);
if (mContainer != null) {
if ((((GT_Container_MultiMachine)mContainer).mDisplayErrorCode & 64) != 0) fontRendererObj.drawString("Incomplete Structure.", 10, 8, 16448255);
if (((GT_Container_MultiMachine)mContainer).mDisplayErrorCode == 0) {
if (((GT_Container_MultiMachine)mContainer).mActive == 0) {
fontRendererObj.drawString("Hit with Rubber Hammer to (re-)start the Machine if it doesn't start.", -70, 170, 16448255);
} else {
fontRendererObj.drawString("Running perfectly.", 10, 170, 16448255);
}
}
if(this.mContainer!=null){
fontRendererObj.drawString(GT_Utility.formatNumbers(this.mContainer.mEnergy)+" EU", 50, 155, 0x00b0b000);
}
}
}
@Override
protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
super.drawGuiContainerBackgroundLayer(par1, par2, par3);
int x = (width - xSize) / 2;
int y = (height - ySize) / 2;
drawTexturedModalRect(x, y, 0, 0, xSize, ySize);
if (this.mContainer != null)
{
double tScale = (double) this.mContainer.mEnergy / (double)this.mContainer.mStorage;
drawTexturedModalRect(x + 5, y + 156, 0, 251,Math.min(147, (int)(tScale*148)), 5);
}
}
}

View file

@ -0,0 +1,26 @@
package gregtech.common.items;
import net.minecraft.item.ItemStack;
import ic2.api.reactor.IReactor;
import gregtech.api.items.GT_RadioactiveCellIC_Item;
public class GT_DepletetCell_Item extends GT_RadioactiveCellIC_Item{
public GT_DepletetCell_Item(String aUnlocalized, String aEnglish, int aRadiation) {
super(aUnlocalized, aEnglish, 1, 1, 0, aRadiation);}
public void processChamber(IReactor paramIReactor, ItemStack paramItemStack, int paramInt1, int paramInt2, boolean paramBoolean){}
public boolean acceptUraniumPulse(IReactor paramIReactor, ItemStack paramItemStack1, ItemStack paramItemStack2, int paramInt1, int paramInt2, int paramInt3, int paramInt4, boolean paramBoolean){
return false;}
public boolean canStoreHeat(IReactor paramIReactor, ItemStack paramItemStack, int paramInt1, int paramInt2){return false;}
public int getMaxHeat(IReactor paramIReactor, ItemStack paramItemStack, int paramInt1, int paramInt2){return 0;}
public int getCurrentHeat(IReactor paramIReactor, ItemStack paramItemStack, int paramInt1, int paramInt2){return 0;}
public int alterHeat(IReactor paramIReactor, ItemStack paramItemStack, int paramInt1, int paramInt2, int paramInt3){return 0;}
public float influenceExplosion(IReactor paramIReactor, ItemStack paramItemStack){return 0.0F;}
}

View file

@ -486,7 +486,7 @@ import gregtech.api.util.GT_Utility;
/* 474:442 */ setElectricStats(32000 + tLastID, 1000000000L, GT_Values.V[6], 6L, -3L, true);
/* 475: */
/* 476:444 */ ItemList.ZPM2.set(addItem(tLastID = 605, "Ultimate Battery", "Fill this to win minecraft", new Object[] { new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 64L) }));
/* 477:445 */ setElectricStats(32000 + tLastID, Long.MAX_VALUE, GT_Values.V[9], 9L, -3L, true);
/* 477:445 */ setElectricStats(32000 + tLastID, Long.MAX_VALUE, GT_Values.V[8], 8L, -3L, true);
/* 478: */
/* 479:447 */ ItemList.Electric_Motor_LV.set(addItem(tLastID = 600, "Electric Motor (LV)", "", new Object[] { new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 1L) }));
/* 480:448 */ ItemList.Electric_Motor_MV.set(addItem(tLastID = 601, "Electric Motor (MV)", "", new Object[] { new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 2L) }));
@ -636,18 +636,6 @@ import gregtech.api.util.GT_Utility;
/* 624:592 */ GT_ModHandler.addCraftingRecipe(ItemList.Sensor_EV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[] { "P Q", "PS ", "CPP", Character.valueOf('Q'), OrePrefixes.gem.get(Materials.EnderPearl), Character.valueOf('S'), OrePrefixes.stick.get(Materials.Platinum), Character.valueOf('P'), OrePrefixes.plate.get(Materials.Titanium), Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Elite) });
/* 625:593 */ GT_ModHandler.addCraftingRecipe(ItemList.Sensor_IV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[] { "P Q", "PS ", "CPP", Character.valueOf('Q'), OrePrefixes.gem.get(Materials.EnderEye), Character.valueOf('S'), OrePrefixes.stick.get(Materials.Osmium), Character.valueOf('P'), OrePrefixes.plate.get(Materials.TungstenSteel), Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Master) });
/* 626: */
ItemList.Depleted_Thorium_1.set(addItem(tLastID = 695, "Fuel Rod (Depleted Thorium)", "Burned out", new Object[0]));
ItemList.Depleted_Thorium_2.set(addItem(tLastID = 696, "Dual Fuel Rod (Depleted Thorium)", "Burned out", new Object[0]));
ItemList.Depleted_Thorium_4.set(addItem(tLastID = 697, "Quad Fuel Rod (Depleted Thorium)", "Burned out", new Object[0]));
GT_ModHandler.addThermalCentrifugeRecipe(ItemList.Depleted_Thorium_1.get(1, new Object[0]), 5000, new Object[]{ GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Lutetium, 1L),GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Thorium, 2L),GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Iron, 1L)});
GT_ModHandler.addThermalCentrifugeRecipe(ItemList.Depleted_Thorium_2.get(1, new Object[0]), 5000, new Object[]{ GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Lutetium, 2L),GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Thorium, 4L),GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Iron, 3L)});
GT_ModHandler.addThermalCentrifugeRecipe(ItemList.Depleted_Thorium_4.get(1, new Object[0]), 5000, new Object[]{ GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Lutetium, 4L),GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Thorium, 8L),GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Iron, 6L)});
/* 627:595 */ ItemList.Circuit_Primitive.set(addItem(tLastID = 700, "NAND Chip", "A very simple Circuit", new Object[] { OrePrefixes.circuit.get(Materials.Primitive) }));
/* 628:596 */ ItemList.Circuit_Basic.set(addItem(tLastID = 701, "Basic Electronic Circuit", "A basic Circuit", new Object[] { OrePrefixes.circuit.get(Materials.Basic) }));
/* 629:597 */ ItemList.Circuit_Good.set(addItem(tLastID = 702, "Good Electronic Circuit", "A good Circuit", new Object[] { OrePrefixes.circuit.get(Materials.Good) }));

View file

@ -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: */ }

View file

@ -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: */

View file

@ -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;}

View file

@ -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;}

View file

@ -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;}

View file

@ -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)

View file

@ -681,8 +681,20 @@ public class GT_MachineRecipeLoader
GT_Values.RA.addImplosionRecipe(ItemList.IC2_Compressed_Coal_Chunk.get(1L, new Object[0]), 8, ItemList.IC2_Industrial_Diamond.get(1L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.DarkAsh, 4L));
GT_Values.RA.addDistillationRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Oil, 16L), 32, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Fuel, 16L), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.SulfuricAcid, 16L), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Glyceryl, 1L), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Methane, 15L), 4000, 64);
GT_Values.RA.addDistillationRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Biomass, 3L), 0, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Ethanol, 1L), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Water, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), ItemList.IC2_Fertilizer.get(1L, new Object[0]), 500, 64);
// GT_Values.RA.addDistillationRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Oil, 16L), 32, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Fuel, 16L), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.SulfuricAcid, 16L), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Glyceryl, 1L), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Methane, 15L), 4000, 64);
// GT_Values.RA.addDistillationRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Biomass, 3L), 0, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Ethanol, 1L), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Water, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), ItemList.IC2_Fertilizer.get(1L, new Object[0]), 500, 64);
GT_Values.RA.addDistillationTowerRecipe(Materials.Oil.getFluid(64L), new FluidStack[]{Materials.Lubricant.getFluid(16L) , Materials.Fuel.getFluid(64L), Materials.SulfuricAcid.getFluid(64L), Materials.Glyceryl.getFluid(4L), Materials.Methane.getGas(60L)},null, 16, 64);
GT_Values.RA.addDistillationTowerRecipe(new FluidStack(ItemList.sOilLight, 128), new FluidStack[]{Materials.Lubricant.getFluid(16L) , Materials.Fuel.getFluid(64L), Materials.SulfuricAcid.getFluid(64L), Materials.Glyceryl.getFluid(4L), Materials.Methane.getGas(60L)}, null, 16, 64);
GT_Values.RA.addDistillationTowerRecipe(new FluidStack(ItemList.sOilMedium, 64), new FluidStack[]{Materials.Lubricant.getFluid(16L) , Materials.Fuel.getFluid(64L), Materials.SulfuricAcid.getFluid(64L), Materials.Glyceryl.getFluid(4L), Materials.Methane.getGas(60L)}, null, 16, 64);
GT_Values.RA.addDistillationTowerRecipe(new FluidStack(ItemList.sOilHeavy, 32), new FluidStack[]{Materials.Lubricant.getFluid(16L) , Materials.Fuel.getFluid(64L), Materials.SulfuricAcid.getFluid(64L), Materials.Glyceryl.getFluid(4L), Materials.Methane.getGas(60L)}, GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.HydratedCoal, 1L), 24, 64);
GT_Values.RA.addDistillationTowerRecipe(new FluidStack(ItemList.sOilExtraHeavy, 16), new FluidStack[]{Materials.Lubricant.getFluid(16L) , Materials.Fuel.getFluid(64L), Materials.SulfuricAcid.getFluid(64L), Materials.Glyceryl.getFluid(4L), Materials.Methane.getGas(60L)}, GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.HydratedCoal, 1L), 24, 64);
GT_Values.RA.addDistillationTowerRecipe(new FluidStack(ItemList.sNaturalGas, 64), new FluidStack[]{Materials.Methane.getGas(120L)}, null, 16, 64);
GT_Values.RA.addDistillationTowerRecipe(Materials.Creosote.getFluid(24L), new FluidStack[]{Materials.Lubricant.getFluid(12L)}, null, 16, 96);
GT_Values.RA.addDistillationTowerRecipe(Materials.SeedOil.getFluid(32L), new FluidStack[]{Materials.Lubricant.getFluid(12L)}, null, 16, 96);
GT_Values.RA.addDistillationTowerRecipe(Materials.FishOil.getFluid(24L), new FluidStack[]{Materials.Lubricant.getFluid(12L)}, null, 16, 96);
GT_Values.RA.addDistillationTowerRecipe(Materials.Biomass.getFluid(150L), new FluidStack[]{Materials.Ethanol.getFluid(60L),Materials.Water.getFluid(60L)}, GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Wood, 1L), 25, 64);
GT_Values.RA.addDistillationTowerRecipe(Materials.Water.getFluid(288L), new FluidStack[]{GT_ModHandler.getDistilledWater(260L)}, null, 16, 64);
GT_Values.RA.addElectrolyzerRecipe(GT_Values.NI, ItemList.Cell_Empty.get(1L, new Object[0]), Materials.Water.getFluid(3000L), Materials.Hydrogen.getGas(2000L), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Oxygen, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, null, 1500, 30);
GT_Values.RA.addElectrolyzerRecipe(GT_Values.NI, ItemList.Cell_Empty.get(1L, new Object[0]), GT_ModHandler.getDistilledWater(3000L), Materials.Hydrogen.getGas(2000L), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Oxygen, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, null, 1500, 30);

View file

@ -29,6 +29,7 @@ import gregtech.api.items.GT_RadioactiveCellIC_Item;
/* 28: */ import gregtech.common.blocks.GT_Block_Machines;
/* 29: */ import gregtech.common.blocks.GT_Block_Ores;
/* 30: */ import gregtech.common.blocks.GT_TileEntity_Ores;
import gregtech.common.items.GT_DepletetCell_Item;
/* 31: */ import gregtech.common.items.GT_FluidDisplayItem;
/* 32: */ import gregtech.common.items.GT_IntegratedCircuit_Item;
/* 33: */ import gregtech.common.items.GT_MetaGenerated_Item_01;
@ -37,6 +38,7 @@ import gregtech.api.items.GT_RadioactiveCellIC_Item;
/* 36: */ import gregtech.common.items.GT_MetaGenerated_Tool_01;
import gregtech.common.items.GT_NeutronReflector_Item;
import ic2.core.Ic2Items;
import ic2.core.item.ItemRadioactive;
/* 37: */ import java.io.PrintStream;
@ -141,6 +143,15 @@ import ic2.core.Ic2Items;
ItemList.ThoriumCell_4.set(new GT_RadioactiveCellIC_Item("Quad_Thoriumcell", "Quad Fuel Rod (Thorium)", 4, 50000, 0.2D,0));
GT_ModHandler.addCraftingRecipe(ItemList.ThoriumCell_4.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE , new Object[] { "RPR", "CPC", "RPR",'R', ItemList.ThoriumCell_1 ,'P', OrePrefixes.plate.get(Materials.Iron),'C', OrePrefixes.plate.get(Materials.Copper) });
ItemList.Depleted_Thorium_1.set(new GT_DepletetCell_Item("ThoriumcellDep","Fuel Rod (Depleted Thorium)",1));
ItemList.Depleted_Thorium_2.set(new GT_DepletetCell_Item("Double_ThoriumcellDep","Dual Fuel Rod (Depleted Thorium)",2));
ItemList.Depleted_Thorium_4.set(new GT_DepletetCell_Item("Quad_ThoriumcellDep","Quad Fuel Rod (Depleted Thorium)",4));
GT_ModHandler.addThermalCentrifugeRecipe(ItemList.Depleted_Thorium_1.get(1, new Object[0]), 5000, new Object[]{ GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Lutetium, 1L),GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Thorium, 2L),GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Iron, 1L)});
GT_ModHandler.addThermalCentrifugeRecipe(ItemList.Depleted_Thorium_2.get(1, new Object[0]), 5000, new Object[]{ GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Lutetium, 2L),GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Thorium, 4L),GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Iron, 3L)});
GT_ModHandler.addThermalCentrifugeRecipe(ItemList.Depleted_Thorium_4.get(1, new Object[0]), 5000, new Object[]{ GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Lutetium, 4L),GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Thorium, 8L),GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Iron, 6L)});
/* 108: */
/* 109:110 */ GT_Log.out.println("GT_Mod: Adding Blocks.");
/* 110:111 */ GregTech_API.sBlockMachines = new GT_Block_Machines();

View file

@ -563,7 +563,23 @@
this.mInputs.add(new FixedPositionedStack( GT_Utility.getFluidDisplayStack(aRecipe.mFluidInputs[1], true), 30, 52));
}
/* 562: */ }
/* 563:265 */ if ((aRecipe.mFluidOutputs.length > 0) && (aRecipe.mFluidOutputs[0] != null) && (aRecipe.mFluidOutputs[0].getFluid() != null)) {
if(aRecipe.mFluidOutputs.length>1){
if(aRecipe.mFluidOutputs[0]!=null && (aRecipe.mFluidOutputs[0].getFluid() != null)){
this.mOutputs.add(new FixedPositionedStack( GT_Utility.getFluidDisplayStack(aRecipe.mFluidOutputs[0], true), 120, 5));
}
if(aRecipe.mFluidOutputs[1]!=null && (aRecipe.mFluidOutputs[1].getFluid() != null)){
this.mOutputs.add(new FixedPositionedStack( GT_Utility.getFluidDisplayStack(aRecipe.mFluidOutputs[1], true), 138, 5));
}
if(aRecipe.mFluidOutputs.length>2&&aRecipe.mFluidOutputs[2]!=null && (aRecipe.mFluidOutputs[2].getFluid() != null)){
this.mOutputs.add(new FixedPositionedStack( GT_Utility.getFluidDisplayStack(aRecipe.mFluidOutputs[2], true), 102, 23));
}
if(aRecipe.mFluidOutputs.length>3&&aRecipe.mFluidOutputs[3]!=null && (aRecipe.mFluidOutputs[3].getFluid() != null)){
this.mOutputs.add(new FixedPositionedStack( GT_Utility.getFluidDisplayStack(aRecipe.mFluidOutputs[3], true), 120, 23));
}
if(aRecipe.mFluidOutputs.length>4&&aRecipe.mFluidOutputs[4]!=null && (aRecipe.mFluidOutputs[4].getFluid() != null)){
this.mOutputs.add(new FixedPositionedStack( GT_Utility.getFluidDisplayStack(aRecipe.mFluidOutputs[4], true), 138, 23));
}
}else if ((aRecipe.mFluidOutputs.length > 0) && (aRecipe.mFluidOutputs[0] != null) && (aRecipe.mFluidOutputs[0].getFluid() != null)) {
/* 564:265 */ this.mOutputs.add(new FixedPositionedStack( GT_Utility.getFluidDisplayStack(aRecipe.mFluidOutputs[0], true), 102, 52));
/* 565: */ }
/* 566: */ }

View file

@ -3,11 +3,11 @@
"name": "GregTech-Addon",
"description": "This Mod adds the awesome Technology of GregTech-Intergalactical to your World!",
"mcversion": "1.7.10",
"version": "5.07",
"version": "5.08",
"logoFile": "/assets/gregtech_addon/textures/LogoGTI_Long.png",
"url": "http://forum.industrial-craft.net/index.php?page=Thread&threadID=7156",
"url": "http://forum.industrial-craft.net/index.php?page=Thread&threadID=11488",
"updateUrl": "",
"authors": ["Gregorius Techneticies"],
"authors": ["Gregorius Techneticies","Blood Asp"],
"credits": "Notch and Mojang for Minecraft, Alblaka and his Team for IndustrialCraft, Mr. Brain for many of the Crop Textures, OvermindDL for helping me with Code, TheSirusKing and matix for a few Textures",
"parent": "",
"screenshots": [],