diff options
author | Glease <4586901+Glease@users.noreply.github.com> | 2023-12-04 22:50:37 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-04 15:50:37 +0100 |
commit | dba8ca96b6a72941f7b4098dca5b2745ac500dc1 (patch) | |
tree | 34837d151e8512bface97433ba21a896b6f092c2 /src/main/java/net/glease/ggfab/util | |
parent | 271055e7229c6be6a5826a42e69d46bd43e8f27f (diff) | |
download | GT5-Unofficial-dba8ca96b6a72941f7b4098dca5b2745ac500dc1.tar.gz GT5-Unofficial-dba8ca96b6a72941f7b4098dca5b2745ac500dc1.tar.bz2 GT5-Unofficial-dba8ca96b6a72941f7b4098dca5b2745ac500dc1.zip |
single use tool (#23)
close
https://github.com/GTNewHorizons/GT-New-Horizons-Modpack/issues/14102
recipes and balance are subject to discussions. Currently there is no
matching multiblock for this except PA, but the sheer throughput from
HSS-G should invalidate any need of parallelizing/OC. I intend on adding
a smart multiblock for this (can respond to ME crafting request
dynamically) once first fully functioning MuTE multiblock is out.
MV

HV

EV

shapes looks like this. neither tool used will not get consumed. They
will only get weared out slightly just like any other crafting. I can't
say this is a very brilliant recipe, but IMO it's enough as a
placeholder until someone can come up with more interesting ones.


Currently the count of tools crafted is the durability of each tool with
given tool material divided by durability cost per craft. The only
exception is silver (which is added purely as a meme), whose durability
is halved during calculation.
https://github.com/GTNewHorizons/GigaGramFab/pull/23/commits/79499aab82a72d1d180ca2ea2fdc8a8252d8c3fe
introduced a slightly less stupid algorithm. As a result most of the
tool recipes now require a multiple of 16 of fluids as input.
---------
Co-authored-by: Martin Robertz <dream-master@gmx.net>
Co-authored-by: miozune <miozune@gmail.com>
Diffstat (limited to 'src/main/java/net/glease/ggfab/util')
-rw-r--r-- | src/main/java/net/glease/ggfab/util/GGUtils.java | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/main/java/net/glease/ggfab/util/GGUtils.java b/src/main/java/net/glease/ggfab/util/GGUtils.java index 66ff5d9361..59dbf482ec 100644 --- a/src/main/java/net/glease/ggfab/util/GGUtils.java +++ b/src/main/java/net/glease/ggfab/util/GGUtils.java @@ -47,4 +47,29 @@ public class GGUtils { sj.add(String.valueOf(tile.getZCoord())); return sj.toString(); } + + /** + * convert lowerCamelCase to any of snake case or normal sentence + */ + public static String processSentence(String src, Character separator, boolean capitalize, boolean firstCapitalize) { + if (src == null) throw new IllegalArgumentException(); + if (src.isEmpty()) return ""; + StringBuilder out = new StringBuilder(src.length()); + if (firstCapitalize) out.append(Character.toUpperCase(src.charAt(0))); + else out.append(src.charAt(0)); + for (int i = 1; i < src.length(); i++) { + char ch = src.charAt(i); + if (Character.isUpperCase(ch)) { + if (separator != null) out.append(separator.charValue()); + if (capitalize) { + out.append(ch); + } else { + out.append(Character.toLowerCase(ch)); + } + } else { + out.append(ch); + } + } + return out.toString(); + } } |