Skip to content

Commit

Permalink
GrS docs for my fork of Pedestal Crafting (#30)
Browse files Browse the repository at this point in the history
* added GrS docs for my PedestalCrafting fork

* added GrS docs for my PedestalCrafting fork

* changes requested by WaitingIdly

* changes requested by WaitingIdly v2

* changes requested by WaitingIdly v3 + reflecting changes made in v1.2.0
  • Loading branch information
MasterEnderman authored Jan 21, 2025
1 parent 83f522b commit de0bad7
Show file tree
Hide file tree
Showing 3 changed files with 193 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/groovy-script/mods/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ search:
* [Modern Warfare Cubed](./mwc/)
* [Mystical Agriculture](./mysticalagriculture/)
* [Nature's Aura](./naturesaura/)
* [Pedestal Crafting - Patched](./pedestalcrafting/)
* [PneumaticCraft: Repressurized](./pneumaticcraft/)
* [Primal Tech](./primal_tech/)
* [Prodigy Tech](./prodigytech/)
Expand Down
13 changes: 13 additions & 0 deletions docs/groovy-script/mods/pedestalcrafting/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
aside: false
---


# Pedestal Crafting

## Categories

Has 1 subcategories.

* [Pedestal Crafting](./pedestal_crafting.md)

179 changes: 179 additions & 0 deletions docs/groovy-script/mods/pedestalcrafting/pedestal_crafting.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,179 @@
---
title: "Pedestal Crafting"
titleTemplate: "Pedestal Crafting | CleanroomMC"
description: "Converts a center item into a single output item. Additional inputs can be placed on pedestals around the core. The crafting time as well as the particles that show during or after finishing a recipe can be customized."
source_code_link: "https://github.com/Ender-Development/PedestalCrafting-Patched/blob/master/src/main/java/me/axieum/mcmod/pedestalcrafting/compat/groovyscript/PedestalCrafting.java"
---

# Pedestal Crafting (Pedestal Crafting)

## Description

Converts a center item into a single output item. Additional inputs can be placed on pedestals around the core. The crafting time as well as the particles that show during or after finishing a recipe can be customized.

## Identifier

Refer to this via any of the following:

```groovy:no-line-numbers {1}
mods.pedestalcrafting.pedestal_crafting/* Used as page default */ // [!code focus]
mods.pedestalcrafting.pedestalcrafting
mods.pedestalcrafting.pedestalCrafting
mods.pedestalcrafting.PedestalCrafting
```


## Adding Recipes

### Recipe Builder

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

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

:::::::::: details mods.pedestalcrafting.pedestal_crafting.recipeBuilder() {open id="abstract"}
- `IngredientList<IIngredient>`. Sets the item inputs of the recipe. Requires greater than or equal to 0.

```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`. The number of ticks the recipe takes to complete. Requires greater than or equal to 0. (Default `0`).
```groovy:no-line-numbers
ticks(int)
```
- `IIngredient`. The center item that is used in the crafting process. Requires not null.
```groovy:no-line-numbers
center(IIngredient)
```
- `Map<EnumParticleTypes, Integer>`. Adds a particle effect to the crafting process. The first argument is the particle name, the second argument is the amount of the particles appearing. Names can be referenced from the [Minecraft Wiki](https://minecraft.wiki/w/Java_Edition_Flattening#Particle_IDs) or [DigMinecraft](https://www.digminecraft.com/lists/particle_list_pc_1_12.php).
```groovy:no-line-numbers
addCraftingParticle(String, int)
addCraftingParticle(EnumParticleTypes, int)
```
- `Map<EnumParticleTypes, Integer>`. Adds a particle effect that appears above the core after the crafting process is completed. The first argument is the particle name, the second argument is the amount of the particles appearing. Names can be referenced from the [Minecraft Wiki](https://minecraft.wiki/w/Java_Edition_Flattening#Particle_IDs) or [DigMinecraft](https://www.digminecraft.com/lists/particle_list_pc_1_12.php).
```groovy:no-line-numbers
addPostCraftCoreParticle(String, int)
addPostCraftCoreParticle(EnumParticleTypes, int)
```
- `Map<EnumParticleTypes, Integer>`. Adds a particle effect that appears above each pedestal after the crafting process is completed. The first argument is the particle name, the second argument is the amount of the particles appearing. Names can be referenced from the [Minecraft Wiki](https://minecraft.wiki/w/Java_Edition_Flattening#Particle_IDs) or [DigMinecraft](https://www.digminecraft.com/lists/particle_list_pc_1_12.php).
```groovy:no-line-numbers
addPostCraftPedestalParticle(String, int)
addPostCraftPedestalParticle(EnumParticleTypes, 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 `me.axieum.mcmod.pedestalcrafting.recipe.PedestalRecipe`).
```groovy:no-line-numbers
register()
```
::::::::: details Example {open id="example"}
```groovy:no-line-numbers
mods.pedestalcrafting.pedestal_crafting.recipeBuilder()
.center(item('minecraft:lava_bucket'))
.output(item('minecraft:obsidian'))
.ticks(100)
.register()
mods.pedestalcrafting.pedestal_crafting.recipeBuilder()
.center(ore('plankWood'))
.input(ore('stickWood'),item('minecraft:water_bucket'),ore('logWood'))
.output(item('minecraft:diamond'))
.ticks(100)
.register()
mods.pedestalcrafting.pedestal_crafting.recipeBuilder()
.center(ore('oreGold'))
.input(item('minecraft:chest'),item('minecraft:piston'))
.output(item('minecraft:emerald'))
.ticks(100)
.addCraftingParticle('fireworkSpark', 10)
.register()
mods.pedestalcrafting.pedestal_crafting.recipeBuilder()
.center(ore('oreDiamond'))
.input(item('minecraft:hopper'),item('minecraft:chest'))
.output(item('minecraft:stone'))
.ticks(100)
.addCraftingParticle('bubble', 10)
.addPostCraftCoreParticle('suspended', 10)
.register()
mods.pedestalcrafting.pedestal_crafting.recipeBuilder()
.center(ore('oreRedstone'))
.input(item('minecraft:cobblestone'), ore('ingotGold'))
.output(item('minecraft:redstone'))
.ticks(100)
.addCraftingParticle('instantSpell', 10)
.addPostCraftCoreParticle('dripLava', 10)
.addPostCraftPedestalParticle('portal', 10)
.register()
```

:::::::::

::::::::::

## Removing Recipes

- Removes all recipes where the center item matches the given input:

```groovy:no-line-numbers
mods.pedestalcrafting.pedestal_crafting.removeByCenter(IIngredient)
```
- Removes all recipes that match the given input:
```groovy:no-line-numbers
mods.pedestalcrafting.pedestal_crafting.removeByInput(IIngredient)
```
- Removes all recipes that match the given output:
```groovy:no-line-numbers
mods.pedestalcrafting.pedestal_crafting.removeByOutput(IIngredient)
```
- Removes all registered recipes:
```groovy:no-line-numbers
mods.pedestalcrafting.pedestal_crafting.removeAll()
```
:::::::::: details Example {open id="example"}
```groovy:no-line-numbers
mods.pedestalcrafting.pedestal_crafting.removeByCenter(item('minecraft:wool'))
mods.pedestalcrafting.pedestal_crafting.removeByInput(item('minecraft:redstone_block'))
mods.pedestalcrafting.pedestal_crafting.removeByOutput(item('minecraft:stick'))
mods.pedestalcrafting.pedestal_crafting.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.pedestalcrafting.pedestal_crafting.streamRecipes()
```

0 comments on commit de0bad7

Please sign in to comment.