From bb68a5f74b1759f250cd68c76cb1c0f03599000d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20G=C3=A4=C3=9Fler?= Date: Mon, 10 Jul 2017 22:36:11 +0200 Subject: [PATCH 01/14] Made it so that multiblocks will look for empty output hatches. Previously when there was more than one fluid output multiblocks would only try to put it into one of the output hatches. --- .../GT_MetaTileEntity_MultiBlockBase.java | 27 ++++++++++--------- 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java index a02a5568..6c0f8f5a 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java @@ -263,13 +263,8 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { } addOutput(tStack); } - if (mOutputFluids != null && mOutputFluids.length == 1) { - for (FluidStack tStack : mOutputFluids) - if (tStack != null) { - addOutput(tStack); - } - } else if (mOutputFluids != null && mOutputFluids.length > 1) { - addFluidOutputs(mOutputFluids); + if (mOutputFluids != null) { + addFluidOutputs(mOutputFluids); } mEfficiency = Math.max(0, Math.min(mEfficiency + mEfficiencyIncrease, getMaxEfficiency(mInventory[1]) - ((getIdealStatus() - getRepairStatus()) * 1000))); mOutputItems = null; @@ -554,12 +549,20 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { } protected 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); - } + for (FluidStack outputFluidStack : mOutputFluids2) { + if (outputFluidStack != null) { + FluidStack copiedStack = outputFluidStack.copy(); + for (GT_MetaTileEntity_Hatch_Output outputhatch : mOutputHatches) { + if (copiedStack.amount <= 0) { + break; + } + if (!isValidMetaTileEntity(outputhatch)) { + continue; + } + copiedStack.amount -= outputhatch.fill(copiedStack, true); + } + } } - } public boolean depleteInput(FluidStack aLiquid) { From 96d56e97da8c06dc5ec0f5d75c87a2db8fba6b86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20G=C3=A4=C3=9Fler?= Date: Tue, 11 Jul 2017 17:14:00 +0200 Subject: [PATCH 02/14] Added an option to findRecipe() to only return recipes with enough input --- .../java/gregtech/api/util/GT_Recipe.java | 22 ++++++++++++++----- ...T_MetaTileEntity_LargeChemicalReactor.java | 2 +- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/src/main/java/gregtech/api/util/GT_Recipe.java b/src/main/java/gregtech/api/util/GT_Recipe.java index b60b8250..996a1066 100644 --- a/src/main/java/gregtech/api/util/GT_Recipe.java +++ b/src/main/java/gregtech/api/util/GT_Recipe.java @@ -730,23 +730,35 @@ public class GT_Recipe implements Comparable { return findRecipe(aTileEntity, null, aNotUnificated, aVoltage, aFluids, null, aInputs); } + public GT_Recipe findRecipe(IHasWorldObjectAndCoords aTileEntity, boolean aNotUnificated, boolean aDontCheckStackSizes, long aVoltage, FluidStack[] aFluids, ItemStack... aInputs) { + return findRecipe(aTileEntity, null, aNotUnificated, aDontCheckStackSizes, aVoltage, aFluids, null, aInputs); + } + public GT_Recipe findRecipe(IHasWorldObjectAndCoords aTileEntity, GT_Recipe aRecipe, boolean aNotUnificated, long aVoltage, FluidStack[] aFluids, ItemStack... aInputs) { return findRecipe(aTileEntity, aRecipe, aNotUnificated, aVoltage, aFluids, null, aInputs); } + public GT_Recipe findRecipe(IHasWorldObjectAndCoords aTileEntity, GT_Recipe aRecipe, boolean aNotUnificated, boolean aDontCheckStackSizes, long aVoltage, FluidStack[] aFluids, ItemStack... aInputs) { + return findRecipe(aTileEntity, aRecipe, aNotUnificated, aDontCheckStackSizes, aVoltage, aFluids, null, aInputs); + } + + public GT_Recipe findRecipe(IHasWorldObjectAndCoords aTileEntity, GT_Recipe aRecipe, boolean aNotUnificated, long aVoltage, FluidStack[] aFluids, ItemStack aSpecialSlot, ItemStack... aInputs) { + return findRecipe(aTileEntity, aRecipe, aNotUnificated, true, aVoltage, aFluids, aSpecialSlot, aInputs); + } /** * finds a Recipe matching the aFluid and ItemStack Inputs. * * @param aTileEntity an Object representing the current coordinates of the executing Block/Entity/Whatever. This may be null, especially during Startup. * @param aRecipe in case this is != null it will try to use this Recipe first when looking things up. * @param aNotUnificated if this is T the Recipe searcher will unificate the ItemStack Inputs + * @param aDontCheckStackSizes if set to false will only return recipes that can be executed at least once with the provided input * @param aVoltage Voltage of the Machine or Long.MAX_VALUE if it has no Voltage * @param aFluids the Fluid Inputs * @param aSpecialSlot the content of the Special Slot, the regular Manager doesn't do anything with this, but some custom ones do. * @param aInputs the Item Inputs * @return the Recipe it has found or null for no matching Recipe */ - public GT_Recipe findRecipe(IHasWorldObjectAndCoords aTileEntity, GT_Recipe aRecipe, boolean aNotUnificated, long aVoltage, FluidStack[] aFluids, ItemStack aSpecialSlot, ItemStack... aInputs) { + public GT_Recipe findRecipe(IHasWorldObjectAndCoords aTileEntity, GT_Recipe aRecipe, boolean aNotUnificated, boolean aDontCheckStackSizes, long aVoltage, FluidStack[] aFluids, ItemStack aSpecialSlot, ItemStack... aInputs) { // No Recipes? Well, nothing to be found then. if (mRecipeList.isEmpty()) return null; @@ -772,7 +784,7 @@ public class GT_Recipe implements Comparable { // Check the Recipe which has been used last time in order to not have to search for it again, if possible. if (aRecipe != null) - if (!aRecipe.mFakeRecipe && aRecipe.mCanBeBuffered && aRecipe.isRecipeInputEqual(false, true, aFluids, aInputs)) + if (!aRecipe.mFakeRecipe && aRecipe.mCanBeBuffered && aRecipe.isRecipeInputEqual(false, aDontCheckStackSizes, aFluids, aInputs)) return aRecipe.mEnabled && aVoltage * mAmperage >= aRecipe.mEUt ? aRecipe : null; // Now look for the Recipes inside the Item HashMaps, but only when the Recipes usually have Items. @@ -781,11 +793,11 @@ public class GT_Recipe implements Comparable { Collection tRecipes = mRecipeItemMap.get(new GT_ItemStack(tStack)); if (tRecipes != null) for (GT_Recipe tRecipe : tRecipes) - if (!tRecipe.mFakeRecipe && tRecipe.isRecipeInputEqual(false, true, aFluids, aInputs)) + if (!tRecipe.mFakeRecipe && tRecipe.isRecipeInputEqual(false, aDontCheckStackSizes, aFluids, aInputs)) return tRecipe.mEnabled && aVoltage * mAmperage >= tRecipe.mEUt ? tRecipe : null; tRecipes = mRecipeItemMap.get(new GT_ItemStack(GT_Utility.copyMetaData(W, tStack))); if (tRecipes != null) for (GT_Recipe tRecipe : tRecipes) - if (!tRecipe.mFakeRecipe && tRecipe.isRecipeInputEqual(false, true, aFluids, aInputs)) + if (!tRecipe.mFakeRecipe && tRecipe.isRecipeInputEqual(false, aDontCheckStackSizes, aFluids, aInputs)) return tRecipe.mEnabled && aVoltage * mAmperage >= tRecipe.mEUt ? tRecipe : null; } @@ -795,7 +807,7 @@ public class GT_Recipe implements Comparable { Collection tRecipes = mRecipeFluidMap.get(aFluid.getFluid()); if (tRecipes != null) for (GT_Recipe tRecipe : tRecipes) - if (!tRecipe.mFakeRecipe && tRecipe.isRecipeInputEqual(false, true, aFluids, aInputs)) + if (!tRecipe.mFakeRecipe && tRecipe.isRecipeInputEqual(false, aDontCheckStackSizes, aFluids, aInputs)) return tRecipe.mEnabled && aVoltage * mAmperage >= tRecipe.mEUt ? tRecipe : null; } 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 18cd5bd7..48791754 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 @@ -110,7 +110,7 @@ public class GT_MetaTileEntity_LargeChemicalReactor extends GT_MetaTileEntity_Mu 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); + 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; From 818c9a55a838467ced64ee9c4f860cea572cdcf0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20G=C3=A4=C3=9Fler?= Date: Sun, 16 Jul 2017 14:00:00 +0200 Subject: [PATCH 03/14] Fixed a bug where Brick, Clay, and Fireclay had the wrong texture sets. The above materials originally had the ROUGH texture. I tested what they would look like with the DULL texture and I forgot to revert it afterwards. --- src/main/java/gregtech/api/enums/Materials.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/gregtech/api/enums/Materials.java b/src/main/java/gregtech/api/enums/Materials.java index 43ef4378..ca7cb489 100644 --- a/src/main/java/gregtech/api/enums/Materials.java +++ b/src/main/java/gregtech/api/enums/Materials.java @@ -457,7 +457,7 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { public static Materials ChromiumDioxide = new Materials(361, TextureSet.SET_DULL, 11.0F, 256, 3, 1|2, 230, 200, 200, 0, "ChromiumDioxide", "Chromium Dioxide", 0, 0, 650, 650, false, false, 5, 3, 1, Dyes.dyePink , 1, Arrays.asList(new MaterialStack(Chrome, 1), new MaterialStack(Oxygen, 2)), Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.MACHINA, 1))); public static Materials Cinnabar = new Materials(826, TextureSet.SET_ROUGH, 1.0F, 0, 1, 1 |8 , 150, 0, 0, 0, "Cinnabar", "Cinnabar", 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeBrown, 2, Arrays.asList(new MaterialStack(Mercury, 1), new MaterialStack(Sulfur, 1))); public static Materials Water = new Materials(701, TextureSet.SET_FLUID, 1.0F, 0, 0, 16, 0, 0, 255, 0, "Water", "Water", 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeBlue, 0, Arrays.asList(new MaterialStack(Hydrogen, 2), new MaterialStack(Oxygen, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.AQUA, 2))); - public static Materials Clay = new Materials(805, TextureSet.SET_DULL, 1.0F, 0, 1, 1, 200, 200, 220, 0, "Clay", "Clay", 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeLightBlue, 1, Arrays.asList(new MaterialStack(Sodium, 2), new MaterialStack(Lithium, 1), new MaterialStack(Aluminium, 2), new MaterialStack(Silicon, 2), new MaterialStack(Water, 6))); + public static Materials Clay = new Materials(805, TextureSet.SET_ROUGH, 1.0F, 0, 1, 1, 200, 200, 220, 0, "Clay", "Clay", 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeLightBlue, 1, Arrays.asList(new MaterialStack(Sodium, 2), new MaterialStack(Lithium, 1), new MaterialStack(Aluminium, 2), new MaterialStack(Silicon, 2), new MaterialStack(Water, 6))); public static Materials Coal = new Materials(535, TextureSet.SET_ROUGH, 1.0F, 0, 1, 1|4|8, 70, 70, 70, 0, "Coal", "Coal", 0, 0, -1, 0, false, false, 2, 2, 1, Dyes.dyeBlack, 1, Arrays.asList(new MaterialStack(Carbon, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.POTENTIA, 2), new TC_AspectStack(TC_Aspects.IGNIS, 2))); public static Materials Cobaltite = new Materials(827, TextureSet.SET_METALLIC, 1.0F, 0, 1, 1 |8 , 80, 80, 250, 0, "Cobaltite", "Cobaltite", 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeBlue, 1, Arrays.asList(new MaterialStack(Cobalt, 1), new MaterialStack(Arsenic, 1), new MaterialStack(Sulfur, 1))); public static Materials Cooperite = new Materials(828, TextureSet.SET_METALLIC, 1.0F, 0, 1, 1 |8 , 255, 255, 200, 0, "Cooperite", "Sheldonite", 0, 0, -1, 0, false, false, 5, 1, 1, Dyes.dyeYellow, 2, Arrays.asList(new MaterialStack(Platinum, 3), new MaterialStack(Nickel, 1), new MaterialStack(Sulfur, 1), new MaterialStack(Palladium, 1))); @@ -538,8 +538,8 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { public static Materials HeavyFuel = new Materials(741, TextureSet.SET_FLUID, 1.0F, 0, 0, 16, 255, 255, 0, 0, "HeavyFuel", "Heavy Fuel", 3, 192, -1, 0, false, false, 1, 1, 1, Dyes.dyeBlack).setCanBeCracked(true); public static Materials LPG = new Materials(742, TextureSet.SET_FLUID, 1.0F, 0, 0, 16, 255, 255, 0, 0, "LPG", "LPG", 1, 256, -1, 0, false, false, 1, 1, 1, Dyes.dyeYellow); - public static Materials Brick = new MaterialBuilder(625, TextureSet.SET_DULL, "Brick").addDustItems().setRGB(155, 86, 67).setColor(Dyes.dyeBrown).setMaterialList(new MaterialStack(Aluminium, 4), new MaterialStack(Silicon, 3), new MaterialStack(Oxygen, 12)).constructMaterial(); - public static Materials Fireclay = new MaterialBuilder(626, TextureSet.SET_DULL, "Fireclay").addDustItems().setRGB(173, 160, 155).setColor(Dyes.dyeBrown).setMaterialList(new MaterialStack(Brick, 1)).constructMaterial(); + public static Materials Brick = new MaterialBuilder(625, TextureSet.SET_ROUGH, "Brick").addDustItems().setRGB(155, 86, 67).setColor(Dyes.dyeBrown).setMaterialList(new MaterialStack(Aluminium, 4), new MaterialStack(Silicon, 3), new MaterialStack(Oxygen, 12)).constructMaterial(); + public static Materials Fireclay = new MaterialBuilder(626, TextureSet.SET_ROUGH, "Fireclay").addDustItems().setRGB(173, 160, 155).setColor(Dyes.dyeBrown).setMaterialList(new MaterialStack(Brick, 1)).constructMaterial(); public static Materials BioDiesel = new MaterialBuilder(627, TextureSet.SET_FLUID, "Bio Diesel").addCell().addFluid().setRGB(255, 128, 0).setColor(Dyes.dyeOrange).setFuelType(MaterialBuilder.DIESEL).setFuelPower(192).constructMaterial(); public static Materials NitrationMixture = new MaterialBuilder(628, TextureSet.SET_FLUID, "Nitration Mixture").addCell().setRGB(230, 226, 171).setColor(Dyes.dyeBrown).constructMaterial(); public static Materials Glycerol = new MaterialBuilder(629, TextureSet.SET_FLUID, "Glycerol").addCell().addFluid().setRGB(135, 222, 135).setColor(Dyes.dyeLime).setFuelType(MaterialBuilder.SEMIFLUID).setFuelType(164).setMaterialList(new MaterialStack(Carbon, 3), new MaterialStack(Hydrogen, 8), new MaterialStack(Oxygen, 3)).addElectrolyzerRecipe().constructMaterial(); From 2ddf1d19ad5124c69d0f818d3e0dddb62d96c1b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20G=C3=A4=C3=9Fler?= Date: Mon, 17 Jul 2017 20:08:47 +0200 Subject: [PATCH 04/14] Added the Large Chemical Reactor Controller inventory to the item input --- .../machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java | 1 + 1 file changed, 1 insertion(+) 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 48791754..5852dda5 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 @@ -86,6 +86,7 @@ public class GT_MetaTileEntity_LargeChemicalReactor extends GT_MetaTileEntity_Mu } } } + tInputList.add(mInventory[1]); ItemStack[] inputs = tInputList.toArray(new ItemStack[tInputList.size()]); ArrayList tFluidList = getStoredFluids(); From 74529795fba38624af6038ae1e1ca2720e040dc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20G=C3=A4=C3=9Fler?= Date: Thu, 20 Jul 2017 09:22:18 +0200 Subject: [PATCH 05/14] Removed Burn Value for Carbon Dust. --- src/main/java/gregtech/common/GT_Proxy.java | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/main/java/gregtech/common/GT_Proxy.java b/src/main/java/gregtech/common/GT_Proxy.java index 2267441d..f7ff8385 100644 --- a/src/main/java/gregtech/common/GT_Proxy.java +++ b/src/main/java/gregtech/common/GT_Proxy.java @@ -1505,12 +1505,6 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { rFuelValue = Math.max(rFuelValue, 400); } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustTinyCoal")) { rFuelValue = Math.max(rFuelValue, 177); - } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustCarbon")) { - rFuelValue = Math.max(rFuelValue, 1600); - } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustSmallCarbon")) { - rFuelValue = Math.max(rFuelValue, 400); - } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustTinyCarbon")) { - rFuelValue = Math.max(rFuelValue, 177); } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "gemCharcoal")) { rFuelValue = Math.max(rFuelValue, 1600); } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "crushedCharcoal")) { From 8a2d88c157d3533576e328ce50ceb59abc9441b6 Mon Sep 17 00:00:00 2001 From: Antifluxfield Date: Sat, 22 Jul 2017 19:25:13 +0800 Subject: [PATCH 06/14] Fix imbalanced recipe --- .../gregtech/loaders/postload/GT_MachineRecipeLoader.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java index ea7781c7..e08f943d 100644 --- a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java +++ b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java @@ -2596,9 +2596,9 @@ if(Loader.isModLoaded("Railcraft")){ GT_Values.RA.addChemicalRecipe(Materials.Phosphor.getDust(4), GT_Values.NI, Materials.Oxygen.getGas(10000), GT_Values.NF, Materials.PhosphorousPentoxide.getDust(1), 40); GT_Values.RA.addChemicalRecipe(Materials.PhosphorousPentoxide.getDust(1), GT_Values.NI, Materials.Water.getFluid(6000), Materials.PhosphoricAcid.getFluid(4000), GT_Values.NI, 40); - GT_Values.RA.addChemicalRecipe(Materials.Propene.getCells(8), Materials.PhosphoricAcid.getCells(1), Materials.Benzene.getFluid(8000), Materials.Cumene.getFluid(16000), Materials.Empty.getCells(9), 1920); - GT_Values.RA.addChemicalRecipe(Materials.PhosphoricAcid.getCells(1),Materials.Benzene.getCells(8), Materials.Propene.getGas(8000), Materials.Cumene.getFluid(16000), Materials.Empty.getCells(9), 1920); - GT_Values.RA.addChemicalRecipe(Materials.Benzene.getCells(1), Materials.Propene.getCells(1), Materials.PhosphoricAcid.getFluid(125), Materials.Cumene.getFluid(2000), Materials.Empty.getCells(2), 240); + GT_Values.RA.addChemicalRecipe(Materials.Propene.getCells(8), Materials.PhosphoricAcid.getCells(1), Materials.Benzene.getFluid(8000), Materials.Cumene.getFluid(8000), Materials.Empty.getCells(9), 1920); + GT_Values.RA.addChemicalRecipe(Materials.PhosphoricAcid.getCells(1),Materials.Benzene.getCells(8), Materials.Propene.getGas(8000), Materials.Cumene.getFluid(8000), Materials.Empty.getCells(9), 1920); + GT_Values.RA.addChemicalRecipe(Materials.Benzene.getCells(1), Materials.Propene.getCells(1), Materials.PhosphoricAcid.getFluid(125), Materials.Cumene.getFluid(1000), Materials.Empty.getCells(2), 240); GT_Values.RA.addChemicalRecipe(Materials.Cumene.getCells(1), GT_Values.NI, Materials.Oxygen.getGas(1000), Materials.Acetone.getFluid(1000), Materials.Phenol.getCells(1), 160); GT_Values.RA.addChemicalRecipe(Materials.Oxygen.getCells(1), GT_Values.NI, Materials.Cumene.getFluid(1000),Materials.Phenol.getFluid(1000), Materials.Acetone.getCells(1), 160); From 19817f2a264d32b39f149d37214648848bd495e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20G=C3=A4=C3=9Fler?= Date: Sun, 23 Jul 2017 16:50:04 +0200 Subject: [PATCH 07/14] Fixed Salt processing recipes SaltWater now yields the same amount of material as Salt Dust. Increased the energy cost of electrolyzing Salt to make netto energy yield via NaOH+Hydrogen negative. --- src/main/java/gregtech/api/enums/Materials.java | 2 +- .../loaders/postload/GT_MachineRecipeLoader.java | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/main/java/gregtech/api/enums/Materials.java b/src/main/java/gregtech/api/enums/Materials.java index ca7cb489..c96d59c3 100644 --- a/src/main/java/gregtech/api/enums/Materials.java +++ b/src/main/java/gregtech/api/enums/Materials.java @@ -511,7 +511,7 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { public static Materials Rubber = new Materials(880, TextureSet.SET_SHINY, 1.5F, 32, 0, 1|2|64|128, 0, 0, 0, 0, "Rubber", "Rubber", 0, 0, 400, 0, false, false, 1, 1, 1, Dyes.dyeBlack, 0, Arrays.asList(new MaterialStack(Carbon, 5), new MaterialStack(Hydrogen, 8)), Arrays.asList(new TC_AspectStack(TC_Aspects.MOTUS, 2))); public static Materials RawRubber = new Materials(896, TextureSet.SET_DULL, 1.0F, 0, 0, 1, 204, 199, 137, 0, "RawRubber", "Raw Rubber", 0, 0, 400, 0, false, false, 1, 1, 1, Dyes.dyeWhite, 0, Arrays.asList(new MaterialStack(Carbon, 5), new MaterialStack(Hydrogen, 8)), Arrays.asList(new TC_AspectStack(TC_Aspects.MOTUS, 2))); public static Materials Ruby = new Materials(502, TextureSet.SET_RUBY, 7.0F, 256, 2, 1|4|8 |64, 255, 100, 100, 127, "Ruby", "Ruby", 0, 0, -1, 0, false, true, 5, 1, 1, Dyes.dyeRed, 1, Arrays.asList(new MaterialStack(Chrome, 1), new MaterialStack(Aluminium, 2), new MaterialStack(Oxygen, 3)), Arrays.asList(new TC_AspectStack(TC_Aspects.LUCRUM, 6), new TC_AspectStack(TC_Aspects.VITREUS, 4))); - public static Materials Salt = new Materials(817, TextureSet.SET_FINE, 1.0F, 0, 1, 1 |8 , 250, 250, 250, 0, "Salt", "Salt", 0, 0, -1, 0, false, false, 2, 1, 1, Dyes.dyeWhite, 1, Arrays.asList(new MaterialStack(Sodium, 1), new MaterialStack(Chlorine, 1))); + public static Materials Salt = new Materials(817, TextureSet.SET_FINE, 1.0F, 0, 1, 1 |8 , 250, 250, 250, 0, "Salt", "Salt", 0, 0, -1, 0, false, false, 2, 1, 1, Dyes.dyeWhite, 0, Arrays.asList(new MaterialStack(Sodium, 1), new MaterialStack(Chlorine, 1))); public static Materials Saltpeter = new Materials(836, TextureSet.SET_FINE, 1.0F, 0, 1, 1 |8 , 230, 230, 230, 0, "Saltpeter", "Saltpeter", 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeWhite, 1, Arrays.asList(new MaterialStack(Potassium, 1), new MaterialStack(Nitrogen, 1), new MaterialStack(Oxygen, 3))); public static Materials SaltWater = new MaterialBuilder(692, TextureSet.SET_FLUID, "Salt Water").addCell().addFluid().setRGB(0, 0, 200).setColor(Dyes.dyeBlue).constructMaterial(); public static Materials Sapphire = new Materials(503, TextureSet.SET_GEM_VERTICAL, 7.0F, 256, 2, 1|4|8 |64, 100, 100, 200, 127, "Sapphire", "Sapphire", 0, 0, -1, 0, false, true, 5, 1, 1, Dyes.dyeBlue, 1, Arrays.asList(new MaterialStack(Aluminium, 2), new MaterialStack(Oxygen, 3)), Arrays.asList(new TC_AspectStack(TC_Aspects.LUCRUM, 5), new TC_AspectStack(TC_Aspects.VITREUS, 3))); diff --git a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java index e08f943d..00c44fed 100644 --- a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java +++ b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java @@ -2488,13 +2488,14 @@ if(Loader.isModLoaded("Railcraft")){ * Instrumental materials are not mentioned here. */ private void addRecipesApril2017ChemistryUpdate(){ - GT_Values.RA.addElectrolyzerRecipe(Materials.Empty.getCells(1), GT_Values.NI, Materials.SaltWater.getFluid(1000), Materials.Chlorine.getGas(1000), Materials.SodiumHydroxide.getDust(1), Materials.Hydrogen.getCells(1), GT_Values.NI, GT_Values.NI,GT_Values.NI, GT_Values.NI, null, 30, 600); + GT_Values.RA.addElectrolyzerRecipe(Materials.Salt.getDust(2), GT_Values.NI, GT_Values.NF, Materials.Chlorine.getGas(1000), Materials.Sodium.getDust(1), GT_Values.NI, GT_Values.NI, GT_Values.NI,GT_Values.NI, GT_Values.NI, null, 720, 30); + GT_Values.RA.addElectrolyzerRecipe(Materials.Empty.getCells(1), GT_Values.NI, Materials.SaltWater.getFluid(1000), Materials.Chlorine.getGas(1000), Materials.SodiumHydroxide.getDust(1), Materials.Hydrogen.getCells(1), GT_Values.NI, GT_Values.NI,GT_Values.NI, GT_Values.NI, null, 720, 30); GT_Values.RA.addChemicalRecipe(Materials.Potassium.getDust(1), Materials.Oxygen.getCells(3), Materials.Nitrogen.getGas(1000), GT_Values.NF, Materials.Saltpeter.getDust(1), Materials.Empty.getCells(3), 180); GT_Values.RA.addChemicalRecipe(Materials.Potassium.getDust(1), Materials.Nitrogen.getCells(1), Materials.Oxygen.getGas(3000), GT_Values.NF, Materials.Saltpeter.getDust(1), Materials.Empty.getCells(1), 180); - GT_Values.RA.addMixerRecipe(Materials.Salt.getDust(1), GT_Values.NI, GT_Values.NI, GT_Values.NI, Materials.Water.getFluid(1000), Materials.SaltWater.getFluid(1000), GT_Values.NI, 40, 8); - GT_Values.RA.addDistilleryRecipe(1, Materials.SaltWater.getFluid(1000), GT_ModHandler.getDistilledWater(1000), Materials.Salt.getDust(1), 3200, 16, false); + GT_Values.RA.addMixerRecipe(Materials.Salt.getDust(2), GT_Values.NI, GT_Values.NI, GT_Values.NI, Materials.Water.getFluid(1000), Materials.SaltWater.getFluid(1000), GT_Values.NI, 40, 8); + GT_Values.RA.addDistilleryRecipe(1, Materials.SaltWater.getFluid(1000), GT_ModHandler.getDistilledWater(1000), Materials.Salt.getDust(2), 3200, 16, false); GT_Values.RA.addUniversalDistillationRecipe(FluidRegistry.getFluidStack("potion.vinegar", 40), new FluidStack[]{Materials.AceticAcid.getFluid(5), Materials.Water.getFluid(35)}, GT_Values.NI, 20, 64); GT_Values.RA.addMixerRecipe(Materials.Calcite.getDust(1), GT_Values.NI, GT_Values.NI, GT_Values.NI, Materials.AceticAcid.getFluid(2000), GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.dust,Materials.CalciumAcetate, 3), 240, 16); @@ -2596,9 +2597,9 @@ if(Loader.isModLoaded("Railcraft")){ GT_Values.RA.addChemicalRecipe(Materials.Phosphor.getDust(4), GT_Values.NI, Materials.Oxygen.getGas(10000), GT_Values.NF, Materials.PhosphorousPentoxide.getDust(1), 40); GT_Values.RA.addChemicalRecipe(Materials.PhosphorousPentoxide.getDust(1), GT_Values.NI, Materials.Water.getFluid(6000), Materials.PhosphoricAcid.getFluid(4000), GT_Values.NI, 40); - GT_Values.RA.addChemicalRecipe(Materials.Propene.getCells(8), Materials.PhosphoricAcid.getCells(1), Materials.Benzene.getFluid(8000), Materials.Cumene.getFluid(8000), Materials.Empty.getCells(9), 1920); - GT_Values.RA.addChemicalRecipe(Materials.PhosphoricAcid.getCells(1),Materials.Benzene.getCells(8), Materials.Propene.getGas(8000), Materials.Cumene.getFluid(8000), Materials.Empty.getCells(9), 1920); - GT_Values.RA.addChemicalRecipe(Materials.Benzene.getCells(1), Materials.Propene.getCells(1), Materials.PhosphoricAcid.getFluid(125), Materials.Cumene.getFluid(1000), Materials.Empty.getCells(2), 240); + GT_Values.RA.addChemicalRecipe(Materials.Propene.getCells(8), Materials.PhosphoricAcid.getCells(1), Materials.Benzene.getFluid(8000), Materials.Cumene.getFluid(16000), Materials.Empty.getCells(9), 1920); + GT_Values.RA.addChemicalRecipe(Materials.PhosphoricAcid.getCells(1),Materials.Benzene.getCells(8), Materials.Propene.getGas(8000), Materials.Cumene.getFluid(16000), Materials.Empty.getCells(9), 1920); + GT_Values.RA.addChemicalRecipe(Materials.Benzene.getCells(1), Materials.Propene.getCells(1), Materials.PhosphoricAcid.getFluid(125), Materials.Cumene.getFluid(2000), Materials.Empty.getCells(2), 240); GT_Values.RA.addChemicalRecipe(Materials.Cumene.getCells(1), GT_Values.NI, Materials.Oxygen.getGas(1000), Materials.Acetone.getFluid(1000), Materials.Phenol.getCells(1), 160); GT_Values.RA.addChemicalRecipe(Materials.Oxygen.getCells(1), GT_Values.NI, Materials.Cumene.getFluid(1000),Materials.Phenol.getFluid(1000), Materials.Acetone.getCells(1), 160); From 469e65014ee8125fb52ee5beb038ea407c8542ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20G=C3=A4=C3=9Fler?= Date: Sun, 23 Jul 2017 21:33:18 +0200 Subject: [PATCH 08/14] Fixed accidental change to the Cumene recipes due to not pulling --- .../gregtech/loaders/postload/GT_MachineRecipeLoader.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java index 00c44fed..ba98a93f 100644 --- a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java +++ b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java @@ -2597,9 +2597,9 @@ if(Loader.isModLoaded("Railcraft")){ GT_Values.RA.addChemicalRecipe(Materials.Phosphor.getDust(4), GT_Values.NI, Materials.Oxygen.getGas(10000), GT_Values.NF, Materials.PhosphorousPentoxide.getDust(1), 40); GT_Values.RA.addChemicalRecipe(Materials.PhosphorousPentoxide.getDust(1), GT_Values.NI, Materials.Water.getFluid(6000), Materials.PhosphoricAcid.getFluid(4000), GT_Values.NI, 40); - GT_Values.RA.addChemicalRecipe(Materials.Propene.getCells(8), Materials.PhosphoricAcid.getCells(1), Materials.Benzene.getFluid(8000), Materials.Cumene.getFluid(16000), Materials.Empty.getCells(9), 1920); - GT_Values.RA.addChemicalRecipe(Materials.PhosphoricAcid.getCells(1),Materials.Benzene.getCells(8), Materials.Propene.getGas(8000), Materials.Cumene.getFluid(16000), Materials.Empty.getCells(9), 1920); - GT_Values.RA.addChemicalRecipe(Materials.Benzene.getCells(1), Materials.Propene.getCells(1), Materials.PhosphoricAcid.getFluid(125), Materials.Cumene.getFluid(2000), Materials.Empty.getCells(2), 240); + GT_Values.RA.addChemicalRecipe(Materials.Propene.getCells(8), Materials.PhosphoricAcid.getCells(1), Materials.Benzene.getFluid(8000), Materials.Cumene.getFluid(8000), Materials.Empty.getCells(9), 1920); + GT_Values.RA.addChemicalRecipe(Materials.PhosphoricAcid.getCells(1), Materials.Benzene.getCells(8), Materials.Propene.getGas(8000), Materials.Cumene.getFluid(8000), Materials.Empty.getCells(9), 1920); + GT_Values.RA.addChemicalRecipe(Materials.Benzene.getCells(1), Materials.Propene.getCells(1), Materials.PhosphoricAcid.getFluid(125), Materials.Cumene.getFluid(1000), Materials.Empty.getCells(2), 240); GT_Values.RA.addChemicalRecipe(Materials.Cumene.getCells(1), GT_Values.NI, Materials.Oxygen.getGas(1000), Materials.Acetone.getFluid(1000), Materials.Phenol.getCells(1), 160); GT_Values.RA.addChemicalRecipe(Materials.Oxygen.getCells(1), GT_Values.NI, Materials.Cumene.getFluid(1000),Materials.Phenol.getFluid(1000), Materials.Acetone.getCells(1), 160); From 2e849a4ec81ac0294fed1a6879ee66f9f0b1683e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20G=C3=A4=C3=9Fler?= Date: Mon, 24 Jul 2017 23:57:34 +0200 Subject: [PATCH 09/14] Fixed a bug where a recipe had the wrong amount of Cells --- .../java/gregtech/loaders/postload/GT_MachineRecipeLoader.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java index ba98a93f..3bac017c 100644 --- a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java +++ b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java @@ -2669,7 +2669,7 @@ if(Loader.isModLoaded("Railcraft")){ GT_Values.RA.addChemicalRecipe(Materials.Sulfur.getDust(1), GT_Utility.getIntegratedCircuit(2), Materials.Oxygen.getGas(2000), Materials.SulfurDioxide.getGas(1000), GT_Values.NI, 60, 8); GT_Values.RA.addChemicalRecipe(Materials.HydricSulfide.getCells(1), GT_Values.NI, Materials.Oxygen.getGas(3000), Materials.SulfurDioxide.getGas(1000), Materials.Water.getCells(1), 120); - GT_Values.RA.addChemicalRecipe(Materials.Oxygen.getCells(3), GT_Values.NI, Materials.HydricSulfide.getGas(1000), Materials.Water.getFluid(1000), Materials.SulfurDioxide.getCells(1), 120); + GT_Values.RA.addChemicalRecipe(Materials.Oxygen.getCells(3), GT_Values.NI, Materials.HydricSulfide.getGas(1000), Materials.Water.getFluid(1000), Materials.SulfurDioxide.getCells(1), Materials.Empty.getCells(2), 120); GT_Values.RA.addChemicalRecipe(Materials.SulfurDioxide.getCells(1), GT_Values.NI, Materials.HydricSulfide.getGas(2000), Materials.Water.getFluid(2000), Materials.Sulfur.getDust(3), Materials.Empty.getCells(1), 120); GT_Values.RA.addChemicalRecipe(Materials.HydricSulfide.getCells(2), GT_Values.NI, Materials.SulfurDioxide.getGas(1000), Materials.Water.getFluid(2000), Materials.Sulfur.getDust(3), Materials.Empty.getCells(2), 120); From 9bd9d7d5e00ca7986cbc008e045c253aea7c7656 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20G=C3=A4=C3=9Fler?= Date: Fri, 4 Aug 2017 10:47:54 +0200 Subject: [PATCH 10/14] Fixed a bug with ghost Items left behind in the Large Chemical Reactor --- .../machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java | 1 + 1 file changed, 1 insertion(+) 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 5852dda5..393f5b81 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 @@ -132,6 +132,7 @@ public class GT_MetaTileEntity_LargeChemicalReactor extends GT_MetaTileEntity_Mu this.mMaxProgresstime = maxProgresstime; this.mOutputItems = recipe.mOutputs; this.mOutputFluids = recipe.mFluidOutputs; + this.updateSlots(); return true; } } From cbcb04d11717c2884d9565404997d123f3efd85e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20G=C3=A4=C3=9Fler?= Date: Sat, 5 Aug 2017 18:50:22 +0200 Subject: [PATCH 11/14] Output Hatches can now be locked to a specific fluid Currently not working as intended --- .../GT_MetaTileEntity_Hatch_Output.java | 43 ++++++++++++--- .../GT_MetaTileEntity_MultiBlockBase.java | 54 +++++++++++-------- 2 files changed, 68 insertions(+), 29 deletions(-) diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Output.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Output.java index 843cb319..9c0d157c 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Output.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Output.java @@ -11,10 +11,12 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.IFluidHandler; public class GT_MetaTileEntity_Hatch_Output extends GT_MetaTileEntity_Hatch { + private String lockedFluidName = null; public byte mMode = 0; public GT_MetaTileEntity_Hatch_Output(int aID, String aName, String aNameRegional, int aTier) { @@ -153,32 +155,47 @@ public class GT_MetaTileEntity_Hatch_Output extends GT_MetaTileEntity_Hatch { public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { if (!getBaseMetaTileEntity().getCoverBehaviorAtSide(aSide).isGUIClickable(aSide, getBaseMetaTileEntity().getCoverIDAtSide(aSide), getBaseMetaTileEntity().getCoverDataAtSide(aSide), getBaseMetaTileEntity())) return; - mMode = (byte) ((mMode + 1) % 8); + if (aPlayer.isSneaking()) { + mMode = (byte) ((mMode + 9) % 10); + } else { + mMode = (byte) ((mMode + 1) % 10); + } switch (mMode) { case 0: - GT_Utility.sendChatToPlayer(aPlayer, trans("108","Outputs Liquids, Steam and Items")); + GT_Utility.sendChatToPlayer(aPlayer, trans("108","Outputs misc. Fluids, Steam and Items")); break; case 1: GT_Utility.sendChatToPlayer(aPlayer, trans("109","Outputs Steam and Items")); break; case 2: - GT_Utility.sendChatToPlayer(aPlayer, trans("110","Outputs Steam and Liquids")); + GT_Utility.sendChatToPlayer(aPlayer, trans("110","Outputs Steam and misc. Fluids")); break; case 3: GT_Utility.sendChatToPlayer(aPlayer, trans("111","Outputs Steam")); break; case 4: - GT_Utility.sendChatToPlayer(aPlayer, trans("112","Outputs Liquids and Items")); + GT_Utility.sendChatToPlayer(aPlayer, trans("112","Outputs misc. Fluids and Items")); break; case 5: GT_Utility.sendChatToPlayer(aPlayer, trans("113","Outputs only Items")); break; case 6: - GT_Utility.sendChatToPlayer(aPlayer, trans("114","Outputs only Liquids")); + GT_Utility.sendChatToPlayer(aPlayer, trans("114","Outputs only misc. Fluids")); break; case 7: GT_Utility.sendChatToPlayer(aPlayer, trans("115","Outputs nothing")); break; + case 8: + this.setLockedFluidName(this.getDrainableStack().getUnlocalizedName()); + GT_Utility.sendChatToPlayer(aPlayer, trans("115.1", String.format("Outputs items and 1 specific Fluid (%s)", mFluid == null ? + trans("115.3","currently none, will be locked to the next that is put in"): + mFluid.getLocalizedName()))); + break; + case 9: + GT_Utility.sendChatToPlayer(aPlayer, trans("115.2", String.format("Outputs 1 specific Fluid (%s)", mFluid == null ? + trans("115.3","currently none, will be locked to the next that is put in"): + mFluid.getLocalizedName()))); + break; } } @@ -191,11 +208,23 @@ public class GT_MetaTileEntity_Hatch_Output extends GT_MetaTileEntity_Hatch { } public boolean outputsLiquids() { - return mMode % 2 == 0; + return mMode % 2 == 0 || mMode == 9; } public boolean outputsItems() { - return mMode % 4 < 2; + return mMode % 4 < 2 && mMode != 9; + } + + public boolean isFluidLocked(){ + return mMode == 8 || mMode == 9; + } + + public String getLockedFluidName() { + return lockedFluidName; + } + + public void setLockedFluidName(String lockedFluidName) { + this.lockedFluidName = lockedFluidName; } @Override diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java index 6c0f8f5a..a6ab4cc7 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java @@ -532,36 +532,46 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { return false; } - public boolean addOutput(FluidStack aLiquid) { - if (aLiquid == null) return false; - FluidStack tLiquid = aLiquid.copy(); + private boolean dumpFluid(FluidStack copiedFluidStack, boolean restrictiveHatchesOnly){ for (GT_MetaTileEntity_Hatch_Output tHatch : mOutputHatches) { - if (isValidMetaTileEntity(tHatch) && GT_ModHandler.isSteam(aLiquid) ? tHatch.outputsSteam() : tHatch.outputsLiquids()) { - int tAmount = tHatch.fill(tLiquid, false); - if (tAmount >= tLiquid.amount) { - return tHatch.fill(tLiquid, true) >= tLiquid.amount; - } else if (tAmount > 0) { - tLiquid.amount = tLiquid.amount - tHatch.fill(tLiquid, true); - } + if (!isValidMetaTileEntity(tHatch) || (restrictiveHatchesOnly && tHatch.mMode == 0)) { + continue; + } + if (GT_ModHandler.isSteam(copiedFluidStack)) { + if (!tHatch.outputsSteam()) { + continue; + } + } else { + if (!tHatch.outputsLiquids()) { + continue; + } + if (tHatch.isFluidLocked() && tHatch.getLockedFluidName() != null && tHatch.getLockedFluidName() != copiedFluidStack.getUnlocalizedName()) { + continue; + } + } + int tAmount = tHatch.fill(copiedFluidStack, false); + if (tAmount >= copiedFluidStack.amount) { + tHatch.setLockedFluidName(copiedFluidStack.getUnlocalizedName()); + return tHatch.fill(copiedFluidStack, true) >= copiedFluidStack.amount; + } else if (tAmount > 0) { + tHatch.setLockedFluidName(copiedFluidStack.getUnlocalizedName()); + copiedFluidStack.amount = copiedFluidStack.amount - tHatch.fill(copiedFluidStack, true); } } return false; } + + public boolean addOutput(FluidStack aLiquid) { + if (aLiquid == null) return false; + FluidStack copiedFluidStack = aLiquid.copy(); + dumpFluid(copiedFluidStack, true); + dumpFluid(copiedFluidStack, false); + return false; + } protected void addFluidOutputs(FluidStack[] mOutputFluids2) { for (FluidStack outputFluidStack : mOutputFluids2) { - if (outputFluidStack != null) { - FluidStack copiedStack = outputFluidStack.copy(); - for (GT_MetaTileEntity_Hatch_Output outputhatch : mOutputHatches) { - if (copiedStack.amount <= 0) { - break; - } - if (!isValidMetaTileEntity(outputhatch)) { - continue; - } - copiedStack.amount -= outputhatch.fill(copiedStack, true); - } - } + addOutput(outputFluidStack); } } From a63730107b97dd242397b6495870b8fa46ba75db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20G=C3=A4=C3=9Fler?= Date: Sat, 5 Aug 2017 22:10:50 +0200 Subject: [PATCH 12/14] Implemented NBT for the Locked Fluid --- .../GT_MetaTileEntity_Hatch_Output.java | 25 +++++++++++++------ .../GT_MetaTileEntity_MultiBlockBase.java | 7 +++--- 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Output.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Output.java index 9c0d157c..83389e06 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Output.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Output.java @@ -98,12 +98,15 @@ public class GT_MetaTileEntity_Hatch_Output extends GT_MetaTileEntity_Hatch { public void saveNBTData(NBTTagCompound aNBT) { super.saveNBTData(aNBT); aNBT.setByte("mMode", mMode); + aNBT.setString("lockedFluidName", lockedFluidName); } @Override public void loadNBTData(NBTTagCompound aNBT) { super.loadNBTData(aNBT); mMode = aNBT.getByte("mMode"); + lockedFluidName = aNBT.getString("lockedFluidName"); + lockedFluidName = lockedFluidName.length() == 0 ? null : lockedFluidName; } @Override @@ -160,6 +163,7 @@ public class GT_MetaTileEntity_Hatch_Output extends GT_MetaTileEntity_Hatch { } else { mMode = (byte) ((mMode + 1) % 10); } + String inBrackets; switch (mMode) { case 0: GT_Utility.sendChatToPlayer(aPlayer, trans("108","Outputs misc. Fluids, Steam and Items")); @@ -186,15 +190,22 @@ public class GT_MetaTileEntity_Hatch_Output extends GT_MetaTileEntity_Hatch { GT_Utility.sendChatToPlayer(aPlayer, trans("115","Outputs nothing")); break; case 8: - this.setLockedFluidName(this.getDrainableStack().getUnlocalizedName()); - GT_Utility.sendChatToPlayer(aPlayer, trans("115.1", String.format("Outputs items and 1 specific Fluid (%s)", mFluid == null ? - trans("115.3","currently none, will be locked to the next that is put in"): - mFluid.getLocalizedName()))); + if (mFluid == null) { + inBrackets = trans("115.3","currently none, will be locked to the next that is put in"); + } else { + this.setLockedFluidName(this.getDrainableStack().getUnlocalizedName()); + inBrackets = this.getDrainableStack().getLocalizedName(); + } + GT_Utility.sendChatToPlayer(aPlayer, String.format("%s (%s)", trans("151.1", "Outputs items and 1 specific Fluid"), inBrackets)); break; case 9: - GT_Utility.sendChatToPlayer(aPlayer, trans("115.2", String.format("Outputs 1 specific Fluid (%s)", mFluid == null ? - trans("115.3","currently none, will be locked to the next that is put in"): - mFluid.getLocalizedName()))); + if (mFluid == null) { + inBrackets = trans("115.3","currently none, will be locked to the next that is put in"); + } else { + this.setLockedFluidName(this.getDrainableStack().getUnlocalizedName()); + inBrackets = this.getDrainableStack().getLocalizedName(); + } + GT_Utility.sendChatToPlayer(aPlayer, String.format("%s (%s)", trans("151.2", "Outputs 1 specific Fluid"), inBrackets)); break; } } diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java index a6ab4cc7..6ae0c1bc 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java @@ -545,7 +545,7 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { if (!tHatch.outputsLiquids()) { continue; } - if (tHatch.isFluidLocked() && tHatch.getLockedFluidName() != null && tHatch.getLockedFluidName() != copiedFluidStack.getUnlocalizedName()) { + if (tHatch.isFluidLocked() && tHatch.getLockedFluidName() != null && !tHatch.getLockedFluidName().equals(copiedFluidStack.getUnlocalizedName())) { continue; } } @@ -564,8 +564,9 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { public boolean addOutput(FluidStack aLiquid) { if (aLiquid == null) return false; FluidStack copiedFluidStack = aLiquid.copy(); - dumpFluid(copiedFluidStack, true); - dumpFluid(copiedFluidStack, false); + if (!dumpFluid(copiedFluidStack, true)){ + dumpFluid(copiedFluidStack, false); + } return false; } From a7787342b1a6d59bdc156efd88d9ac06b9ee4994 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20G=C3=A4=C3=9Fler?= Date: Sun, 6 Aug 2017 12:05:08 +0200 Subject: [PATCH 13/14] Fluid can now also be locked via cells, added a chat message --- .../GT_MetaTileEntity_BasicTank.java | 5 +++++ .../GT_MetaTileEntity_Hatch_Output.java | 22 ++++++++++++++++++- .../GT_MetaTileEntity_MultiBlockBase.java | 7 +++--- 3 files changed, 30 insertions(+), 4 deletions(-) diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicTank.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicTank.java index 6d301ebd..f4a70b2e 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicTank.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicTank.java @@ -145,6 +145,7 @@ public abstract class GT_MetaTileEntity_BasicTank extends GT_MetaTileEntity_Tier if (isFluidInputAllowed(tFluid) && tFluid.amount <= getCapacity()) { if (aBaseMetaTileEntity.addStackToSlot(getOutputSlot(), GT_Utility.getContainerItem(mInventory[getInputSlot()], true), 1)) { setFillableStack(tFluid.copy()); + this.onEmptyingContainerWhenEmpty(); aBaseMetaTileEntity.decrStackSize(getInputSlot(), 1); } } @@ -256,4 +257,8 @@ public abstract class GT_MetaTileEntity_BasicTank extends GT_MetaTileEntity_Tier public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { return aIndex == getInputSlot(); } + + protected void onEmptyingContainerWhenEmpty(){ + //Do nothing + } } \ No newline at end of file diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Output.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Output.java index 83389e06..b5b92c42 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Output.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Output.java @@ -11,12 +11,12 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.IFluidHandler; public class GT_MetaTileEntity_Hatch_Output extends GT_MetaTileEntity_Hatch { private String lockedFluidName = null; + private EntityPlayer playerThatLockedfluid = null; public byte mMode = 0; public GT_MetaTileEntity_Hatch_Output(int aID, String aName, String aNameRegional, int aTier) { @@ -167,30 +167,40 @@ public class GT_MetaTileEntity_Hatch_Output extends GT_MetaTileEntity_Hatch { switch (mMode) { case 0: GT_Utility.sendChatToPlayer(aPlayer, trans("108","Outputs misc. Fluids, Steam and Items")); + this.setLockedFluidName(null); break; case 1: GT_Utility.sendChatToPlayer(aPlayer, trans("109","Outputs Steam and Items")); + this.setLockedFluidName(null); break; case 2: GT_Utility.sendChatToPlayer(aPlayer, trans("110","Outputs Steam and misc. Fluids")); + this.setLockedFluidName(null); break; case 3: GT_Utility.sendChatToPlayer(aPlayer, trans("111","Outputs Steam")); + this.setLockedFluidName(null); break; case 4: GT_Utility.sendChatToPlayer(aPlayer, trans("112","Outputs misc. Fluids and Items")); + this.setLockedFluidName(null); break; case 5: GT_Utility.sendChatToPlayer(aPlayer, trans("113","Outputs only Items")); + this.setLockedFluidName(null); break; case 6: GT_Utility.sendChatToPlayer(aPlayer, trans("114","Outputs only misc. Fluids")); + this.setLockedFluidName(null); break; case 7: GT_Utility.sendChatToPlayer(aPlayer, trans("115","Outputs nothing")); + this.setLockedFluidName(null); break; case 8: + playerThatLockedfluid = aPlayer; if (mFluid == null) { + this.setLockedFluidName(null); inBrackets = trans("115.3","currently none, will be locked to the next that is put in"); } else { this.setLockedFluidName(this.getDrainableStack().getUnlocalizedName()); @@ -199,7 +209,9 @@ public class GT_MetaTileEntity_Hatch_Output extends GT_MetaTileEntity_Hatch { GT_Utility.sendChatToPlayer(aPlayer, String.format("%s (%s)", trans("151.1", "Outputs items and 1 specific Fluid"), inBrackets)); break; case 9: + playerThatLockedfluid = aPlayer; if (mFluid == null) { + this.setLockedFluidName(null); inBrackets = trans("115.3","currently none, will be locked to the next that is put in"); } else { this.setLockedFluidName(this.getDrainableStack().getUnlocalizedName()); @@ -242,4 +254,12 @@ public class GT_MetaTileEntity_Hatch_Output extends GT_MetaTileEntity_Hatch { public int getTankPressure() { return +100; } + + @Override + protected void onEmptyingContainerWhenEmpty() { + if (this.lockedFluidName == null && this.mFluid != null) { + this.setLockedFluidName(this.mFluid.getUnlocalizedName()); + GT_Utility.sendChatToPlayer(playerThatLockedfluid, String.format(trans("151.4","Sucessfully locked Fluid to %s"), mFluid.getLocalizedName())); + } + } } diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java index 6ae0c1bc..f0fb16f6 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java @@ -551,11 +551,12 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { } int tAmount = tHatch.fill(copiedFluidStack, false); if (tAmount >= copiedFluidStack.amount) { - tHatch.setLockedFluidName(copiedFluidStack.getUnlocalizedName()); - return tHatch.fill(copiedFluidStack, true) >= copiedFluidStack.amount; + boolean filled = tHatch.fill(copiedFluidStack, true) >= copiedFluidStack.amount; + tHatch.onEmptyingContainerWhenEmpty(); + return filled; } else if (tAmount > 0) { - tHatch.setLockedFluidName(copiedFluidStack.getUnlocalizedName()); copiedFluidStack.amount = copiedFluidStack.amount - tHatch.fill(copiedFluidStack, true); + tHatch.onEmptyingContainerWhenEmpty(); } } return false; From c2ededaf5ad11bb69ffd7b7acf8f364b0e10dd85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20G=C3=A4=C3=9Fler?= Date: Mon, 7 Aug 2017 22:00:26 +0200 Subject: [PATCH 14/14] Made the tooltips for Multiblock Hatches more descriptive. --- .../implementations/GT_MetaTileEntity_Hatch.java | 4 ++++ .../GT_MetaTileEntity_Hatch_DataAccess.java | 4 +++- .../implementations/GT_MetaTileEntity_Hatch_Dynamo.java | 2 +- .../implementations/GT_MetaTileEntity_Hatch_Energy.java | 2 +- .../implementations/GT_MetaTileEntity_Hatch_Input.java | 2 +- .../implementations/GT_MetaTileEntity_Hatch_InputBus.java | 3 ++- .../implementations/GT_MetaTileEntity_Hatch_Output.java | 7 ++++++- .../implementations/GT_MetaTileEntity_Hatch_OutputBus.java | 3 ++- 8 files changed, 20 insertions(+), 7 deletions(-) diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch.java index 9c13aa1d..d33b71bc 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch.java @@ -13,6 +13,10 @@ public abstract class GT_MetaTileEntity_Hatch extends GT_MetaTileEntity_BasicTan super(aID, aName, aNameRegional, aTier, aInvSlotCount, aDescription, aTextures); } + public GT_MetaTileEntity_Hatch(int aID, String aName, String aNameRegional, int aTier, int aInvSlotCount, String[] aDescription, ITexture... aTextures) { + super(aID, aName, aNameRegional, aTier, aInvSlotCount, aDescription, aTextures); + } + public GT_MetaTileEntity_Hatch(String aName, int aTier, int aInvSlotCount, String aDescription, ITexture[][][] aTextures) { super(aName, aTier, aInvSlotCount, aDescription, aTextures); } diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_DataAccess.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_DataAccess.java index 135f579f..466222f1 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_DataAccess.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_DataAccess.java @@ -12,7 +12,9 @@ import net.minecraft.item.ItemStack; public class GT_MetaTileEntity_Hatch_DataAccess extends GT_MetaTileEntity_Hatch { public GT_MetaTileEntity_Hatch_DataAccess(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, 16, "Data Access for Multiblocks"); + super(aID, aName, aNameRegional, aTier, 16, new String[]{ + "Data Access for Multiblocks", + "Adds " + (aTier == 4 ? 4 : 16) + " extra slots for Data Sticks"}); } public GT_MetaTileEntity_Hatch_DataAccess(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Dynamo.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Dynamo.java index e599aa09..c0e90822 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Dynamo.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Dynamo.java @@ -11,7 +11,7 @@ import static gregtech.api.enums.GT_Values.V; public class GT_MetaTileEntity_Hatch_Dynamo extends GT_MetaTileEntity_Hatch { public GT_MetaTileEntity_Hatch_Dynamo(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, 0, "Generating electric Energy from Multiblocks"); + super(aID, aName, aNameRegional, aTier, 0, new String[]{"Generating electric Energy from Multiblocks", "Puts out up to 1 Amp"}); } public GT_MetaTileEntity_Hatch_Dynamo(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Energy.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Energy.java index 8d9f23f6..c2e85d16 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Energy.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Energy.java @@ -11,7 +11,7 @@ import static gregtech.api.enums.GT_Values.V; public class GT_MetaTileEntity_Hatch_Energy extends GT_MetaTileEntity_Hatch { public GT_MetaTileEntity_Hatch_Energy(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, 0, "Energy Injector for Multiblocks"); + super(aID, aName, aNameRegional, aTier, 0, new String[]{"Energy Injector for Multiblocks", "Accepts up to 2 Amps"}); } public GT_MetaTileEntity_Hatch_Energy(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Input.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Input.java index 4c24a148..33430851 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Input.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Input.java @@ -15,7 +15,7 @@ public class GT_MetaTileEntity_Hatch_Input extends GT_MetaTileEntity_Hatch { public GT_Recipe_Map mRecipeMap = null; public GT_MetaTileEntity_Hatch_Input(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, 3, "Fluid Input for Multiblocks (" + 8000 * (aTier + 1) + "L)"); + super(aID, aName, aNameRegional, aTier, 3, new String[]{"Fluid Input for Multiblocks", "Capacity: "+ 8000 * (aTier + 1) + "L"}); } public GT_MetaTileEntity_Hatch_Input(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBus.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBus.java index e921ff63..d053bc65 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBus.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBus.java @@ -16,7 +16,8 @@ public class GT_MetaTileEntity_Hatch_InputBus extends GT_MetaTileEntity_Hatch { public GT_Recipe_Map mRecipeMap = null; public GT_MetaTileEntity_Hatch_InputBus(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, getSlots(aTier), "Item Input for Multiblocks (" + getSlots(aTier) + " slot" + (getSlots(aTier) >= 2 ? "s" : "") + ")"); + super(aID, aName, aNameRegional, aTier, getSlots(aTier), new String[]{"Item Input for Multiblocks", + "Capacity: " + getSlots(aTier) + " stack" + (getSlots(aTier) >= 2 ? "s" : "")}); } public GT_MetaTileEntity_Hatch_InputBus(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Output.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Output.java index b5b92c42..e59ba5f8 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Output.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Output.java @@ -20,7 +20,12 @@ public class GT_MetaTileEntity_Hatch_Output extends GT_MetaTileEntity_Hatch { public byte mMode = 0; public GT_MetaTileEntity_Hatch_Output(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, 3, "Fluid Output for Multiblocks (" + 8000 * (aTier + 1) + "L) (Screwdriver for output type)"); + super(aID, aName, aNameRegional, aTier, 3, new String[]{ + "Fluid Output for Multiblocks", + "Capacity: " + 8000 * (aTier + 1) + "L", + "Right click with screwdriver to restrict output", + "Can be restricted to put out Items and/or Steam/No Steam/1 specific Fluid", + "Restricted Output Hatches are given priority for Multiblock Fluid output"}); } public GT_MetaTileEntity_Hatch_Output(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_OutputBus.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_OutputBus.java index 9b685743..6ea82eca 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_OutputBus.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_OutputBus.java @@ -12,7 +12,8 @@ import net.minecraft.item.ItemStack; public class GT_MetaTileEntity_Hatch_OutputBus extends GT_MetaTileEntity_Hatch { public GT_MetaTileEntity_Hatch_OutputBus(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, getSlots(aTier), "Item Output for Multiblocks (" + getSlots(aTier) + " slot" + (getSlots(aTier) >= 2 ? "s" : "") + ")"); + super(aID, aName, aNameRegional, aTier, getSlots(aTier), new String[]{"Item Output for Multiblocks", + "Capacity: " + getSlots(aTier) + " stack" + (getSlots(aTier) >= 2 ? "s" : "")}); } public GT_MetaTileEntity_Hatch_OutputBus(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {