规范化指示器配方

This commit is contained in:
17146 2025-07-12 20:43:41 +08:00 committed by Light_Quanta
parent 9a66a45981
commit 7effc4f889
No known key found for this signature in database
GPG key ID: 11A39A1B8C890959
5 changed files with 85 additions and 9 deletions

View file

@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"criteria": {
"has_spyglass": {
"conditions": {
"items": [
{
"items": "minecraft:spyglass"
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_the_recipe": {
"conditions": {
"recipe": "superbwarfare:artillery_indicator"
},
"trigger": "minecraft:recipe_unlocked"
}
},
"requirements": [
[
"has_the_recipe",
"has_spyglass"
]
],
"rewards": {
"recipes": [
"superbwarfare:artillery_indicator"
]
}
}

View file

@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"criteria": {
"has_artillery_indicator": {
"conditions": {
"items": [
{
"items": "superbwarfare:artillery_indicator"
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_the_recipe": {
"conditions": {
"recipe": "superbwarfare:artillery_indicator_clear"
},
"trigger": "minecraft:recipe_unlocked"
}
},
"requirements": [
[
"has_the_recipe",
"has_artillery_indicator"
]
],
"rewards": {
"recipes": [
"superbwarfare:artillery_indicator_clear"
]
}
}

View file

@ -1,10 +1,6 @@
{
"type": "minecraft:crafting_shaped",
"category": "misc",
"pattern": [
" b ",
"aca"
],
"key": {
"a": {
"item": "minecraft:spyglass"
@ -16,8 +12,12 @@
"item": "superbwarfare:firing_parameters"
}
},
"pattern": [
" b ",
"aca"
],
"result": {
"id": "superbwarfare:artillery_indicator",
"count": 1
"count": 1,
"id": "superbwarfare:artillery_indicator"
}
}

View file

@ -7,7 +7,7 @@
}
],
"result": {
"id": "superbwarfare:artillery_indicator",
"count": 1
"count": 1,
"id": "superbwarfare:artillery_indicator"
}
}

View file

@ -52,7 +52,19 @@ public class ModRecipeProvider extends RecipeProvider {
generateMaterialPackRecipe(writer, ModItems.CEMENTED_CARBIDE_MATERIALS, ModItems.EPIC_MATERIAL_PACK.get());
generateMaterialPackRecipe(writer, ModItems.NETHERITE_MATERIALS, ModItems.LEGENDARY_MATERIAL_PACK.get());
// 钢管
ShapedRecipeBuilder.shaped(RecipeCategory.MISC, ModItems.ARTILLERY_INDICATOR.get())
.pattern(" b ")
.pattern("aca")
.define('a', Items.SPYGLASS)
.define('b', ModItems.MONITOR.get())
.define('c', ModItems.FIRING_PARAMETERS.get())
.unlockedBy(getHasName(Items.SPYGLASS), has(Items.SPYGLASS))
.save(writer, Mod.loc(getItemName(ModItems.ARTILLERY_INDICATOR.get())));
ShapelessRecipeBuilder.shapeless(RecipeCategory.MISC, ModItems.ARTILLERY_INDICATOR.get())
.requires(ModItems.ARTILLERY_INDICATOR.get())
.unlockedBy(getHasName(ModItems.ARTILLERY_INDICATOR.get()), has(ModItems.ARTILLERY_INDICATOR.get()))
.save(writer, Mod.loc(getItemName(ModItems.ARTILLERY_INDICATOR.get()) + "_clear"));
ShapedRecipeBuilder.shaped(RecipeCategory.COMBAT, ModItems.STEEL_PIPE.get())
.pattern(" a")
.pattern("a ")