Skip to content

Commit 08aaa3c

Browse files
authored
Minor fixes for documentation (#291)
* fix quarryplus (AdditionalEnchantedMiner) * remove period before colon * fix botania tweaks docs being incorrect
1 parent e1ce75a commit 08aaa3c

File tree

6 files changed

+21
-15
lines changed

6 files changed

+21
-15
lines changed

examples/postInit/botania_tweaks.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ log.info 'mod \'botania_tweaks\' detected, running script'
99
// Terrestrial Agglomeration Plate place on top of a small 3x3 multiblock, of which the center, sides, and corners may be
1010
// set to require specific blockstates. While the recipe is running, particles will gradually change color until the recipe
1111
// is finished. Upon finishing the recipe, the center, sides, and corners can each be converted into a replacement
12-
// blockstate.
12+
// blockstate, if a replacement blockstate was set.
1313

1414
// mods.botania_tweaks.agglomeration_plate.removeByCenter(blockstate('botania:livingrock'))
1515
// mods.botania_tweaks.agglomeration_plate.removeByCorner(blockstate('botania:livingrock'))

examples/postInit/quarryplus.groovy

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44

55
log.info 'mod \'quarryplus\' detected, running script'
66

7-
// Work bench:
8-
// Workbench for crafting items using electricity.
7+
// Workbench Plus:
8+
// Converts up to 27 itemstacks into an output itemstack at the cost of power.
99

10-
mods.quarryplus.work_bench_plus.removeByOutput(item('quarryplus:quarry'))
11-
// mods.quarryplus.work_bench_plus.removeAll()
10+
mods.quarryplus.workbench_plus.removeByOutput(item('quarryplus:quarry'))
11+
// mods.quarryplus.workbench_plus.removeAll()
1212

13-
mods.quarryplus.work_bench_plus.recipeBuilder()
13+
mods.quarryplus.workbench_plus.recipeBuilder()
1414
.output(item('minecraft:nether_star'))
1515
.input(item('minecraft:diamond'),item('minecraft:gold_ingot'))
1616
.energy(10000)

src/main/java/com/cleanroommc/groovyscript/compat/mods/additionalenchantedminer/AdditionalEnchantedMiner.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44

55
public class AdditionalEnchantedMiner extends GroovyPropertyContainer {
66

7-
public final WorkBenchPlus workBenchPlus = new WorkBenchPlus();
7+
public final WorkbenchPlus workbenchPlus = new WorkbenchPlus();
88
}
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
import java.util.stream.Collectors;
2525

2626
@RegistryDescription
27-
public class WorkBenchPlus extends VirtualizedRegistry<IngredientRecipe> {
27+
public class WorkbenchPlus extends VirtualizedRegistry<IngredientRecipe> {
2828

2929
@Override
3030
public void onReload() {
@@ -83,12 +83,12 @@ public RecipeBuilder energy(double energy) {
8383

8484
@Override
8585
public String getRecipeNamePrefix() {
86-
return "additionalenchantedminer_workbenchplus_";
86+
return "additionalenchantedminer_workbench_";
8787
}
8888

8989
@Override
9090
public String getErrorMsg() {
91-
return "Error adding Additional Enchanted Miner WorkbenchPlus recipe";
91+
return "Error adding Additional Enchanted Miner Workbench recipe";
9292
}
9393

9494
@Override
@@ -116,7 +116,7 @@ public void validate(GroovyLog.Msg msg) {
116116
.map(SeqLike::toSeq)
117117
.collect(Collectors.toList())).asScala().toSeq();
118118
IngredientRecipe recipe = new IngredientRecipe(this.name, output.get(0), energy, true, inputScalaList, true);
119-
ModSupport.ADDITIONAL_ENCHANTED_MINER.get().workBenchPlus.add(recipe);
119+
ModSupport.ADDITIONAL_ENCHANTED_MINER.get().workbenchPlus.add(recipe);
120120
return recipe;
121121
}
122122
}

src/main/java/com/cleanroommc/groovyscript/documentation/Registry.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,14 @@
1313
import java.lang.reflect.Method;
1414
import java.lang.reflect.ParameterizedType;
1515
import java.util.*;
16+
import java.util.regex.Pattern;
1617
import java.util.stream.Collectors;
1718
import java.util.stream.Stream;
1819

1920

2021
public class Registry {
2122

23+
private static final Pattern PERIOD_END_PATTERN = Pattern.compile("\\.$");
2224
private final GroovyContainer<? extends GroovyPropertyContainer> mod;
2325
private final INamed registry;
2426
private final String baseTranslationKey;
@@ -339,7 +341,7 @@ private String methodDescription(Method method) {
339341

340342
return String.format(
341343
"- %s:\n\n%s",
342-
Documentation.translate(lang),
344+
PERIOD_END_PATTERN.matcher(Documentation.translate(lang)).replaceAll(""),
343345
new CodeBlockBuilder()
344346
.line(methodExample(method, Exporter.simpleSignature(method, types)))
345347
.indentation(1)

src/main/resources/assets/groovyscript/lang/en_us.lang

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,9 +174,12 @@ groovyscript.wiki.actuallyadditions.treasure_chest.min.required=less than or equ
174174
groovyscript.wiki.actuallyadditions.treasure_chest.max.value=Sets the maximum stack size given when rolled
175175
groovyscript.wiki.actuallyadditions.treasure_chest.max.required=greater than or equal to the size of min
176176

177-
#Additional Enchanted Miner
178-
groovyscript.wiki.quarryplus.work_bench_plus.title=Work bench
179-
groovyscript.wiki.quarryplus.work_bench_plus.description=Workbench for crafting items using electricity.
177+
178+
# Additional Enchanted Miner
179+
groovyscript.wiki.quarryplus.workbench_plus.title=Workbench Plus
180+
groovyscript.wiki.quarryplus.workbench_plus.description=Converts up to 27 itemstacks into an output itemstack at the cost of power.
181+
groovyscript.wiki.quarryplus.workbench_plus.energy.value=Sets the amount of energy consumed to craft the recipe.
182+
180183

181184
# Advanced Mortars
182185
groovyscript.wiki.advancedmortars.mortar.title=Mortar
@@ -189,6 +192,7 @@ groovyscript.wiki.advancedmortars.mortar.duration.value=Sets how many interactio
189192
groovyscript.wiki.advancedmortars.mortar.secondaryOutput.value=Sets the additional output itemstack
190193
groovyscript.wiki.advancedmortars.mortar.secondaryOutputChance.value=Sets the chance of the additional output itemstack being output
191194

195+
192196
# Advanced Rocketry
193197
groovyscript.wiki.advancedrocketry.admonition.weights=The 'chances' used with the recipe outputs are actually output weights. For example, setting 'chance' to 0.1 will set the output's chance to 1, unless other outputs add up to the weight of 0.9. The output chances will also not do anything unless 'outputSize' is set to a number greater than 0.
194198
groovyscript.wiki.advancedrocketry.admonition.input_slots=The recipes performed in this machine can have more than 9 inputs, but this makes the JEI handler overflow when displaying the recipe and breaks the tooltips.

0 commit comments

Comments
 (0)