Skip to content

Commit

Permalink
update docs for GroovyScript 1.1.2 (#18)
Browse files Browse the repository at this point in the history
* update docs for GroovyScript 1.1.2

* remove duplicate punctuation from generation

* fix kiln failureOutput lang key
  • Loading branch information
WaitingIdly authored Jul 25, 2024
1 parent be39365 commit 172cf3f
Show file tree
Hide file tree
Showing 80 changed files with 2,305 additions and 88 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ Don't know what a builder is? Check [the builder info page](../../getting_starte
output(Collection<ItemStack>)
```
- `Lens`. groovyscript.wiki.actuallyadditions.atomic_reconstructor.type.value. Requires not null. (Default `ActuallyAdditionsAPI.lensDefaultConversion`).
```groovy:no-line-numbers
type(Lens)
```
- `int`. Sets the amount of power consumed by the recipe. Requires greater than 0. (Default `1`).
```groovy:no-line-numbers
Expand Down
2 changes: 1 addition & 1 deletion docs/groovy-script/mods/aether_legacy/enchanter.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Don't know what a builder is? Check [the builder info page](../../getting_starte
output(Collection<ItemStack>)
```
- `int`. Sets the time the recipe takes to compelte. Requires greater than or equal to 0. (Default `0`).
- `int`. Sets the time the recipe takes to complete. Requires greater than or equal to 0. (Default `0`).
```groovy:no-line-numbers
time(int)
Expand Down
4 changes: 2 additions & 2 deletions docs/groovy-script/mods/aether_legacy/enchanter_fuel.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
---
title: "Enchanter Fuel"
titleTemplate: "Aether Legacy | CleanroomMC"
description: "By default, the Enchantar (Altar) takes Ambrosium Shards as fuel. Using GroovyScript, custom fuels can be added."
description: "By default, the Enchanter (Altar) takes Ambrosium Shards as fuel. Using GroovyScript, custom fuels can be added."
source_code_link: "https://github.com/CleanroomMC/GroovyScript/blob/master/src/main/java/com/cleanroommc/groovyscript/compat/mods/aetherlegacy/EnchanterFuel.java"
---

# Enchanter Fuel (Aether Legacy)

## Description

By default, the Enchantar (Altar) takes Ambrosium Shards as fuel. Using GroovyScript, custom fuels can be added.
By default, the Enchanter (Altar) takes Ambrosium Shards as fuel. Using GroovyScript, custom fuels can be added.

## Identifier

Expand Down
2 changes: 1 addition & 1 deletion docs/groovy-script/mods/aether_legacy/freezer.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Don't know what a builder is? Check [the builder info page](../../getting_starte
output(Collection<ItemStack>)
```
- `int`. Sets the time the recipe takes to compelte. Requires greater than or equal to 0. (Default `0`).
- `int`. Sets the time the recipe takes to complete. Requires greater than or equal to 0. (Default `0`).
```groovy:no-line-numbers
time(int)
Expand Down
4 changes: 2 additions & 2 deletions docs/groovy-script/mods/aether_legacy/freezer_fuel.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
title: "Freezer"
title: "Freezer Fuel"
titleTemplate: "Aether Legacy | CleanroomMC"
description: " By default, the Freezer takes Icestone as fuel. Using GroovyScript, custom fuels can be added."
source_code_link: "https://github.com/CleanroomMC/GroovyScript/blob/master/src/main/java/com/cleanroommc/groovyscript/compat/mods/aetherlegacy/FreezerFuel.java"
---

# Freezer (Aether Legacy)
# Freezer Fuel (Aether Legacy)

## Description

Expand Down
2 changes: 1 addition & 1 deletion docs/groovy-script/mods/aether_legacy/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ Has 5 subcategories.

* [Freezer](./freezer.md)

* [Freezer](./freezer_fuel.md)
* [Freezer Fuel](./freezer_fuel.md)

Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ Don't know what a builder is? Check [the builder info page](../../getting_starte
fluidInput(FluidStack, float)
```
- `IntArrayList`. Sets the chance a given output will occur among all possible combinations of the fluid.. Requires greater than 0.
- `IntArrayList`. Sets the chance a given output will occur among all possible combinations of the fluid. Requires greater than 0.
```groovy:no-line-numbers
output(ItemStack)
Expand Down
17 changes: 17 additions & 0 deletions docs/groovy-script/mods/atum/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
aside: false
---


# Atum 2

## Categories

Has 3 subcategories.

* [Kiln](./kiln.md)

* [Quern](./quern.md)

* [Spinning Wheel](./spinning_wheel.md)

121 changes: 121 additions & 0 deletions docs/groovy-script/mods/atum/kiln.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
---
title: "Kiln"
titleTemplate: "Atum 2 | CleanroomMC"
description: "Smelts an input item into an output itemstack and giving experience similar to a Furnace, but can process up to 4 stacks simultaneously. Makes a copy of the vanilla furnace recipes, excluding entries on a blacklist."
source_code_link: "https://github.com/CleanroomMC/GroovyScript/blob/master/src/main/java/com/cleanroommc/groovyscript/compat/mods/atum/Kiln.java"
---

# Kiln (Atum 2)

## Description

Smelts an input item into an output itemstack and giving experience similar to a Furnace, but can process up to 4 stacks simultaneously. Makes a copy of the vanilla furnace recipes, excluding entries on a blacklist.

## Identifier

Refer to this via any of the following:

```groovy:no-line-numbers {1}
mods.atum.kiln/* Used as page default */ // [!code focus]
mods.atum.Kiln
```


## Adding Recipes

### Recipe Builder

Just like other recipe types, the Kiln also uses a recipe builder.

Don't know what a builder is? Check [the builder info page](../../getting_started/builder.md) out.

:::::::::: details mods.atum.kiln.recipeBuilder() {open id="abstract"}
- `ResourceLocation`. Sets the Resource Location of the recipe.

```groovy:no-line-numbers
name(String)
name(ResourceLocation)
```
- `IngredientList<IIngredient>`. Sets the item inputs of the recipe. Requires exactly 1.
```groovy:no-line-numbers
input(IIngredient)
input(IIngredient...)
input(Collection<IIngredient>)
```
- `ItemStackList`. Sets the item outputs of the recipe. Requires exactly 1.
```groovy:no-line-numbers
output(ItemStack)
output(ItemStack...)
output(Collection<ItemStack>)
```
- `float`. Sets the experience gained by taking the output item out of the Kiln. Requires greater than or equal to 0. (Default `0.0f`).
```groovy:no-line-numbers
experience(float)
```
- First validates the builder, returning `null` and outputting errors to the log file if the validation failed, then registers the builder and returns the registered object. (returns `null` or `com.teammetallurgy.atum.api.recipe.kiln.IKilnRecipe`).
```groovy:no-line-numbers
register()
```
::::::::: details Example {open id="example"}
```groovy:no-line-numbers
mods.atum.kiln.recipeBuilder()
.input(item('minecraft:diamond'))
.output(item('minecraft:clay'))
.register()
mods.atum.kiln.recipeBuilder()
.input(item('minecraft:gold_ingot'))
.output(item('minecraft:clay') * 4)
.experience(0.5f)
.register()
```

:::::::::

::::::::::

## Removing Recipes

- Removes all recipes that match the given input:

```groovy:no-line-numbers
mods.atum.kiln.removeByInput(IIngredient)
```
- Removes all recipes that match the given output:
```groovy:no-line-numbers
mods.atum.kiln.removeByOutput(IIngredient)
```
- Removes all registered recipes:
```groovy:no-line-numbers
mods.atum.kiln.removeAll()
```
:::::::::: details Example {open id="example"}
```groovy:no-line-numbers
mods.atum.kiln.removeByInput(item('minecraft:netherrack'))
mods.atum.kiln.removeByOutput(item('minecraft:stone'))
mods.atum.kiln.removeAll()
```

::::::::::

## Getting the value of recipes

- Iterates through every entry in the registry, with the ability to call remove on any element to remove it:

```groovy:no-line-numbers
mods.atum.kiln.streamRecipes()
```
122 changes: 122 additions & 0 deletions docs/groovy-script/mods/atum/quern.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
---
title: "Quern"
titleTemplate: "Atum 2 | CleanroomMC"
description: "Converts an input item into an output itemstack after a given number of rotations, which are done via a player right clicking the Quern."
source_code_link: "https://github.com/CleanroomMC/GroovyScript/blob/master/src/main/java/com/cleanroommc/groovyscript/compat/mods/atum/Quern.java"
---

# Quern (Atum 2)

## Description

Converts an input item into an output itemstack after a given number of rotations, which are done via a player right clicking the Quern.

## Identifier

Refer to this via any of the following:

```groovy:no-line-numbers {1}
mods.atum.quern/* Used as page default */ // [!code focus]
mods.atum.Quern
```


## Adding Recipes

### Recipe Builder

Just like other recipe types, the Quern also uses a recipe builder.

Don't know what a builder is? Check [the builder info page](../../getting_started/builder.md) out.

:::::::::: details mods.atum.quern.recipeBuilder() {open id="abstract"}
- `ResourceLocation`. Sets the Resource Location of the recipe.

```groovy:no-line-numbers
name(String)
name(ResourceLocation)
```
- `IngredientList<IIngredient>`. Sets the item inputs of the recipe. Requires exactly 1.
```groovy:no-line-numbers
input(IIngredient)
input(IIngredient...)
input(Collection<IIngredient>)
```
- `ItemStackList`. Sets the item outputs of the recipe. Requires exactly 1.
```groovy:no-line-numbers
output(ItemStack)
output(ItemStack...)
output(Collection<ItemStack>)
```
- `int`. Sets the amount of rotation required to convert the input into the output. Requires greater than 0. (Default `0`).
```groovy:no-line-numbers
rotations(int)
```
- First validates the builder, returning `null` and outputting errors to the log file if the validation failed, then registers the builder and returns the registered object. (returns `null` or `com.teammetallurgy.atum.api.recipe.quern.IQuernRecipe`).
```groovy:no-line-numbers
register()
```
::::::::: details Example {open id="example"}
```groovy:no-line-numbers
mods.atum.quern.recipeBuilder()
.input(item('minecraft:diamond'))
.output(item('minecraft:clay'))
.rotations(1)
.register()
mods.atum.quern.recipeBuilder()
.input(item('minecraft:gold_ingot'))
.output(item('minecraft:clay') * 4)
.rotations(5)
.register()
```

:::::::::

::::::::::

## Removing Recipes

- Removes all recipes that match the given input:

```groovy:no-line-numbers
mods.atum.quern.removeByInput(IIngredient)
```
- Removes all recipes that match the given output:
```groovy:no-line-numbers
mods.atum.quern.removeByOutput(IIngredient)
```
- Removes all registered recipes:
```groovy:no-line-numbers
mods.atum.quern.removeAll()
```
:::::::::: details Example {open id="example"}
```groovy:no-line-numbers
mods.atum.quern.removeByInput(item('minecraft:blaze_rod'))
mods.atum.quern.removeByOutput(item('minecraft:sugar'))
mods.atum.quern.removeAll()
```

::::::::::

## Getting the value of recipes

- Iterates through every entry in the registry, with the ability to call remove on any element to remove it:

```groovy:no-line-numbers
mods.atum.quern.streamRecipes()
```
Loading

0 comments on commit 172cf3f

Please sign in to comment.