-
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.
* feat: Added documentation for AcademyCraft-UEL * fix some unnecessary changes * fix comments * add recipe builder documentation * update documentation according to changed code * improve sorting of documentation
- Loading branch information
Showing
4 changed files
with
364 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,140 @@ | ||
--- | ||
title: "Imag Fusor" | ||
titleTemplate: "AcademyCraft | CleanroomMC" | ||
description: "Converts one item and defined amount of Imag Phase Liquid into one item." | ||
source_code_link: "https://github.com/yor42/AcademyCraft/blob/master/src/main/java/cn/academy/support/groovyscript/modules/ImagFusor.java" | ||
--- | ||
|
||
# Imag Fusor (AcademyCraft) | ||
|
||
## Description | ||
|
||
Converts one item and defined amount of Imag Phase Liquid into one item. | ||
|
||
## Identifier | ||
|
||
Refer to this via any of the following: | ||
|
||
```groovy:no-line-numbers {1} | ||
mods.academy.imag_fusor/* Used as page default */ // [!code focus] | ||
mods.academy.imagfusor | ||
mods.academy.imagFusor | ||
mods.academy.ImagFusor | ||
``` | ||
|
||
|
||
## Adding Recipes | ||
|
||
- Add the given recipe to the recipe list: | ||
|
||
```groovy:no-line-numbers | ||
mods.academy.imag_fusor.add(ImagFusorRecipes.IFRecipe) | ||
``` | ||
- Adds recipes in the format `output`, `input`, `amount of Imag Phase Liquid`: | ||
```groovy:no-line-numbers | ||
mods.academy.imag_fusor.addRecipe(ItemStack, IIngredient, int) | ||
``` | ||
:::::::::: details Example {open id="example"} | ||
```groovy:no-line-numbers | ||
mods.academy.imag_fusor.addRecipe(item('academy:crystal_normal'), item('academy:crystal_low'), 3000) | ||
``` | ||
|
||
:::::::::: | ||
|
||
### Recipe Builder | ||
|
||
Just like other recipe types, the Imag Fusor also uses a recipe builder. | ||
|
||
Don't know what a builder is? Check [the builder info page](../../getting_started/builder.md) out. | ||
|
||
:::::::::: details mods.academy.imag_fusor.recipeBuilder() {open id="abstract"} | ||
- `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`. Amount of Imag Phase Liquid consumed for this recipe. Requires greater than 0. (Default `1000`). | ||
```groovy:no-line-numbers | ||
fluid(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 `cn.academy.crafting.ImagFusorRecipes$IFRecipe`). | ||
```groovy:no-line-numbers | ||
register() | ||
``` | ||
::::::::: details Example {open id="example"} | ||
```groovy:no-line-numbers | ||
mods.academy.imag_fusor.recipeBuilder() | ||
.input(item('minecraft:clay')) | ||
.output(item('minecraft:diamond')) | ||
.fluid(1000) | ||
.register() | ||
mods.academy.imag_fusor.recipeBuilder() | ||
.input(item('minecraft:clay')) | ||
.output(item('minecraft:diamond')) | ||
.fluid(3000) | ||
.register() | ||
mods.academy.imag_fusor.recipeBuilder() | ||
.input(item('minecraft:gold_ingot')) | ||
.output(item('minecraft:clay') * 2) | ||
.register() | ||
``` | ||
|
||
::::::::: | ||
|
||
:::::::::: | ||
|
||
## Removing Recipes | ||
|
||
- Removes the given recipe from the recipe list: | ||
|
||
```groovy:no-line-numbers | ||
mods.academy.imag_fusor.remove(ImagFusorRecipes.IFRecipe) | ||
``` | ||
- Removes an entry matching the given `ItemStack`: | ||
```groovy:no-line-numbers | ||
mods.academy.imag_fusor.removeByInput(ItemStack) | ||
``` | ||
- Removes all registered recipes: | ||
```groovy:no-line-numbers | ||
mods.academy.imag_fusor.removeAll() | ||
``` | ||
:::::::::: details Example {open id="example"} | ||
```groovy:no-line-numbers | ||
mods.academy.imag_fusor.removeByInput(item('academy:crystal_normal')) | ||
mods.academy.imag_fusor.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.academy.imag_fusor.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,15 @@ | ||
--- | ||
aside: false | ||
--- | ||
|
||
|
||
# AcademyCraft | ||
|
||
## Categories | ||
|
||
Has 2 subcategories. | ||
|
||
* [Imag Fusor](./imag_fusor.md) | ||
|
||
* [Metal Former](./metal_former.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,208 @@ | ||
--- | ||
title: "Metal Former" | ||
titleTemplate: "AcademyCraft | CleanroomMC" | ||
description: "Converts an item into another item, according to the mode of the machine." | ||
source_code_link: "https://github.com/yor42/AcademyCraft/blob/master/src/main/java/cn/academy/support/groovyscript/modules/MetalFormer.java" | ||
--- | ||
|
||
# Metal Former (AcademyCraft) | ||
|
||
## Description | ||
|
||
Converts an item into another item, according to the mode of the machine. | ||
|
||
## Identifier | ||
|
||
Refer to this via any of the following: | ||
|
||
```groovy:no-line-numbers {1} | ||
mods.academy.metal_former/* Used as page default */ // [!code focus] | ||
mods.academy.metalformer | ||
mods.academy.metalFormer | ||
mods.academy.MetalFormer | ||
``` | ||
|
||
|
||
## Adding Recipes | ||
|
||
- Adds etching recipes in the format `input`, `output`: | ||
|
||
```groovy:no-line-numbers | ||
mods.academy.metal_former.addEtchRecipe(IIngredient, ItemStack) | ||
``` | ||
- Adds incising recipes in the format `input`, `output`: | ||
```groovy:no-line-numbers | ||
mods.academy.metal_former.addInciseRecipe(IIngredient, ItemStack) | ||
``` | ||
- Adds plating recipes in the format `input`, `output`: | ||
```groovy:no-line-numbers | ||
mods.academy.metal_former.addPlateRecipe(IIngredient, ItemStack) | ||
``` | ||
- Adds refining recipes in the format `input`, `output`: | ||
```groovy:no-line-numbers | ||
mods.academy.metal_former.addRefineRecipe(IIngredient, ItemStack) | ||
``` | ||
:::::::::: details Example {open id="example"} | ||
```groovy:no-line-numbers | ||
mods.academy.metal_former.addEtchRecipe(item('minecraft:stonebrick'), item('minecraft:stonebrick', 3)) | ||
mods.academy.metal_former.addInciseRecipe(item('minecraft:cobblestone'), item('minecraft:stone_slab', 3)) | ||
mods.academy.metal_former.addPlateRecipe(ore('ingotIron'), item('academy:reinforced_iron_plate')) | ||
mods.academy.metal_former.addRefineRecipe(ore('oreDiamond'), item('minecraft:diamond') * 64) | ||
``` | ||
|
||
:::::::::: | ||
|
||
### Recipe Builder | ||
|
||
Just like other recipe types, the Metal Former also uses a recipe builder. | ||
|
||
Don't know what a builder is? Check [the builder info page](../../getting_started/builder.md) out. | ||
|
||
:::::::::: details mods.academy.metal_former.recipeBuilder() {open id="abstract"} | ||
- `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>) | ||
``` | ||
- `TileMetalFormer.Mode`. Working mode of Metal former required for this recipe. Requires not null. (Default `ETCH`). | ||
```groovy:no-line-numbers | ||
etch() | ||
plate() | ||
incise() | ||
refine() | ||
mode(TileMetalFormer.Mode) | ||
``` | ||
- 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 `cn.academy.crafting.MetalFormerRecipes$RecipeObject`). | ||
```groovy:no-line-numbers | ||
register() | ||
``` | ||
::::::::: details Example {open id="example"} | ||
```groovy:no-line-numbers | ||
mods.academy.metal_former.recipeBuilder() | ||
.input(item('minecraft:clay')) | ||
.output(item('minecraft:diamond')) | ||
.refine() | ||
.register() | ||
mods.academy.metal_former.recipeBuilder() | ||
.input(item('minecraft:clay')) | ||
.output(item('minecraft:diamond')) | ||
.incise() | ||
.register() | ||
mods.academy.metal_former.recipeBuilder() | ||
.input(item('minecraft:gold_ingot')) | ||
.output(item('minecraft:clay') * 2) | ||
.register() | ||
``` | ||
|
||
::::::::: | ||
|
||
:::::::::: | ||
|
||
## Removing Recipes | ||
|
||
- Removes the given recipe from the recipe list: | ||
|
||
```groovy:no-line-numbers | ||
mods.academy.metal_former.remove(MetalFormerRecipes.RecipeObject) | ||
``` | ||
- Removes an entry matching the given `ItemStack` from etching recipes: | ||
```groovy:no-line-numbers | ||
mods.academy.metal_former.removeEtchByInput(IIngredient) | ||
``` | ||
- Removes an entry matching the given `ItemStack` from incise recipes: | ||
```groovy:no-line-numbers | ||
mods.academy.metal_former.removeInciseByInput(IIngredient) | ||
``` | ||
- Removes an entry matching the given `ItemStack` from plate recipes: | ||
```groovy:no-line-numbers | ||
mods.academy.metal_former.removePlateByInput(IIngredient) | ||
``` | ||
- Removes an entry matching the given `ItemStack` from refine recipes: | ||
```groovy:no-line-numbers | ||
mods.academy.metal_former.removeRefineByInput(IIngredient) | ||
``` | ||
- Removes all registered recipes: | ||
```groovy:no-line-numbers | ||
mods.academy.metal_former.removeAll() | ||
``` | ||
- Removes all etching entry of metal former: | ||
```groovy:no-line-numbers | ||
mods.academy.metal_former.removeAllEtch() | ||
``` | ||
- Removes all incising entry of metal former: | ||
```groovy:no-line-numbers | ||
mods.academy.metal_former.removeAllIncise() | ||
``` | ||
- Removes all plating entry of metal former: | ||
```groovy:no-line-numbers | ||
mods.academy.metal_former.removeAllPlate() | ||
``` | ||
- Removes all refining entry of metal former: | ||
```groovy:no-line-numbers | ||
mods.academy.metal_former.removeAllRefine() | ||
``` | ||
:::::::::: details Example {open id="example"} | ||
```groovy:no-line-numbers | ||
mods.academy.metal_former.removeEtchByInput(ore('oreDiamond')) | ||
mods.academy.metal_former.removeInciseByInput(ore('oreDiamond')) | ||
mods.academy.metal_former.removePlateByInput(ore('oreDiamond')) | ||
mods.academy.metal_former.removeRefineByInput(ore('oreDiamond')) | ||
mods.academy.metal_former.removeAll() | ||
mods.academy.metal_former.removeAllEtch() | ||
mods.academy.metal_former.removeAllIncise() | ||
mods.academy.metal_former.removeAllPlate() | ||
mods.academy.metal_former.removeAllRefine() | ||
``` | ||
|
||
:::::::::: | ||
|
||
## 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.academy.metal_former.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