-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update docs for GroovyScript 1.1.2 (#18)
* update docs for GroovyScript 1.1.2 * remove duplicate punctuation from generation * fix kiln failureOutput lang key
- Loading branch information
1 parent
be39365
commit 172cf3f
Showing
80 changed files
with
2,305 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() | ||
``` |
Oops, something went wrong.