Skip to content

Commit

Permalink
feat: Added documentation for Abyssal Tweaker (#25)
Browse files Browse the repository at this point in the history
* gs: added abyssaltweaker docs

* improved some things
  • Loading branch information
Wizzerinus authored Oct 24, 2024
1 parent c515659 commit 3c501df
Show file tree
Hide file tree
Showing 7 changed files with 620 additions and 0 deletions.
109 changes: 109 additions & 0 deletions docs/groovy-script/mods/abyssaltweaker/crystallization.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
---
title: "Crystallization"
titleTemplate: "Abyssal Tweaker | CleanroomMC"
description: "Converts an input ItemStack into one or two ItemStacks, consuming Crystallizer fuel."
source_code_link: "https://github.com/TeamDimensional/AbyssalTweaker/blob/master/src/main/java/com/teamdimensional/abyssaltweaker/compat/groovyscript/RegistryCrystallization.java"
---

# Crystallization (Abyssal Tweaker)

## Description

Converts an input ItemStack into one or two ItemStacks, consuming Crystallizer fuel.

## Identifier

Refer to this via any of the following:

```groovy:no-line-numbers {1}
mods.abyssaltweaker.crystallization/* Used as page default */ // [!code focus]
mods.abyssaltweaker.Crystallization
```


## Adding Recipes

### Recipe Builder

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

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

:::::::::: details mods.abyssaltweaker.crystallization.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 greater than or equal to 1 and less than or equal to 2.
```groovy:no-line-numbers
output(ItemStack)
output(ItemStack...)
output(Collection<ItemStack>)
```
- `float`. Sets the XP amount output that is given out when the recipe is executed. Requires greater than or equal to 0. (Default `0.0f`).
```groovy:no-line-numbers
xp(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.shinoow.abyssalcraft.api.recipe.Crystallization`).
```groovy:no-line-numbers
register()
```
::::::::: details Example {open id="example"}
```groovy:no-line-numbers
mods.abyssaltweaker.crystallization.recipeBuilder()
.input(item('minecraft:clay'))
.output(item('minecraft:diamond'))
.xp(0.5)
.register()
```

:::::::::

::::::::::

## Removing Recipes

- Removes all recipes that match the given input:

```groovy:no-line-numbers
mods.abyssaltweaker.crystallization.removeByInput(IIngredient)
```
- Removes all recipes that match the given output:
```groovy:no-line-numbers
mods.abyssaltweaker.crystallization.removeByOutput(IIngredient)
```
- Removes all registered recipes:
```groovy:no-line-numbers
mods.abyssaltweaker.crystallization.removeAll()
```
:::::::::: details Example {open id="example"}
```groovy:no-line-numbers
mods.abyssaltweaker.crystallization.removeByInput(item('minecraft:blaze_powder'))
mods.abyssaltweaker.crystallization.removeByOutput(item('abyssalcraft:copper_crystal'))
mods.abyssaltweaker.crystallization.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.abyssaltweaker.crystallization.streamRecipes()
```
66 changes: 66 additions & 0 deletions docs/groovy-script/mods/abyssaltweaker/fuel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
---
title: "Fuel"
titleTemplate: "Abyssal Tweaker | CleanroomMC"
description: "Allows configuring the items that can be used as Transmutator and/or Crystallizer fuels."
source_code_link: "https://github.com/TeamDimensional/AbyssalTweaker/blob/master/src/main/java/com/teamdimensional/abyssaltweaker/compat/groovyscript/Fuel.java"
---

# Fuel (Abyssal Tweaker)

## Description

Allows configuring the items that can be used as Transmutator and/or Crystallizer fuels.

## Identifier

Refer to this via any of the following:

```groovy:no-line-numbers {1}
mods.abyssaltweaker.fuel/* Used as page default */ // [!code focus]
mods.abyssaltweaker.Fuel
```


## Adding Entries

- Adds a Crystallizer fuel:

