Skip to content

Commit 287dbf7

Browse files
committed
Add Copper Plate Recipe
1 parent d502b1c commit 287dbf7

File tree

3 files changed

+67
-0
lines changed

3 files changed

+67
-0
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"parent": "minecraft:recipes/root",
3+
"criteria": {
4+
"has_copper_ingot": {
5+
"conditions": {
6+
"items": [
7+
{
8+
"items": [
9+
"minecraft:copper_ingot"
10+
]
11+
}
12+
]
13+
},
14+
"trigger": "minecraft:inventory_changed"
15+
},
16+
"has_the_recipe": {
17+
"conditions": {
18+
"recipe": "generations_core:copper_plate"
19+
},
20+
"trigger": "minecraft:recipe_unlocked"
21+
}
22+
},
23+
"requirements": [
24+
[
25+
"has_copper_ingot",
26+
"has_the_recipe"
27+
]
28+
],
29+
"rewards": {
30+
"recipes": [
31+
"generations_core:copper_plate"
32+
]
33+
},
34+
"sends_telemetry_event": false
35+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"type": "minecraft:crafting_shaped",
3+
"category": "misc",
4+
"key": {
5+
"#": {
6+
"item": "minecraft:copper_ingot"
7+
},
8+
"X": {
9+
"item": "minecraft:iron_nugget"
10+
}
11+
},
12+
"pattern": [
13+
"X#X",
14+
"###",
15+
"X#X"
16+
],
17+
"result": {
18+
"item": "generations_core:copper_plate"
19+
},
20+
"show_notification": true
21+
}

forge/src/main/java/generations/gg/generations/core/generationscore/forge/datagen/generators/recipe/ItemRecipeDatagen.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import net.minecraft.data.recipes.FinishedRecipe;
66
import net.minecraft.data.recipes.RecipeCategory;
77
import net.minecraft.data.recipes.ShapedRecipeBuilder;
8+
import net.minecraft.world.item.Items;
89
import net.minecraftforge.common.crafting.conditions.IConditionBuilder;
910
import org.jetbrains.annotations.NotNull;
1011

@@ -30,6 +31,16 @@ protected void buildRecipes(@NotNull Consumer<FinishedRecipe> consumer) {
3031
.pattern("##")
3132
.unlockedBy(getHasName(GenerationsItems.ENIGMA_FRAGMENT.get()), has(GenerationsItems.ENIGMA_FRAGMENT.get()))
3233
.save(consumer);
34+
35+
ShapedRecipeBuilder.shaped(RecipeCategory.MISC, GenerationsItems.COPPER_PLATE.get())
36+
.define('#', Items.COPPER_INGOT)
37+
.define('X', Items.IRON_NUGGET)
38+
.pattern("X#X")
39+
.pattern("###")
40+
.pattern("X#X")
41+
.unlockedBy(getHasName(Items.COPPER_INGOT), has(Items.COPPER_INGOT))
42+
.save(consumer);
43+
3344
//These are all HeldItems and Recipes are not needed rn
3445
/*
3546
ShapedRecipeBuilder.shaped(RecipeCategory.MISC, PokeModItems.CELL_BATTERY.get())

0 commit comments

Comments
 (0)