aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/net/glease/ggfab/util
diff options
context:
space:
mode:
authorGlease <4586901+Glease@users.noreply.github.com>2023-12-04 22:50:37 +0800
committerGitHub <noreply@github.com>2023-12-04 15:50:37 +0100
commitdba8ca96b6a72941f7b4098dca5b2745ac500dc1 (patch)
tree34837d151e8512bface97433ba21a896b6f092c2 /src/main/java/net/glease/ggfab/util
parent271055e7229c6be6a5826a42e69d46bd43e8f27f (diff)
downloadGT5-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 ![image](https://github.com/GTNewHorizons/GigaGramFab/assets/4586901/b646e07b-64dc-4b5a-91e1-2564dea98090) HV ![image](https://github.com/GTNewHorizons/GigaGramFab/assets/4586901/2b19f72f-88b9-4cc7-9640-e6e3f6df11eb) EV ![image](https://github.com/GTNewHorizons/GigaGramFab/assets/4586901/2090ad41-2101-442b-89d7-3909756c378a) 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. ![image](https://github.com/GTNewHorizons/GigaGramFab/assets/4586901/8fd80c98-63be-4a26-a7c4-83421684416d) ![image](https://github.com/GTNewHorizons/GigaGramFab/assets/4586901/bf2a4347-d133-4bc2-b0d1-d2d968d19667) 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.java25
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();
+ }
}