```groovy:no-line-numbers
mods.abyssaltweaker.fuel.addCrystallizer(IIngredient, int)
```
- Adds a Transmutator fuel:
```groovy:no-line-numbers
mods.abyssaltweaker.fuel.addTransmutator(IIngredient, int)
```
:::::::::: details Example {open id="example"}
```groovy:no-line-numbers
mods.abyssaltweaker.fuel.addCrystallizer(item('minecraft:stone'), 50)
mods.abyssaltweaker.fuel.addTransmutator(item('minecraft:cobblestone'), 50)
```

::::::::::

## Removing Entries

- Removes a Crystallizer fuel:

```groovy:no-line-numbers
mods.abyssaltweaker.fuel.removeCrystallizer(IIngredient)
```
- Removes a Transmutator fuel:
```groovy:no-line-numbers
mods.abyssaltweaker.fuel.removeTransmutator(IIngredient)
```
:::::::::: details Example {open id="example"}
```groovy:no-line-numbers
mods.abyssaltweaker.fuel.removeCrystallizer(item('abyssalcraft:dreadshard'))
mods.abyssaltweaker.fuel.removeTransmutator(item('minecraft:blaze_rod'))
```

::::::::::
21 changes: 21 additions & 0 deletions docs/groovy-script/mods/abyssaltweaker/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
aside: false
---


# Abyssal Tweaker

## Categories

Has 5 subcategories.

* [Crystallization](./crystallization.md)

* [Fuel](./fuel.md)

* [Materialization](./materialization.md)

* [Necronomicon Ritual](./ritual.md)

* [Transmutation](./transmutation.md)

106 changes: 106 additions & 0 deletions docs/groovy-script/mods/abyssaltweaker/materialization.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
---
title: "Materialization"
titleTemplate: "Abyssal Tweaker | CleanroomMC"
description: "Turns Crystals from a Crystal Bag into an output item."
source_code_link: "https://github.com/TeamDimensional/AbyssalTweaker/blob/master/src/main/java/com/teamdimensional/abyssaltweaker/compat/groovyscript/RegistryMaterialization.java"
---

# Materialization (Abyssal Tweaker)

## Description

Turns Crystals from a Crystal Bag into an output item.

:::::::::: details Warning {open id="warning"}
The Materializer compatibility requires that all input items are Abyssalcraft crystals. This is checked via looking at the first entry of getMatchingStacks, which is then used as the input item. This means the IIngredient used should be obtained via the item Object Mapper.
::::::::::

## Identifier

Refer to this via any of the following:

```groovy:no-line-numbers {1}
mods.abyssaltweaker.materialization/* Used as page default */ // [!code focus]
mods.abyssaltweaker.Materialization
```


## Adding Recipes

### Recipe Builder

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

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

:::::::::: details mods.abyssaltweaker.materialization.recipeBuilder() {open id="abstract"}
- `IngredientList<IIngredient>`. Sets the item inputs of the recipe. Requires greater than or equal to 1 and less than or equal to 5.

```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>)
```
- 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.shinoow.abyssalcraft.api.recipe.Materialization`).
```groovy:no-line-numbers
register()
```
::::::::: details Example {open id="example"}
```groovy:no-line-numbers
mods.abyssaltweaker.materialization.recipeBuilder()
.input(item('abyssalcraft:coralium_crystal'))
.output(item('minecraft:diamond'))
.register()
```

:::::::::

::::::::::

## Removing Recipes

- Removes all recipes that match the given input:

```groovy:no-line-numbers
mods.abyssaltweaker.materialization.removeByInput(IIngredient)
```
- Removes all recipes that match the given output:
```groovy:no-line-numbers
mods.abyssaltweaker.materialization.removeByOutput(IIngredient)
```
- Removes all registered recipes:
```groovy:no-line-numbers
mods.abyssaltweaker.materialization.removeAll()
```
:::::::::: details Example {open id="example"}
```groovy:no-line-numbers
mods.abyssaltweaker.materialization.removeByInput(item('abyssalcraft:phosphorus_crystal'))
mods.abyssaltweaker.materialization.removeByOutput(item('minecraft:bone'))
mods.abyssaltweaker.materialization.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.abyssaltweaker.materialization.streamRecipes()
```
Loading

0 comments on commit 3c501df

Please sign in to comment.