Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement custom crafting recipes as official JSON recipes #1053

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"parent": "minecraft:recipes/root",
"criteria": {
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "gm4_block_compressors:compressor"
}
},
"has_materials": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": [
"minecraft:purpur_block",
"minecraft:purpur_pillar",
"minecraft:piston",
"minecraft:obsidian"
]
}
]
}
}
},
"requirements": [
[
"has_the_recipe",
"has_materials"
]
],
"rewards": {
"recipes": [
"gm4_block_compressors:compressor"
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"type": "minecraft:crafting_shaped",
"category": "redstone",
"pattern": [
"IPI",
"pOp",
"CCC"
],
"key": {
"I": {
"item": "minecraft:iron_ingot"
},
"P": {
"item": "minecraft:purpur_block"
},
"p": {
"item": "minecraft:piston"
},
"O": {
"item": "minecraft:obsidian"
},
"C": {
"item": "minecraft:cobblestone"
}
},
"result": {
"id": "minecraft:player_head",
"components": {
"minecraft:custom_model_data": "block/block_compressor_full",
"minecraft:profile": "$block_compressor",
"minecraft:custom_data": "{gm4_machines:{id:'block_compressor'}}",
"minecraft:custom_name": "{\"translate\":\"block.gm4.block_compressor\",\"fallback\":\"Compressor\",\"color\":\"white\",\"italic\":false}"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"parent": "minecraft:recipes/root",
"criteria": {
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "gm4_boots_of_ostara:boots_of_ostara"
}
},
"has_materials": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": [
"minecraft:leather_boots",
"minecraft:moss_block",
"minecraft:grass_block"
]
}
]
}
}
},
"requirements": [
[
"has_the_recipe",
"has_materials"
]
],
"rewards": {
"recipes": [
"gm4_boots_of_ostara:boots_of_ostara"
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"type": "minecraft:crafting_shaped",
"category": "equipment",
"pattern": [
" S ",
"MLG",
" W "
],
"key": {
"S": {
"item": "minecraft:wheat_seeds"
},
"M": {
"item": "minecraft:moss_block"
},
"L": {
"item": "minecraft:leather_boots"
},
"G": {
"item": "minecraft:grass_block"
},
"W": {
"item": "minecraft:water_bucket"
}
},
"result": {
"id": "minecraft:leather_boots",
"components": {
"minecraft:dyed_color": {
"rgb": 3705899,
"show_in_tooltip": false
},
"minecraft:custom_model_data": "item/boots_of_ostara",
"minecraft:custom_data": "{gm4_boots_of_ostara:1b}",
"minecraft:custom_name": "{\"translate\": \"item.gm4.boots_of_ostara\",\"fallback\": \"Boots of Ostara\",\"italic\": false}",
"minecraft:lore": [
"{\"translate\":\"item.gm4.boots_of_ostara.lore\",\"fallback\":\"Brings abundance beneath you!\",\"color\":\"dark_gray\",\"italic\":false}"
]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"parent": "minecraft:recipes/root",
"criteria": {
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "gm4_disassemblers:disassembler"
}
},
"has_materials": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": [
"minecraft:tnt",
"minecraft:stonecutter",
"minecraft:obsidian"
]
}
]
}
}
},
"requirements": [
[
"has_the_recipe",
"has_materials"
]
],
"rewards": {
"recipes": [
"gm4_disassemblers:disassembler"
]
}
}
35 changes: 35 additions & 0 deletions gm4_disassemblers/data/gm4_disassemblers/recipe/disassembler.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"type": "minecraft:crafting_shaped",
"category": "redstone",
"pattern": [
"ITI",
"OSO",
"CCC"
],
"key": {
"I": {
"item": "minecraft:iron_ingot"
},
"T": {
"item": "minecraft:tnt"
},
"O": {
"item": "minecraft:obsidian"
},
"S": {
"item": "minecraft:stonecutter"
},
"C": {
"item": "minecraft:cobblestone"
}
},
"result": {
"id": "minecraft:player_head",
"components": {
"minecraft:custom_model_data": "item/disassembler",
"minecraft:profile": "$disassembler",
"minecraft:custom_data": "{gm4_machines:{id:'disassembler'}}",
"minecraft:custom_name": "{\"translate\":\"block.gm4.disassembler\",\"fallback\":\"Disassembler\",\"color\":\"white\",\"italic\":false}"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"parent": "minecraft:recipes/root",
"criteria": {
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "gm4_enchantment_extractors:enchantment_extractor"
}
},
"has_materials": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": [
"minecraft:enchanting_table",
"minecraft:grindstone"
]
}
]
}
}
},
"requirements": [
[
"has_the_recipe",
"has_materials"
]
],
"rewards": {
"recipes": [
"gm4_enchantment_extractors:enchantment_extractor"
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"type": "minecraft:crafting_shaped",
"category": "redstone",
"pattern": [
" E ",
"GgG",
"CCC"
],
"key": {
"E": {
"item": "minecraft:enchanting_table"
},
"G": {
"item": "minecraft:gold_ingot"
},
"g": {
"item": "minecraft:grindstone"
},
"C": {
"item": "minecraft:cobblestone"
}
},
"result": {
"id": "minecraft:player_head",
"components": {
"minecraft:custom_model_data": "item/enchantment_extractor",
"minecraft:profile": "$enchantment_extractor",
"minecraft:custom_data": "{gm4_machines:{id:'enchantment_extractor'}}",
"minecraft:custom_name": "{\"translate\":\"block.gm4.enchantment_extractor\",\"fallback\":\"Enchantment Extractor\",\"color\":\"white\",\"italic\":false}"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"parent": "minecraft:recipes/root",
"criteria": {
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "gm4_ender_hoppers:ender_hopper"
}
},
"has_the_minecart_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "gm4_ender_hoppers:ender_hopper_minecart"
}
},
"has_materials": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": [
"minecraft:ender_eye",
"minecraft:respawn_anchor",
"minecraft:hopper"
]
}
]
}
}
},
"requirements": [
[
"has_the_recipe",
"has_the_minecart_recipe",
"has_materials"
]
],
"rewards": {
"recipes": [
"gm4_ender_hoppers:ender_hopper",
"gm4_ender_hoppers:ender_hopper_minecart"
]
}
}
29 changes: 29 additions & 0 deletions gm4_ender_hoppers/data/gm4_ender_hoppers/recipe/ender_hopper.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"type": "minecraft:crafting_shaped",
"category": "redstone",
"pattern": [
"E",
"R",
"H"
],
"key": {
"E": {
"item": "minecraft:ender_eye"
},
"R": {
"item": "minecraft:respawn_anchor"
},
"H": {
"item": "minecraft:hopper"
}
},
"result": {
"id": "minecraft:player_head",
"components": {
"minecraft:custom_model_data": "item/ender_hopper",
"minecraft:profile": "$ender_hopper",
"minecraft:custom_data": "{gm4_machines:{id:'ender_hopper'}}",
"minecraft:custom_name": "{\"translate\":\"block.gm4.ender_hopper\",\"fallback\":\"Ender Hopper\",\"color\":\"white\",\"italic\":false}"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"type": "minecraft:crafting_shaped",
"category": "redstone",
"pattern": [
"E",
"R",
"H"
],
"key": {
"E": {
"item": "minecraft:ender_eye"
},
"R": {
"item": "minecraft:respawn_anchor"
},
"H": {
"item": "minecraft:hopper_minecart"
}
},
"result": {
"id": "minecraft:hopper_minecart",
"components": {
"minecraft:custom_model_data": "item/ender_hopper_minecart",
"minecraft:custom_data": "{gm4_machines:{id:'ender_hopper_minecart'}}",
"minecraft:custom_name": "{\"translate\":\"item.gm4.ender_hopper_minecart\",\"fallback\":\"Minecart with Ender Hopper\",\"color\":\"white\",\"italic\":false}"
}
}
}
Loading
Loading