From 4546f45e3ace4cb08ed11090cb48e0e622e9c16f Mon Sep 17 00:00:00 2001 From: Johannes Gäßler Date: Sun, 7 May 2017 15:36:01 +0200 Subject: Created a non-functional first draft for the Large chemical Reactor --- .../GT_MetaTileEntity_LargeChemicalReactor.java | 80 ++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java (limited to 'src/main/java/gregtech/common/tileentities') diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java new file mode 100644 index 0000000000..6e57f85c99 --- /dev/null +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java @@ -0,0 +1,80 @@ +package gregtech.common.tileentities.machines.multi; + +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; +import gregtech.api.objects.GT_RenderedTexture; +import net.minecraft.item.ItemStack; + +public class GT_MetaTileEntity_LargeChemicalReactor extends GT_MetaTileEntity_MultiBlockBase { + + public GT_MetaTileEntity_LargeChemicalReactor(int aID, String aName, String aNameRegional) { + super(aID, aName, aNameRegional); + } + + public GT_MetaTileEntity_LargeChemicalReactor(String aName) { + super(aName); + } + + @Override + public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_LargeChemicalReactor(this.mName); + } + + @Override + public String[] getDescription() { + return new String[] { + "Controller block for the Large Chemical Reactor", + "Has the same recipes as the Chemical Reactor", + "Does not lose efficiency when overclocked", + "Accepts fluids instead of fluid cells" }; + } + + @Override + public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { + if (aSide == aFacing) { + return new ITexture[] { + Textures.BlockIcons.CASING_BLOCKS[0], + new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_LARGE_BOILER_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_LARGE_BOILER) }; + } + return new ITexture[] { Textures.BlockIcons.CASING_BLOCKS[0] }; + } + + @Override + public boolean isCorrectMachinePart(ItemStack aStack) { + return true; + } + + @Override + public boolean checkRecipe(ItemStack aStack) { + return false; + } + + @Override + public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { + return false; + } + + @Override + public int getMaxEfficiency(ItemStack aStack) { + return 10000; + } + + @Override + public int getPollutionPerTick(ItemStack aStack) { + return 0; + } + + @Override + public int getDamageToComponent(ItemStack aStack) { + return 0; + } + + @Override + public boolean explodesOnComponentBreak(ItemStack aStack) { + return false; + } + +} -- cgit From 7bc06a39698fc74f8ce33f82e7e1ec2a4b350401 Mon Sep 17 00:00:00 2001 From: Johannes Gäßler Date: Mon, 8 May 2017 00:11:36 +0200 Subject: Implemented checkMachine for the LCR, added machine casings --- .../GT_MetaTileEntity_LargeChemicalReactor.java | 67 ++++++++++++++++++++-- 1 file changed, 61 insertions(+), 6 deletions(-) (limited to 'src/main/java/gregtech/common/tileentities') diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java index 6e57f85c99..9a148cc95d 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java @@ -1,15 +1,21 @@ package gregtech.common.tileentities.machines.multi; +import gregtech.api.GregTech_API; import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Log; +import net.minecraft.block.Block; import net.minecraft.item.ItemStack; +import net.minecraftforge.common.util.ForgeDirection; public class GT_MetaTileEntity_LargeChemicalReactor extends GT_MetaTileEntity_MultiBlockBase { + private static final int CASING_INDEX = 16; + public GT_MetaTileEntity_LargeChemicalReactor(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); } @@ -29,17 +35,28 @@ public class GT_MetaTileEntity_LargeChemicalReactor extends GT_MetaTileEntity_Mu "Controller block for the Large Chemical Reactor", "Has the same recipes as the Chemical Reactor", "Does not lose efficiency when overclocked", - "Accepts fluids instead of fluid cells" }; + "Accepts fluids instead of fluid cells", + "Size(WxHxD): 3x2x3", + "Controller (Lower front centered)", + "1x Any Heating Coil (Bottom centered)", + "1x PTFE Pipe Casing (Top centered)", + "1x Input Bus/Hatch (Any edge casing)", + "1x Output Bus/Hatch (Any edge casing)", + "1x Maintenance Hatch (Any edge casing)", + "1x Energy Hatch (Any edge casing)", + "Chemically Inert Casings for the rest (10 at least!)" }; } @Override - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { + public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, + boolean aRedstone) { if (aSide == aFacing) { return new ITexture[] { - Textures.BlockIcons.CASING_BLOCKS[0], - new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_LARGE_BOILER_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_LARGE_BOILER) }; + Textures.BlockIcons.CASING_BLOCKS[CASING_INDEX], + new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_IMPLOSION_COMPRESSOR_ACTIVE + : Textures.BlockIcons.OVERLAY_FRONT_IMPLOSION_COMPRESSOR) }; } - return new ITexture[] { Textures.BlockIcons.CASING_BLOCKS[0] }; + return new ITexture[] { Textures.BlockIcons.CASING_BLOCKS[CASING_INDEX] }; } @Override @@ -54,7 +71,45 @@ public class GT_MetaTileEntity_LargeChemicalReactor extends GT_MetaTileEntity_Mu @Override public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { - return false; + int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX; + int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ; + int casingAmount = 0; + // i=width, j=depth, k=height + for (int x = -1 + xDir; x <= xDir + 1; x++) { + for (int z = -1 + zDir; z <= zDir + 1; z++) { + for (int y = 0; y <= 1; y++) { + IGregTechTileEntity tileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(x, y, z); + Block block = aBaseMetaTileEntity.getBlockOffset(x, y, z); + if (x == xDir && z == zDir) { + if (y == 0 && block != GregTech_API.sBlockCasings5) { + GT_Log.err.println("EPIK no Heating Coil"); + GT_Log.err.println("EPIK found " + block); + return false; + } else if (y == 1 + && (block != GregTech_API.sBlockCasings4 || aBaseMetaTileEntity.getMetaIDOffset(x, y, z) != 15)) { + GT_Log.err.println("EPIK no PTFE Pipe Casing"); + return false; + } + } else if (x != 0 || y != 0 || z != 0) { + if (!addInputToMachineList(tileEntity, CASING_INDEX) && !addOutputToMachineList(tileEntity, CASING_INDEX) + && !addMaintenanceToMachineList(tileEntity, CASING_INDEX) + && !addEnergyInputToMachineList(tileEntity, CASING_INDEX)) { + if (block == GregTech_API.sBlockCasings2 && aBaseMetaTileEntity.getMetaIDOffset(x, y, z) == 0) { + casingAmount++; + GT_Log.err.println("EPIK correct casing at " + x + " " + y + " " + z); + } else { + GT_Log.err.println("EPIK wrong casing at " + x + " " + y + " " + z); + GT_Log.err.println("Found " + tileEntity); + return false; + } + } + } + + } + } + + } + return casingAmount >= 10; } @Override -- cgit From 989f2f2356b6591465f3173b854b8fd32c9180e0 Mon Sep 17 00:00:00 2001 From: Johannes Gäßler Date: Mon, 8 May 2017 00:12:23 +0200 Subject: Deleted prints used for debugging --- .../machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java | 6 ------ 1 file changed, 6 deletions(-) (limited to 'src/main/java/gregtech/common/tileentities') diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java index 9a148cc95d..0b59e853c8 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java @@ -82,12 +82,9 @@ public class GT_MetaTileEntity_LargeChemicalReactor extends GT_MetaTileEntity_Mu Block block = aBaseMetaTileEntity.getBlockOffset(x, y, z); if (x == xDir && z == zDir) { if (y == 0 && block != GregTech_API.sBlockCasings5) { - GT_Log.err.println("EPIK no Heating Coil"); - GT_Log.err.println("EPIK found " + block); return false; } else if (y == 1 && (block != GregTech_API.sBlockCasings4 || aBaseMetaTileEntity.getMetaIDOffset(x, y, z) != 15)) { - GT_Log.err.println("EPIK no PTFE Pipe Casing"); return false; } } else if (x != 0 || y != 0 || z != 0) { @@ -96,10 +93,7 @@ public class GT_MetaTileEntity_LargeChemicalReactor extends GT_MetaTileEntity_Mu && !addEnergyInputToMachineList(tileEntity, CASING_INDEX)) { if (block == GregTech_API.sBlockCasings2 && aBaseMetaTileEntity.getMetaIDOffset(x, y, z) == 0) { casingAmount++; - GT_Log.err.println("EPIK correct casing at " + x + " " + y + " " + z); } else { - GT_Log.err.println("EPIK wrong casing at " + x + " " + y + " " + z); - GT_Log.err.println("Found " + tileEntity); return false; } } -- cgit From ad40b85de13f4e576d78d32fb4fcb6514a80e4ab Mon Sep 17 00:00:00 2001 From: Johannes Gäßler Date: Tue, 9 May 2017 18:25:24 +0200 Subject: Implemented checkRecipe --- .../GT_MetaTileEntity_LargeChemicalReactor.java | 67 +++++++++++++++++++++- 1 file changed, 65 insertions(+), 2 deletions(-) (limited to 'src/main/java/gregtech/common/tileentities') diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java index 0b59e853c8..63d0dd66a7 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java @@ -1,5 +1,8 @@ package gregtech.common.tileentities.machines.multi; +import java.util.ArrayList; +import java.util.Arrays; + import gregtech.api.GregTech_API; import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; @@ -8,9 +11,12 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.util.GT_Log; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; import net.minecraft.block.Block; import net.minecraft.item.ItemStack; import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.FluidStack; public class GT_MetaTileEntity_LargeChemicalReactor extends GT_MetaTileEntity_MultiBlockBase { @@ -66,6 +72,63 @@ public class GT_MetaTileEntity_LargeChemicalReactor extends GT_MetaTileEntity_Mu @Override public boolean checkRecipe(ItemStack aStack) { + ArrayList tInputList = getStoredInputs(); + int tInputList_sS=tInputList.size(); + for (int i = 0; i < tInputList_sS - 1; i++) { + for (int j = i + 1; j < tInputList_sS; j++) { + if (GT_Utility.areStacksEqual((ItemStack) tInputList.get(i), (ItemStack) tInputList.get(j))) { + if (((ItemStack) tInputList.get(i)).stackSize >= ((ItemStack) tInputList.get(j)).stackSize) { + tInputList.remove(j--); tInputList_sS=tInputList.size(); + } else { + tInputList.remove(i--); tInputList_sS=tInputList.size(); + break; + } + } + } + } + ItemStack[] inputs = tInputList.toArray(new ItemStack[tInputList.size()]); + + ArrayList tFluidList = getStoredFluids(); + int tFluidList_sS = tFluidList.size(); + for (int i = 0; i < tFluidList_sS - 1; i++) { + for (int j = i + 1; j < tFluidList_sS; j++) { + if (GT_Utility.areFluidsEqual(tFluidList.get(i), tFluidList.get(j))) { + if (tFluidList.get(i).amount >= tFluidList.get(j).amount) { + tFluidList.remove(j--); + tFluidList_sS = tFluidList.size(); + } else { + tFluidList.remove(i--); + tFluidList_sS = tFluidList.size(); + break; + } + } + } + } + FluidStack[] fluids = tFluidList.toArray(new FluidStack[tFluidList.size()]); + + if (inputs.length > 0 || fluids.length > 0) { + long voltage = getMaxInputVoltage(); + byte tier = (byte) Math.max(1, GT_Utility.getTier(voltage)); + GT_Recipe recipe = GT_Recipe.GT_Recipe_Map.sChemicalRecipes.findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tier], fluids, inputs); + if (recipe != null && recipe.isRecipeInputEqual(true, fluids, inputs)) { + this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); + this.mEfficiencyIncrease = 10000; + + int EUt = recipe.mEUt; + int maxProgresstime = recipe.mDuration; + + while (EUt <= gregtech.api.enums.GT_Values.V[tier - 1] && maxProgresstime > 1) { + EUt *= 4; + maxProgresstime /= 4; + } + + this.mEUt = -EUt; + this.mMaxProgresstime = maxProgresstime; + this.mOutputItems = recipe.mOutputs; + this.mOutputFluids = recipe.mFluidOutputs; + return true; + } + } return false; } @@ -74,7 +137,7 @@ public class GT_MetaTileEntity_LargeChemicalReactor extends GT_MetaTileEntity_Mu int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX; int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ; int casingAmount = 0; - // i=width, j=depth, k=height + // x=width, z=depth, y=height for (int x = -1 + xDir; x <= xDir + 1; x++) { for (int z = -1 + zDir; z <= zDir + 1; z++) { for (int y = 0; y <= 1; y++) { @@ -103,7 +166,7 @@ public class GT_MetaTileEntity_LargeChemicalReactor extends GT_MetaTileEntity_Mu } } - return casingAmount >= 10; + return casingAmount >= 8; } @Override -- cgit From 0c2dee56daeb7b94208a581f1dc9f21edbb5e2f6 Mon Sep 17 00:00:00 2001 From: Johannes Gäßler Date: Tue, 9 May 2017 21:51:49 +0200 Subject: Added new textures for the LCM, using them now --- .../machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/main/java/gregtech/common/tileentities') diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java index 63d0dd66a7..c7a11829a8 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java @@ -20,7 +20,7 @@ import net.minecraftforge.fluids.FluidStack; public class GT_MetaTileEntity_LargeChemicalReactor extends GT_MetaTileEntity_MultiBlockBase { - private static final int CASING_INDEX = 16; + private static final int CASING_INDEX = 62; public GT_MetaTileEntity_LargeChemicalReactor(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); @@ -50,7 +50,7 @@ public class GT_MetaTileEntity_LargeChemicalReactor extends GT_MetaTileEntity_Mu "1x Output Bus/Hatch (Any edge casing)", "1x Maintenance Hatch (Any edge casing)", "1x Energy Hatch (Any edge casing)", - "Chemically Inert Casings for the rest (10 at least!)" }; + "Chemically Inert Casings for the rest (8 at least!)" }; } @Override @@ -59,8 +59,8 @@ public class GT_MetaTileEntity_LargeChemicalReactor extends GT_MetaTileEntity_Mu if (aSide == aFacing) { return new ITexture[] { Textures.BlockIcons.CASING_BLOCKS[CASING_INDEX], - new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_IMPLOSION_COMPRESSOR_ACTIVE - : Textures.BlockIcons.OVERLAY_FRONT_IMPLOSION_COMPRESSOR) }; + new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR + : Textures.BlockIcons.OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR_ACTIVE) }; } return new ITexture[] { Textures.BlockIcons.CASING_BLOCKS[CASING_INDEX] }; } -- cgit From 3cf169b5c3f1b346b249704f6a3992ce3a591dea Mon Sep 17 00:00:00 2001 From: Johannes Gäßler Date: Fri, 12 May 2017 22:50:29 +0200 Subject: Added crafting recipes for the LCH --- .../machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/java/gregtech/common/tileentities') diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java index c7a11829a8..a110300c0f 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java @@ -59,8 +59,8 @@ public class GT_MetaTileEntity_LargeChemicalReactor extends GT_MetaTileEntity_Mu if (aSide == aFacing) { return new ITexture[] { Textures.BlockIcons.CASING_BLOCKS[CASING_INDEX], - new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR - : Textures.BlockIcons.OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR_ACTIVE) }; + new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR_ACTIVE + : Textures.BlockIcons.OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR) }; } return new ITexture[] { Textures.BlockIcons.CASING_BLOCKS[CASING_INDEX] }; } -- cgit From 60348c09ba6cabf571d8dcb8e0251db2bd70d511 Mon Sep 17 00:00:00 2001 From: Johannes Gäßler Date: Sat, 13 May 2017 16:37:39 +0200 Subject: Added a new recipe map for the LCR, expanded the API to allow for custom NEI stack positioning. Refactored the name of the Large Boiler Fake Fuels so they're in line with other names. Fixed a bug where the LCM was checking for the wrong casing type. --- .../machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/java/gregtech/common/tileentities') diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java index a110300c0f..db3841b394 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java @@ -109,7 +109,7 @@ public class GT_MetaTileEntity_LargeChemicalReactor extends GT_MetaTileEntity_Mu if (inputs.length > 0 || fluids.length > 0) { long voltage = getMaxInputVoltage(); byte tier = (byte) Math.max(1, GT_Utility.getTier(voltage)); - GT_Recipe recipe = GT_Recipe.GT_Recipe_Map.sChemicalRecipes.findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tier], fluids, inputs); + GT_Recipe recipe = GT_Recipe.GT_Recipe_Map.sMultiblockChemicalRecipes.findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tier], fluids, inputs); if (recipe != null && recipe.isRecipeInputEqual(true, fluids, inputs)) { this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); this.mEfficiencyIncrease = 10000; @@ -154,7 +154,7 @@ public class GT_MetaTileEntity_LargeChemicalReactor extends GT_MetaTileEntity_Mu if (!addInputToMachineList(tileEntity, CASING_INDEX) && !addOutputToMachineList(tileEntity, CASING_INDEX) && !addMaintenanceToMachineList(tileEntity, CASING_INDEX) && !addEnergyInputToMachineList(tileEntity, CASING_INDEX)) { - if (block == GregTech_API.sBlockCasings2 && aBaseMetaTileEntity.getMetaIDOffset(x, y, z) == 0) { + if (block == GregTech_API.sBlockCasings4 && aBaseMetaTileEntity.getMetaIDOffset(x, y, z) == 14) { casingAmount++; } else { return false; -- cgit From a16ea6bbc7d45695da017ca440985fa77ca337ed Mon Sep 17 00:00:00 2001 From: Johannes Gäßler Date: Sat, 13 May 2017 23:08:50 +0200 Subject: Changed the Layout of the LCM to 3x3x3, tweaked the name of casings and the descriptions of multiblocks to make them consistent. --- .../multi/GT_MetaTileEntity_AssemblyLine.java | 9 +- .../multi/GT_MetaTileEntity_Cleanroom.java | 8 +- .../multi/GT_MetaTileEntity_DieselEngine.java | 10 +- .../multi/GT_MetaTileEntity_DistillationTower.java | 2 +- .../multi/GT_MetaTileEntity_FusionComputer1.java | 8 +- .../multi/GT_MetaTileEntity_FusionComputer2.java | 9 +- .../multi/GT_MetaTileEntity_FusionComputer3.java | 9 +- .../multi/GT_MetaTileEntity_HeatExchanger.java | 6 +- .../GT_MetaTileEntity_ImplosionCompressor.java | 2 +- .../multi/GT_MetaTileEntity_LargeBoiler.java | 12 +- .../GT_MetaTileEntity_LargeChemicalReactor.java | 145 +++++++++++---------- .../multi/GT_MetaTileEntity_LargeTurbine_Gas.java | 2 +- .../GT_MetaTileEntity_LargeTurbine_HPSteam.java | 2 +- .../GT_MetaTileEntity_LargeTurbine_Plasma.java | 2 +- .../GT_MetaTileEntity_LargeTurbine_Steam.java | 2 +- .../multi/GT_MetaTileEntity_OilCracker.java | 2 +- .../machines/multi/GT_MetaTileEntity_OilDrill.java | 4 +- .../multi/GT_MetaTileEntity_ProcessingArray.java | 4 +- .../multi/GT_MetaTileEntity_PyrolyseOven.java | 3 +- .../multi/GT_MetaTileEntity_VacuumFreezer.java | 2 +- 20 files changed, 133 insertions(+), 110 deletions(-) (limited to 'src/main/java/gregtech/common/tileentities') diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AssemblyLine.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AssemblyLine.java index c3ab282906..3f619102b4 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AssemblyLine.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AssemblyLine.java @@ -34,11 +34,12 @@ public class GT_MetaTileEntity_AssemblyLine public String[] getDescription() { return new String[]{"Assembly Line", "Size: 3x(5-16)x4, variable length", - "Bottom: Steel Casing(or Maintenance or Input Hatch),", - "Input Bus(Last Output Bus), Steel Casing", + "Bottom: Steel Machine Casing(or Maintenance or Input Hatch),", + "Input Bus (Last Output Bus), Steel Machine Casing", "Middle: Reinforced Glass, Assembly Line, Reinforced Glass", - "UpMiddle: Grate Casing, Assembling Casing,", - "Grate Casing(or Controller)", + "UpMiddle: Grate Machine Casing,", + " Assembler Machine Casing,", + " Grate Machine Casing (or Controller)", "Top: Steel Casing(or Energy Hatch)", "Up to 16 repeating slices, last is Output Bus"}; } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java index 015670cb02..ac7f7729d0 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java @@ -35,10 +35,10 @@ public class GT_MetaTileEntity_Cleanroom extends GT_MetaTileEntity_MultiBlockBas "Controller Block for the Cleanroom", "Min(WxHxD): 3x3x3 (Hollow), Max(WxHxD): 15x15x15 (Hollow)", "Controller (Top center), Walls Plascrete", - "Top besides contoller and corners filter casings", - "1 Reinforced Door", - "1x Energy Hatch, 1x Maintainance Hatch", - "up to 10 Machine Hull to transfer Items & Energy inside"}; + "Top besides contoller and edges Filter Machine Casings", + "1x Reinforced Door", + "1x MV+ Energy Hatch, 1x Maintainance Hatch", + "up to 10 Machine Hulls to transfer Items & Energy inside"}; } public boolean checkRecipe(ItemStack aStack) { diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DieselEngine.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DieselEngine.java index 55c83d1c91..ff382c369d 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DieselEngine.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DieselEngine.java @@ -40,14 +40,14 @@ public class GT_MetaTileEntity_DieselEngine extends GT_MetaTileEntity_MultiBlock return new String[]{ "Controller Block for the Large Diesel Engine", "Size(WxHxD): 3x3x4, Controller (front centered)", - "3x3x4 of Stable Titanium Casing (hollow, Min 16!)", - "2x Titanium Gear Box Casing inside the Hollow Casing", - "8x Engine Intake Casings (around controller)", - "2x Input Hatch (one of the Casings next to a Gear Box)", + "3x3x4 of Stable Titanium Machine Casing (hollow, Min 16!)", + "2x Titanium Gear Box Machine Casing inside the Hollow Casing", + "8x Engine Intake Machine Casing (around controller)", + "2x Input Hatch (Fuel/Lubricant) (one of the Casings next to a Gear Box)", "1x Maintenance Hatch (one of the Casings next to a Gear Box)", "1x Muffler Hatch (top middle back, next to the rear Gear Box)", "1x Dynamo Hatch (back centered)", - "Engine Intake Casings not obstructed in front (only air blocks)", + "Engine Intake Casings must not be obstructed in front (only air blocks)", "Supply Diesel Fuel and 1000L of Lubricant per hour to run.", "Supply 40L of Oxygen per second to boost output (optional).", "Default: Produces 2048EU/t at 100% efficiency", diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DistillationTower.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DistillationTower.java index 22dd01c755..3e962496e9 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DistillationTower.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DistillationTower.java @@ -46,7 +46,7 @@ public class GT_MetaTileEntity_DistillationTower "1x Output Bus (Any bottom layer casing)", "1x Maintenance Hatch (Any casing)", "1x Energy Hatch (Any casing)", - "Clean Stainless Steel Casings for the rest (36 at least!)"}; + "Clean Stainless Steel Machine Casings for the rest (36 at least!)"}; } public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer1.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer1.java index 0f9fe133b3..77290441cd 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer1.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer1.java @@ -48,7 +48,13 @@ public class GT_MetaTileEntity_FusionComputer1 extends GT_MetaTileEntity_FusionC } 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", "2048EU/t and 10mio EU Cap per Energy Hatch"}; + return new String[]{ + "It's over 9000!!!", + "LuV Machine Casings around Superconducting Coil Blocks", + "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 diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer2.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer2.java index ea44772d77..c091d637bc 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer2.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer2.java @@ -48,7 +48,14 @@ public class GT_MetaTileEntity_FusionComputer2 extends GT_MetaTileEntity_FusionC } 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", "4096EU/t and 20mio EU Cap per Energy Hatch"}; + return new String[]{ + "It's over 9000!!!", + "Fusion Machine Casings around Fusion Coil Blocks", + "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 diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer3.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer3.java index 870ac54846..bc50b5ee5f 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer3.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer3.java @@ -48,7 +48,14 @@ public class GT_MetaTileEntity_FusionComputer3 extends GT_MetaTileEntity_FusionC } 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", "8192EU/t and 40mio EU Cap per Energy Hatch"}; + return new String[]{ + "A SUN DOWN ON EARTH", + "Fusion Machine Casings MK II around Fusion Coil Blocks", + "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 diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_HeatExchanger.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_HeatExchanger.java index 30a98f096b..8bf054d8d7 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_HeatExchanger.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_HeatExchanger.java @@ -39,10 +39,10 @@ public class GT_MetaTileEntity_HeatExchanger extends GT_MetaTileEntity_MultiBloc return new String[]{ "Controller Block for the Heat Exchanger", "Size(WxHxD): 3x4x3, Controller (Front middle at bottom)", - "3x3x4 of Stable Titanium Casing (hollow, Min 24!)", - "2 Titanium Pipe Casing Blocks (Inside the Hollow Casing)", + "3x3x4 of Stable Titanium Machine Casings (hollow, Min 24!)", + "2x Titanium Pipe Casing (Inside the Hollow Machine Casings)", "1x Distillated Water Input (Any casing)", - "min 1 Steam Output (Any casing)", + "1x Steam Output (Any casing)", "1x Hot Fluid Input (Bottom center)", "1x Cold Fluid Output (Top Center)", "1x Maintenance Hatch (Any casing)"}; diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ImplosionCompressor.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ImplosionCompressor.java index 81e9485ecf..118a04091a 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ImplosionCompressor.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ImplosionCompressor.java @@ -41,7 +41,7 @@ public class GT_MetaTileEntity_ImplosionCompressor "1x Maintenance Hatch (Any casing)", "1x Muffler Hatch (Any casing)", "1x Energy Hatch (Any casing)", - "Solid Steel Casings for the rest (16 at least!)", + "Solid Steel Machine Casings for the rest (16 at least!)", "Causes " + 20 * getPollutionPerTick(null) + " Pollution per second"}; } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java index 04922c0a03..ed7100f30a 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java @@ -41,12 +41,12 @@ public abstract class GT_MetaTileEntity_LargeBoiler "Produces " + (getEUt() * 40) * (runtimeBoost(20) / 20f) + "L of Steam with 1 Coal at " + getEUt() * 40 + "L/s", "A programmed circuit in the main block throttles the boiler (-1000L/s per config)", "Size(WxHxD): 3x5x3, Controller (Front middle in Fireboxes)", - "3x1x3 of Fire Boxes (Bottom layer, Min 3)", - "3x4x3 of Casings (Above Fireboxes, hollow, Min 24!)", - "3 Pipe Casing Blocks (Inside the Hollow Casing)", - "1x Input Fuel Hatch/Bus (Any Firebox)", - "1x Input Water Hatch (Any Firebox)", - "1x Output Hatch (Any Casing)", + "3x1x3 of Firebox Casings (Bottom layer, Min 3)", + "3x4x3 of Machine Casings/Plated Bricks (Above Fireboxes, hollow, Min 24!)", + "1x3x1 of Pipe Casings (Inside the Hollow Machine Casings/Plated Bricks)", + "1x Fuel Input Hatch/Bus (Any Firebox)", + "1x Water Input Hatch (Any Firebox)", + "1x Steam Output Hatch (Any Casing)", "1x Maintenance Hatch (Any Firebox)", "1x Muffler Hatch (Any Firebox)", "Diesel fuels have 1/4 efficiency", diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java index db3841b394..3262d4eee7 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java @@ -42,15 +42,15 @@ public class GT_MetaTileEntity_LargeChemicalReactor extends GT_MetaTileEntity_Mu "Has the same recipes as the Chemical Reactor", "Does not lose efficiency when overclocked", "Accepts fluids instead of fluid cells", - "Size(WxHxD): 3x2x3", - "Controller (Lower front centered)", - "1x Any Heating Coil (Bottom centered)", - "1x PTFE Pipe Casing (Top centered)", - "1x Input Bus/Hatch (Any edge casing)", - "1x Output Bus/Hatch (Any edge casing)", - "1x Maintenance Hatch (Any edge casing)", - "1x Energy Hatch (Any edge casing)", - "Chemically Inert Casings for the rest (8 at least!)" }; + "Size(WxHxD): 3x3x3", + "3x3x3 of Chemically Inert Machine Casings (hollow, min 24!)", + "Controller (Front centered)", + "1x Cupronickel Coil Block (Bottom centered)", + "1x PTFE Pipe Machine Casing (inside the hollow casings)", + "1x Input Bus/Hatch (Any inert casing)", + "1x Output Bus/Hatch (Any inert casing)", + "1x Maintenance Hatch (Any inert casing)", + "1x Energy Hatch (Any inert casing)"}; } @Override @@ -72,63 +72,66 @@ public class GT_MetaTileEntity_LargeChemicalReactor extends GT_MetaTileEntity_Mu @Override public boolean checkRecipe(ItemStack aStack) { - ArrayList tInputList = getStoredInputs(); - int tInputList_sS=tInputList.size(); - for (int i = 0; i < tInputList_sS - 1; i++) { - for (int j = i + 1; j < tInputList_sS; j++) { - if (GT_Utility.areStacksEqual((ItemStack) tInputList.get(i), (ItemStack) tInputList.get(j))) { - if (((ItemStack) tInputList.get(i)).stackSize >= ((ItemStack) tInputList.get(j)).stackSize) { - tInputList.remove(j--); tInputList_sS=tInputList.size(); - } else { - tInputList.remove(i--); tInputList_sS=tInputList.size(); - break; - } - } - } - } - ItemStack[] inputs = tInputList.toArray(new ItemStack[tInputList.size()]); - - ArrayList tFluidList = getStoredFluids(); - int tFluidList_sS = tFluidList.size(); - for (int i = 0; i < tFluidList_sS - 1; i++) { - for (int j = i + 1; j < tFluidList_sS; j++) { - if (GT_Utility.areFluidsEqual(tFluidList.get(i), tFluidList.get(j))) { - if (tFluidList.get(i).amount >= tFluidList.get(j).amount) { - tFluidList.remove(j--); - tFluidList_sS = tFluidList.size(); - } else { - tFluidList.remove(i--); - tFluidList_sS = tFluidList.size(); - break; - } - } - } - } - FluidStack[] fluids = tFluidList.toArray(new FluidStack[tFluidList.size()]); - - if (inputs.length > 0 || fluids.length > 0) { - long voltage = getMaxInputVoltage(); - byte tier = (byte) Math.max(1, GT_Utility.getTier(voltage)); - GT_Recipe recipe = GT_Recipe.GT_Recipe_Map.sMultiblockChemicalRecipes.findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tier], fluids, inputs); - if (recipe != null && recipe.isRecipeInputEqual(true, fluids, inputs)) { - this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); - this.mEfficiencyIncrease = 10000; - - int EUt = recipe.mEUt; - int maxProgresstime = recipe.mDuration; - - while (EUt <= gregtech.api.enums.GT_Values.V[tier - 1] && maxProgresstime > 1) { - EUt *= 4; - maxProgresstime /= 4; - } - - this.mEUt = -EUt; - this.mMaxProgresstime = maxProgresstime; - this.mOutputItems = recipe.mOutputs; - this.mOutputFluids = recipe.mFluidOutputs; - return true; - } - } + ArrayList tInputList = getStoredInputs(); + int tInputList_sS = tInputList.size(); + for (int i = 0; i < tInputList_sS - 1; i++) { + for (int j = i + 1; j < tInputList_sS; j++) { + if (GT_Utility.areStacksEqual((ItemStack) tInputList.get(i), (ItemStack) tInputList.get(j))) { + if (((ItemStack) tInputList.get(i)).stackSize >= ((ItemStack) tInputList.get(j)).stackSize) { + tInputList.remove(j--); + tInputList_sS = tInputList.size(); + } else { + tInputList.remove(i--); + tInputList_sS = tInputList.size(); + break; + } + } + } + } + ItemStack[] inputs = tInputList.toArray(new ItemStack[tInputList.size()]); + + ArrayList tFluidList = getStoredFluids(); + int tFluidList_sS = tFluidList.size(); + for (int i = 0; i < tFluidList_sS - 1; i++) { + for (int j = i + 1; j < tFluidList_sS; j++) { + if (GT_Utility.areFluidsEqual(tFluidList.get(i), tFluidList.get(j))) { + if (tFluidList.get(i).amount >= tFluidList.get(j).amount) { + tFluidList.remove(j--); + tFluidList_sS = tFluidList.size(); + } else { + tFluidList.remove(i--); + tFluidList_sS = tFluidList.size(); + break; + } + } + } + } + FluidStack[] fluids = tFluidList.toArray(new FluidStack[tFluidList.size()]); + + if (inputs.length > 0 || fluids.length > 0) { + long voltage = getMaxInputVoltage(); + byte tier = (byte) Math.max(1, GT_Utility.getTier(voltage)); + GT_Recipe recipe = GT_Recipe.GT_Recipe_Map.sMultiblockChemicalRecipes.findRecipe(getBaseMetaTileEntity(), false, + gregtech.api.enums.GT_Values.V[tier], fluids, inputs); + if (recipe != null && recipe.isRecipeInputEqual(true, fluids, inputs)) { + this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); + this.mEfficiencyIncrease = 10000; + + int EUt = recipe.mEUt; + int maxProgresstime = recipe.mDuration; + + while (EUt <= gregtech.api.enums.GT_Values.V[tier - 1] && maxProgresstime > 1) { + EUt *= 4; + maxProgresstime /= 4; + } + + this.mEUt = -EUt; + this.mMaxProgresstime = maxProgresstime; + this.mOutputItems = recipe.mOutputs; + this.mOutputFluids = recipe.mFluidOutputs; + return true; + } + } return false; } @@ -140,14 +143,14 @@ public class GT_MetaTileEntity_LargeChemicalReactor extends GT_MetaTileEntity_Mu // x=width, z=depth, y=height for (int x = -1 + xDir; x <= xDir + 1; x++) { for (int z = -1 + zDir; z <= zDir + 1; z++) { - for (int y = 0; y <= 1; y++) { + for (int y = -1; y <= 1; y++) { IGregTechTileEntity tileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(x, y, z); Block block = aBaseMetaTileEntity.getBlockOffset(x, y, z); - if (x == xDir && z == zDir) { - if (y == 0 && block != GregTech_API.sBlockCasings5) { + if (x == xDir && z == zDir && y <= 0) { + if ((y == -1) + && (block != GregTech_API.sBlockCasings5 || aBaseMetaTileEntity.getMetaIDOffset(x, y, z) != 0)) { return false; - } else if (y == 1 - && (block != GregTech_API.sBlockCasings4 || aBaseMetaTileEntity.getMetaIDOffset(x, y, z) != 15)) { + } else if (y == 0 && (block != GregTech_API.sBlockCasings4 || aBaseMetaTileEntity.getMetaIDOffset(x, y, z) != 15)) { return false; } } else if (x != 0 || y != 0 || z != 0) { diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java index 8e98444472..14dec4e8e2 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java @@ -36,7 +36,7 @@ public class GT_MetaTileEntity_LargeTurbine_Gas extends GT_MetaTileEntity_LargeT return new String[]{ "Controller Block for the Large Gas Turbine", "Size(WxHxD): 3x3x4 (Hollow), Controller (Front centered)", - "1x Input Hatch (Side centered)", + "1x Gas Input Hatch (Side centered)", "1x Maintenance Hatch (Side centered)", "1x Muffler Hatch (Side centered)", "1x Dynamo Hatch (Back centered)", diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_HPSteam.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_HPSteam.java index a4f144139f..f21c0533c3 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_HPSteam.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_HPSteam.java @@ -35,7 +35,7 @@ public class GT_MetaTileEntity_LargeTurbine_HPSteam extends GT_MetaTileEntity_La return new String[]{ "Controller Block for the Large High Pressure Steam Turbine", "Size(WxHxD): 3x3x4 (Hollow), Controller (Front centered)", - "1x Input Hatch (Side centered)", + "1x Superheated Steam Input Hatch (Side centered)", "1x Maintenance Hatch (Side centered)", "1x Dynamo Hatch (Back centered)", "Titanium Turbine Casings for the rest (24 at least!)", diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java index b3af446944..48ac31ade6 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java @@ -38,7 +38,7 @@ public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_Lar return new String[]{ "Controller Block for the Large Plasma Generator", "Size(WxHxD): 3x3x4 (Hollow), Controller (Front centered)", - "1x Input Hatch (Side centered)", + "1x Plasma Input Hatch (Side centered)", "1x Maintenance Hatch (Side centered)", "1x Dynamo Hatch (Back centered)", "Tungstensteel Turbine Casings for the rest (24 at least!)", diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java index 32577368e2..699814469d 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java @@ -37,7 +37,7 @@ public class GT_MetaTileEntity_LargeTurbine_Steam extends GT_MetaTileEntity_Larg return new String[]{ "Controller Block for the Large Steam Turbine", "Size(WxHxD): 3x3x4 (Hollow), Controller (Front centered)", - "1x Input Hatch (Side centered)", + "1x Steam Input Hatch (Side centered)", "1x Maintenance Hatch (Side centered)", "1x Dynamo Hatch (Back centered)", "Turbine Casings for the rest (24 at least!)", diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilCracker.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilCracker.java index 4aef1285df..0a4168c7ce 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilCracker.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilCracker.java @@ -43,7 +43,7 @@ public class GT_MetaTileEntity_OilCracker extends GT_MetaTileEntity_MultiBlockBa "1x Output Hatch (Any right side casing)", "1x Maintenance Hatch (Any middle ring casing)", "1x Energy Hatch (Any middle ring casing)", - "Clean Stainless Steel Casings for the rest (18 at least!)", + "Clean Stainless Steel Machine Casings for the rest (18 at least!)", "Optional Steam(50% less EU/t) or Hydrogen(30% more output)"}; } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrill.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrill.java index 60863e4c52..ec901e0dfc 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrill.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrill.java @@ -34,8 +34,8 @@ public class GT_MetaTileEntity_OilDrill extends GT_MetaTileEntity_MultiBlockBase return new String[]{ "Controller Block for the Oil Drilling Rig", "Size(WxHxD): 3x7x3", "Controller (Front middle at bottom)", - "3x1x3 Base of Solid Steel Casings", - "1x3x1 Solid Steel Casing pillar (Center of base)", + "3x1x3 Base of Solid Steel Machine Casings", + "1x3x1 Solid Steel Machine Casing pillar (Center of base)", "1x3x1 Steel Frame Boxes (Each Steel pillar side and on top)", "1x Output Hatch (One of base casings)", "1x Maintenance Hatch (One of base casings)", diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java index db8462f76b..318d700195 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java @@ -47,8 +47,8 @@ public class GT_MetaTileEntity_ProcessingArray extends GT_MetaTileEntity_MultiBl "1x Output Hatch/Bus (Any casing)", "1x Maintenance Hatch (Any casing)", "1x Energy Hatch (Any casing)", - "Robust Tungstensteel Casings for the rest (16 at least!)", - "Place up to 16 Single Block GT Machines into the GUI Inventory"}; + "Robust Tungstensteel Machine Casings for the rest (16 at least!)", + "Place up to 16 Single Block GT Machines into the Controller Inventory"}; } public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java index 00ce54c9f6..02b7ed427a 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java @@ -32,8 +32,7 @@ public class GT_MetaTileEntity_PyrolyseOven extends GT_MetaTileEntity_MultiBlock "Controller Block for the Pyrolyse Oven", "Industrial Charcoal producer and Oil from Plants", "Size(WxHxD): 5x4x5, Controller (Bottom center)", - "3x1x3 Kanthal Heating Coils (Inside bottom 5x1x5 layer)", - "9x Kanthal Heating Coils (Centered 3x1x3 area in Bottom layer)", + "3x1x3 of Kanthal Coil Blocks (At the center of the bottom layer)", "1x Input Hatch/Bus (Centered 3x1x3 area in Top layer)", "1x Output Hatch/Bus (Any bottom layer casing)", "1x Maintenance Hatch (Any bottom layer casing)", diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_VacuumFreezer.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_VacuumFreezer.java index e6b3992a9c..d21503ef89 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_VacuumFreezer.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_VacuumFreezer.java @@ -39,7 +39,7 @@ public class GT_MetaTileEntity_VacuumFreezer "1x Output Bus (Any casing)", "1x Maintenance Hatch (Any casing)", "1x Energy Hatch (Any casing)", - "Frost Proof Casings for the rest (16 at least!)"}; + "Frost Proof Machine Casings for the rest (16 at least!)"}; } public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { -- cgit From 38bfbabd58f1fd64a472c108fa6591437f1f4eb9 Mon Sep 17 00:00:00 2001 From: Johannes Gäßler Date: Tue, 30 May 2017 10:21:46 +0200 Subject: Fixed a bug where the LCM could have a mMaxProgressTime of zero. --- .../GT_MetaTileEntity_LargeChemicalReactor.java | 391 +++++++++++---------- 1 file changed, 196 insertions(+), 195 deletions(-) (limited to 'src/main/java/gregtech/common/tileentities') diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java index 3262d4eee7..aeff099248 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java @@ -1,195 +1,196 @@ -package gregtech.common.tileentities.machines.multi; - -import java.util.ArrayList; -import java.util.Arrays; - -import gregtech.api.GregTech_API; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_Log; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_Utility; -import net.minecraft.block.Block; -import net.minecraft.item.ItemStack; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.FluidStack; - -public class GT_MetaTileEntity_LargeChemicalReactor extends GT_MetaTileEntity_MultiBlockBase { - - private static final int CASING_INDEX = 62; - - public GT_MetaTileEntity_LargeChemicalReactor(int aID, String aName, String aNameRegional) { - super(aID, aName, aNameRegional); - } - - public GT_MetaTileEntity_LargeChemicalReactor(String aName) { - super(aName); - } - - @Override - public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_LargeChemicalReactor(this.mName); - } - - @Override - public String[] getDescription() { - return new String[] { - "Controller block for the Large Chemical Reactor", - "Has the same recipes as the Chemical Reactor", - "Does not lose efficiency when overclocked", - "Accepts fluids instead of fluid cells", - "Size(WxHxD): 3x3x3", - "3x3x3 of Chemically Inert Machine Casings (hollow, min 24!)", - "Controller (Front centered)", - "1x Cupronickel Coil Block (Bottom centered)", - "1x PTFE Pipe Machine Casing (inside the hollow casings)", - "1x Input Bus/Hatch (Any inert casing)", - "1x Output Bus/Hatch (Any inert casing)", - "1x Maintenance Hatch (Any inert casing)", - "1x Energy Hatch (Any inert casing)"}; - } - - @Override - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, - boolean aRedstone) { - if (aSide == aFacing) { - return new ITexture[] { - Textures.BlockIcons.CASING_BLOCKS[CASING_INDEX], - new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR_ACTIVE - : Textures.BlockIcons.OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR) }; - } - return new ITexture[] { Textures.BlockIcons.CASING_BLOCKS[CASING_INDEX] }; - } - - @Override - public boolean isCorrectMachinePart(ItemStack aStack) { - return true; - } - - @Override - public boolean checkRecipe(ItemStack aStack) { - ArrayList tInputList = getStoredInputs(); - int tInputList_sS = tInputList.size(); - for (int i = 0; i < tInputList_sS - 1; i++) { - for (int j = i + 1; j < tInputList_sS; j++) { - if (GT_Utility.areStacksEqual((ItemStack) tInputList.get(i), (ItemStack) tInputList.get(j))) { - if (((ItemStack) tInputList.get(i)).stackSize >= ((ItemStack) tInputList.get(j)).stackSize) { - tInputList.remove(j--); - tInputList_sS = tInputList.size(); - } else { - tInputList.remove(i--); - tInputList_sS = tInputList.size(); - break; - } - } - } - } - ItemStack[] inputs = tInputList.toArray(new ItemStack[tInputList.size()]); - - ArrayList tFluidList = getStoredFluids(); - int tFluidList_sS = tFluidList.size(); - for (int i = 0; i < tFluidList_sS - 1; i++) { - for (int j = i + 1; j < tFluidList_sS; j++) { - if (GT_Utility.areFluidsEqual(tFluidList.get(i), tFluidList.get(j))) { - if (tFluidList.get(i).amount >= tFluidList.get(j).amount) { - tFluidList.remove(j--); - tFluidList_sS = tFluidList.size(); - } else { - tFluidList.remove(i--); - tFluidList_sS = tFluidList.size(); - break; - } - } - } - } - FluidStack[] fluids = tFluidList.toArray(new FluidStack[tFluidList.size()]); - - if (inputs.length > 0 || fluids.length > 0) { - long voltage = getMaxInputVoltage(); - byte tier = (byte) Math.max(1, GT_Utility.getTier(voltage)); - GT_Recipe recipe = GT_Recipe.GT_Recipe_Map.sMultiblockChemicalRecipes.findRecipe(getBaseMetaTileEntity(), false, - gregtech.api.enums.GT_Values.V[tier], fluids, inputs); - if (recipe != null && recipe.isRecipeInputEqual(true, fluids, inputs)) { - this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); - this.mEfficiencyIncrease = 10000; - - int EUt = recipe.mEUt; - int maxProgresstime = recipe.mDuration; - - while (EUt <= gregtech.api.enums.GT_Values.V[tier - 1] && maxProgresstime > 1) { - EUt *= 4; - maxProgresstime /= 4; - } - - this.mEUt = -EUt; - this.mMaxProgresstime = maxProgresstime; - this.mOutputItems = recipe.mOutputs; - this.mOutputFluids = recipe.mFluidOutputs; - return true; - } - } - return false; - } - - @Override - public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { - int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX; - int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ; - int casingAmount = 0; - // x=width, z=depth, y=height - for (int x = -1 + xDir; x <= xDir + 1; x++) { - for (int z = -1 + zDir; z <= zDir + 1; z++) { - for (int y = -1; y <= 1; y++) { - IGregTechTileEntity tileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(x, y, z); - Block block = aBaseMetaTileEntity.getBlockOffset(x, y, z); - if (x == xDir && z == zDir && y <= 0) { - if ((y == -1) - && (block != GregTech_API.sBlockCasings5 || aBaseMetaTileEntity.getMetaIDOffset(x, y, z) != 0)) { - return false; - } else if (y == 0 && (block != GregTech_API.sBlockCasings4 || aBaseMetaTileEntity.getMetaIDOffset(x, y, z) != 15)) { - return false; - } - } else if (x != 0 || y != 0 || z != 0) { - if (!addInputToMachineList(tileEntity, CASING_INDEX) && !addOutputToMachineList(tileEntity, CASING_INDEX) - && !addMaintenanceToMachineList(tileEntity, CASING_INDEX) - && !addEnergyInputToMachineList(tileEntity, CASING_INDEX)) { - if (block == GregTech_API.sBlockCasings4 && aBaseMetaTileEntity.getMetaIDOffset(x, y, z) == 14) { - casingAmount++; - } else { - return false; - } - } - } - - } - } - - } - return casingAmount >= 8; - } - - @Override - public int getMaxEfficiency(ItemStack aStack) { - return 10000; - } - - @Override - public int getPollutionPerTick(ItemStack aStack) { - return 0; - } - - @Override - public int getDamageToComponent(ItemStack aStack) { - return 0; - } - - @Override - public boolean explodesOnComponentBreak(ItemStack aStack) { - return false; - } - -} +package gregtech.common.tileentities.machines.multi; + +import java.util.ArrayList; +import java.util.Arrays; + +import gregtech.api.GregTech_API; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Log; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; +import net.minecraft.block.Block; +import net.minecraft.item.ItemStack; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.FluidStack; + +public class GT_MetaTileEntity_LargeChemicalReactor extends GT_MetaTileEntity_MultiBlockBase { + + private static final int CASING_INDEX = 62; + + public GT_MetaTileEntity_LargeChemicalReactor(int aID, String aName, String aNameRegional) { + super(aID, aName, aNameRegional); + } + + public GT_MetaTileEntity_LargeChemicalReactor(String aName) { + super(aName); + } + + @Override + public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_LargeChemicalReactor(this.mName); + } + + @Override + public String[] getDescription() { + return new String[] { + "Controller block for the Large Chemical Reactor", + "Has the sa