diff options
Diffstat (limited to 'src/main')
11 files changed, 40 insertions, 15 deletions
diff --git a/src/main/java/gregtech/api/util/GTPP_Recipe.java b/src/main/java/gregtech/api/util/GTPP_Recipe.java index c58401a04c..9e3d7f7102 100644 --- a/src/main/java/gregtech/api/util/GTPP_Recipe.java +++ b/src/main/java/gregtech/api/util/GTPP_Recipe.java @@ -823,9 +823,9 @@ public class GTPP_Recipe extends GT_Recipe { }.useModularUI(true).setNEISpecialInfoFormatter((recipeInfo, applyPrefixAndSuffix) -> { List<String> result = new ArrayList<>(); if (ModItems.fluidFertBasic != null) { - result.add("Sapling is outputted if"); - result.add("" + ModItems.fluidFertBasic.getLocalizedName() + " is provided."); - result.add("This is optional."); + result.add("The sapling is not consumed."); + result.add("If " + ModItems.fluidFertBasic.getLocalizedName() + " is provided,"); + result.add("Saplings are made instead"); } return result; }); diff --git a/src/main/java/gtPlusPlus/core/material/ELEMENT.java b/src/main/java/gtPlusPlus/core/material/ELEMENT.java index 666de12f53..1ee1b79cdd 100644 --- a/src/main/java/gtPlusPlus/core/material/ELEMENT.java +++ b/src/main/java/gtPlusPlus/core/material/ELEMENT.java @@ -651,7 +651,7 @@ public final class ELEMENT { 40, 51, true, - "⚷⚙⚷ Ni4Ti6", + StringUtils.subscript("⚷⚙⚷ Ni4Ti6"), 0); // Not a GT Inherited Material public static final Material HYPOGEN = new Material( "Hypogen", diff --git a/src/main/java/gtPlusPlus/core/material/Material.java b/src/main/java/gtPlusPlus/core/material/Material.java index 1d926742cb..6e1c9b8b92 100644 --- a/src/main/java/gtPlusPlus/core/material/Material.java +++ b/src/main/java/gtPlusPlus/core/material/Material.java @@ -1342,7 +1342,8 @@ public class Material { if (!aChemSymbol.equals("??")) { if (dummyFormulaArray[e] > 1) { - if (aChemFormula.length() > 3) { + if (aChemFormula.length() > 3 + || StringUtils.uppercaseCount(aChemFormula) > 1) { dummyFormula = dummyFormula + "(" + aChemFormula + ")" @@ -1351,7 +1352,8 @@ public class Material { dummyFormula = dummyFormula + aChemFormula + dummyFormulaArray[e]; } } else if (dummyFormulaArray[e] == 1) { - if (aChemFormula.length() > 3) { + if (aChemFormula.length() > 3 + || StringUtils.uppercaseCount(aChemFormula) > 1) { dummyFormula = dummyFormula + "(" + aChemFormula + ")"; } else { dummyFormula = dummyFormula + aChemFormula; diff --git a/src/main/java/gtPlusPlus/core/material/nuclear/FLUORIDES.java b/src/main/java/gtPlusPlus/core/material/nuclear/FLUORIDES.java index fab71be1bf..0e2e0b7e76 100644 --- a/src/main/java/gtPlusPlus/core/material/nuclear/FLUORIDES.java +++ b/src/main/java/gtPlusPlus/core/material/nuclear/FLUORIDES.java @@ -95,7 +95,7 @@ public class FLUORIDES { -1, -1, false, - "ZrF4", + "ZrF\u2084", -1, true, false, @@ -169,7 +169,7 @@ public class FLUORIDES { new MaterialStack[] { new MaterialStack(ELEMENT.getInstance().BERYLLIUM, 1), new MaterialStack(MISC_MATERIALS.HYDROXIDE, 2) }); - // (NH4)2Be(OH)2 / (NH4)2BeF4 + // (NH4)2BeF4 public static final Material AMMONIUM_TETRAFLUOROBERYLLATE = new Material( "Ammonium Tetrafluoroberyllate", // Material Name MaterialState.PURE_LIQUID, // State @@ -181,7 +181,8 @@ public class FLUORIDES { false, // Uses Blast furnace? // Material Stacks with Percentage of required elements. new MaterialStack[] { new MaterialStack(MISC_MATERIALS.AMMONIUM, 2), - new MaterialStack(FLUORIDES.BERYLLIUM_HYDROXIDE, 1) }); + new MaterialStack(ELEMENT.getInstance().BERYLLIUM, 1), + new MaterialStack(ELEMENT.getInstance().FLUORINE, 4) }); // LFTR Output public static final Material NEPTUNIUM_HEXAFLUORIDE = new Material( diff --git a/src/main/java/gtPlusPlus/core/util/data/StringUtils.java b/src/main/java/gtPlusPlus/core/util/data/StringUtils.java index d837901ea8..76cd82b096 100644 --- a/src/main/java/gtPlusPlus/core/util/data/StringUtils.java +++ b/src/main/java/gtPlusPlus/core/util/data/StringUtils.java @@ -222,4 +222,8 @@ public class StringUtils { return aFound; } } + + public static long uppercaseCount(String aString) { + return aString.chars().filter((c) -> Character.isUpperCase(c)).count(); + } } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_ElementalDataOrbHolder.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_ElementalDataOrbHolder.java index 0aa1f5dd98..c1e0095726 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_ElementalDataOrbHolder.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_ElementalDataOrbHolder.java @@ -40,7 +40,7 @@ public class GT_MetaTileEntity_Hatch_ElementalDataOrbHolder extends GT_MetaTileE aTier, 17, new String[] { "Holds Data Orbs for the Elemental Duplicator", "Can insert/extract the circuit slot", - "Use Circuit to select a slot (1-16)", CORE.GT_Tooltip.get() }); + "A circuit must be used to select a slot (1-16)", CORE.GT_Tooltip.get() }); } public GT_MetaTileEntity_Hatch_ElementalDataOrbHolder(String aName, int aTier, String aDescription, @@ -164,6 +164,20 @@ public class GT_MetaTileEntity_Hatch_ElementalDataOrbHolder extends GT_MetaTileE return aContents; } + public ItemStack getOrbByCircuit() { + ItemStack aCirc = getBaseMetaTileEntity().getStackInSlot(getCircuitSlot()); + if (aCirc != null && ItemUtils.isControlCircuit(aCirc)) { + int slot = aCirc.getItemDamage() - 1; // slots are 0 indexed but there's no 0 circuit + if (slot < getBaseMetaTileEntity().getSizeInventory() - 1) { + return getBaseMetaTileEntity().getStackInSlot(slot); + } else { + return null; + } + } else { + return null; + } + } + @Override public boolean canInsertItem(int aIndex, ItemStack aStack, int ordinalSide) { if (aIndex == mInventory.length - 1 && ItemUtils.isControlCircuit(aStack) diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/GT_MetaTileEntity_ElectricAutoWorkbench.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/GT_MetaTileEntity_ElectricAutoWorkbench.java index c3522a1a0a..e1c591f33b 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/GT_MetaTileEntity_ElectricAutoWorkbench.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/GT_MetaTileEntity_ElectricAutoWorkbench.java @@ -127,7 +127,7 @@ public class GT_MetaTileEntity_ElectricAutoWorkbench extends GT_MetaTileEntity_B @Override public long maxEUStore() { - return GT_Values.V[this.mTier] * (this.mTier * GT_Values.V[this.mTier]); + return Math.max(2048L, GT_Values.V[this.mTier] * (this.mTier * GT_Values.V[this.mTier])); } @Override diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_ElementalDuplicator.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_ElementalDuplicator.java index c22712ff71..890ed018bf 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_ElementalDuplicator.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_ElementalDuplicator.java @@ -420,7 +420,7 @@ public class GregtechMTE_ElementalDuplicator extends GregtechMeta_MultiBlockBase for (GT_MetaTileEntity_Hatch_ElementalDataOrbHolder tHatch : mReplicatorDataOrbHatches) { tHatch.mRecipeMap = getRecipeMap(); if (isValidMetaTileEntity(tHatch)) { - tItems.addAll(tHatch.getInventory()); + tItems.add(tHatch.getOrbByCircuit()); } } tItems.removeAll(Collections.singleton(null)); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntityTreeFarm.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntityTreeFarm.java index ac961f8fdc..bb15f52aff 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntityTreeFarm.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntityTreeFarm.java @@ -115,10 +115,10 @@ public class GregtechMetaTileEntityTreeFarm extends GregtechMeta_MultiBlockBase< .addInfo("Requires a Saw or Chainsaw in GUI slot").addInfo("Output multiplier:").addInfo("Saw = 1x") .addInfo("Buzzsaw = 2x").addInfo("Chainsaw = 4x") .addInfo("Add a sapling in the input bus to select wood type output") - .addInfo("Tools can also be fed to the controller via input bus") + .addInfo("The sapling is not consumed").addInfo("Tools can also be fed to the controller via input bus") .addInfo("The working speed is fixed for 5s") .addInfo("Production Formula: (2 * tier^2 - 2 * tier + 5) * 5 * saw boost") - .addInfo("When fertilizer is insufficient, sapling production reduced to one-tenth") + .addInfo("When fertilizer is supplied, produces saplings instead of logs") .addInfo("Forestry saplings can get increased production") .addPollutionAmount(getPollutionPerSecond(null)).addSeparator().beginStructureBlock(3, 3, 3, true) .addController("Front center").addCasingInfo("Sterile Farm Casing", 8).addInputBus("Any casing", 1) diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_SolarTower.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_SolarTower.java index 623f5e16c4..24e0d6acd5 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_SolarTower.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_SolarTower.java @@ -88,7 +88,7 @@ public class GregtechMetaTileEntity_SolarTower extends GregtechMeta_MultiBlockBa .addInfo("If there's more Cold Salt than heat, all the heat is used up and returns to 0") .addInfo("The heat increase is most efficient at exactly half of maximum heat") .addInfo("Minimum efficiency at 0 or 100000 heat, maximum efficiency at 50000") - .addInfo("Heat Efficiency formula: (|currentHeat - 50000| ^ 0.8 + 7000) / 7000") + .addInfo("Heat Efficiency formula: ( 7000 - [|currentHeat - 50000| ^ 0.8]) / 7000") .addInfo("Heat gain per cycle: numberHeaters * heatEfficiency * (10 + bonus)") .addInfo("Bonus: 1 ring = +1, 2 rings = +2, 3 rings = +4, 4 rings = +8, 5 rings = +16") .addInfo("Total number of reflectors based on how many rings are built:") diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/storage/GregtechMetaTileEntity_PowerSubStationController.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/storage/GregtechMetaTileEntity_PowerSubStationController.java index 5b22be004b..7114bed42f 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/storage/GregtechMetaTileEntity_PowerSubStationController.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/storage/GregtechMetaTileEntity_PowerSubStationController.java @@ -897,6 +897,10 @@ public class GregtechMetaTileEntity_PowerSubStationController () -> "Avg Out: " + GT_Utility.formatNumbers(getAverageEuConsumed()) + " EU") .setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(10, 30)) .widget( + TextWidget.dynamicString( + () -> "Powerloss: " + GT_Utility.formatNumbers(computeEnergyTax()) + " EU per tick") + .setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(10, 40)) + .widget( new DrawableWidget().setDrawable(GTPP_UITextures.PICTURE_ENERGY_FRAME).setPos(4, 155) .setSize(149, 7)) .widget( |