添加部分材料配方生成

This commit is contained in:
17146 2025-06-13 23:42:42 +08:00 committed by Light_Quanta
parent 376e09efc3
commit 5721dba646
No known key found for this signature in database
GPG key ID: 11A39A1B8C890959
10 changed files with 199 additions and 32 deletions

View file

@ -1,4 +1,4 @@
// 1.21.1 2025-06-14T09:59:35.2332371 Recipes
// 1.21.1 2025-06-14T10:09:06.1391868 Recipes
9775e550332c69f1ee2ac4a09834a35db6f6a2ed data/minecraft/recipe/ammo_box_add_ammo.json
9775e550332c69f1ee2ac4a09834a35db6f6a2ed data/minecraft/recipe/ammo_box_extract_ammo.json
2e1d1bbf32801f3d355c0d3f78ebbb1122cebd4c data/minecraft/recipe/potion_mortar_shell.json
@ -51,6 +51,10 @@ cae0bca9d87ad212a3155135433ffe88f289c04c data/superbwarfare/advancement/recipes/
33a9d76154596be2ba7f9148323777a79b28006f data/superbwarfare/advancement/recipes/misc/hpj_11_blueprint.json
1d3b9163bb66cea057ba2fa6353746ffee6ef96d data/superbwarfare/advancement/recipes/misc/hunting_rifle_blueprint.json
65feefcd9f7b16e4e92f4f3c08abdc02e160ca1d data/superbwarfare/advancement/recipes/misc/insidious_blueprint.json
b02f31a3873ab6f7e5671cb96efee3d45b2551ea data/superbwarfare/advancement/recipes/misc/iron_action.json
9fbc930c1c30a8698b3fc539b81a868096ec07ff data/superbwarfare/advancement/recipes/misc/iron_barrel.json
fc44de15ff247fa3485514fe9243884a2abcff64 data/superbwarfare/advancement/recipes/misc/iron_spring.json
4762eab2a4224f4c31fff38f72d2a7c28fb05cbf data/superbwarfare/advancement/recipes/misc/iron_trigger.json
652b83a7987f1fa42d174f923e0905c53a20cda7 data/superbwarfare/advancement/recipes/misc/javelin_blueprint.json
899c04e1a22a41365129a5ca24348194f7dd4d88 data/superbwarfare/advancement/recipes/misc/k_98_blueprint.json
d481715aad2fc1fc01357103cb11ed201fc92dde data/superbwarfare/advancement/recipes/misc/m2hb_blueprint.json
@ -105,6 +109,10 @@ c591aecdf4b5bab7b206160c0c255470fb3d5684 data/superbwarfare/recipe/hunting_rifle
b725b8a8c4e4c1514df7a44610c4f03335561b01 data/superbwarfare/recipe/hunting_rifle_smithing.json
aff87a5a66e7aef395b08067339685954a0f4de2 data/superbwarfare/recipe/insidious_blueprint.json
576853e322953d229f056148612517e13e9784d0 data/superbwarfare/recipe/insidious_smithing.json
74c814ff68f4922c42dd4a96709efe2fb3d412ce data/superbwarfare/recipe/iron_action.json
5c23621c020772e896109526b8393306d2baa0bd data/superbwarfare/recipe/iron_barrel.json
edb663a08bf42112eb4663d4b51113d6ccb793bb data/superbwarfare/recipe/iron_spring.json
89545d43b69b24db587c98d4f673c35885ea1ee3 data/superbwarfare/recipe/iron_trigger.json
1fc1080eb1328b7a91445d083a5ea4bd6e0fdcb4 data/superbwarfare/recipe/javelin_blueprint.json
90d1f438dc8cc0dc26c49a943b84819607488585 data/superbwarfare/recipe/javelin_smithing.json
9ced791c2f2eeb19bab3b7826e05c936953974cc data/superbwarfare/recipe/k_98_blueprint.json

View file

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

View file

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

View file

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

View file

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

View file

@ -1,17 +1,17 @@
{
"type": "minecraft:crafting_shaped",
"category": "misc",
"pattern": [
"aaa",
" a"
],
"key": {
"a": {
"A": {
"item": "minecraft:iron_ingot"
}
},
"pattern": [
"AAA",
" A"
],
"result": {
"id": "superbwarfare:iron_action",
"count": 1
"count": 1,
"id": "superbwarfare:iron_action"
}
}

View file

@ -1,16 +1,16 @@
{
"type": "minecraft:crafting_shaped",
"category": "misc",
"pattern": [
"aaa"
],
"key": {
"a": {
"A": {
"item": "minecraft:iron_ingot"
}
},
"pattern": [
"AAA"
],
"result": {
"id": "superbwarfare:iron_barrel",
"count": 1
"count": 1,
"id": "superbwarfare:iron_barrel"
}
}

View file

@ -1,18 +1,18 @@
{
"type": "minecraft:crafting_shaped",
"category": "misc",
"pattern": [
"a",
"a",
"a"
],
"key": {
"a": {
"A": {
"item": "minecraft:iron_ingot"
}
},
"pattern": [
"A",
"A",
"A"
],
"result": {
"id": "superbwarfare:iron_spring",
"count": 1
"count": 1,
"id": "superbwarfare:iron_spring"
}
}

View file

@ -1,20 +1,20 @@
{
"type": "minecraft:crafting_shaped",
"category": "misc",
"pattern": [
"ab",
" b"
],
"key": {
"a": {
"item": "minecraft:tripwire_hook"
},
"b": {
"A": {
"item": "minecraft:iron_ingot"
},
"B": {
"item": "minecraft:tripwire_hook"
}
},
"pattern": [
"BA",
" A"
],
"result": {
"id": "superbwarfare:iron_trigger",
"count": 1
"count": 1,
"id": "superbwarfare:iron_trigger"
}
}

View file

@ -31,10 +31,39 @@ public class ModRecipeProvider extends RecipeProvider {
@Override
protected void buildRecipes(@NotNull RecipeOutput output) {
// special
SpecialRecipeBuilder.special(PotionMortarShellRecipe::new).save(output, "potion_mortar_shell");
SpecialRecipeBuilder.special(AmmoBoxAddAmmoRecipe::new).save(output, "ammo_box_add_ammo");
SpecialRecipeBuilder.special(AmmoBoxExtractAmmoRecipe::new).save(output, "ammo_box_extract_ammo");
// items
ShapedRecipeBuilder.shaped(RecipeCategory.MISC, ModItems.IRON_BARREL.get())
.pattern("AAA")
.define('A', Items.IRON_INGOT)
.unlockedBy(getHasName(Items.IRON_INGOT), has(Items.IRON_INGOT))
.save(output, Mod.loc(getItemName(ModItems.IRON_BARREL.get())));
ShapedRecipeBuilder.shaped(RecipeCategory.MISC, ModItems.IRON_ACTION.get())
.pattern("AAA")
.pattern(" A")
.define('A', Items.IRON_INGOT)
.unlockedBy(getHasName(Items.IRON_INGOT), has(Items.IRON_INGOT))
.save(output, Mod.loc(getItemName(ModItems.IRON_ACTION.get())));
ShapedRecipeBuilder.shaped(RecipeCategory.MISC, ModItems.IRON_SPRING.get())
.pattern("A")
.pattern("A")
.pattern("A")
.define('A', Items.IRON_INGOT)
.unlockedBy(getHasName(Items.IRON_INGOT), has(Items.IRON_INGOT))
.save(output, Mod.loc(getItemName(ModItems.IRON_SPRING.get())));
ShapedRecipeBuilder.shaped(RecipeCategory.MISC, ModItems.IRON_TRIGGER.get())
.pattern("BA")
.pattern(" A")
.define('A', Items.IRON_INGOT)
.define('B', Items.TRIPWIRE_HOOK)
.unlockedBy(getHasName(Items.IRON_INGOT), has(Items.IRON_INGOT))
.save(output, Mod.loc(getItemName(ModItems.IRON_TRIGGER.get())));
// vehicles
containerRecipe(ModEntities.A_10A.get())
.pattern("dad")
.pattern("ece")
@ -48,6 +77,7 @@ public class ModRecipeProvider extends RecipeProvider {
.unlockedBy(getHasName(ModItems.HEAVY_ARMAMENT_MODULE.get()), has(ModItems.HEAVY_ARMAMENT_MODULE.get()))
.save(output, Mod.loc(getContainerRecipeName(ModEntities.A_10A.get())));
// guns
gunSmithing(output, ModItems.TRACHELIUM_BLUEPRINT.get(), GunRarity.EPIC, ModTags.Items.INGOTS_CEMENTED_CARBIDE, ModItems.TRACHELIUM.get());
gunSmithing(output, ModItems.GLOCK_17_BLUEPRINT.get(), GunRarity.COMMON, Items.IRON_INGOT, ModItems.GLOCK_17.get());
gunSmithing(output, ModItems.MP_443_BLUEPRINT.get(), GunRarity.COMMON, Items.IRON_INGOT, ModItems.MP_443.get());
@ -86,6 +116,7 @@ public class ModRecipeProvider extends RecipeProvider {
gunSmithing(output, ModItems.INSIDIOUS_BLUEPRINT.get(), GunRarity.EPIC, ModTags.Items.INGOTS_CEMENTED_CARBIDE, ModItems.INSIDIOUS.get());
gunSmithing(output, ModItems.AURELIA_SCEPTRE_BLUEPRINT.get(), GunRarity.LEGENDARY, Items.END_CRYSTAL, ModItems.AURELIA_SCEPTRE.get());
// blueprints
copyBlueprint(output, ModItems.TRACHELIUM_BLUEPRINT.get());
copyBlueprint(output, ModItems.GLOCK_17_BLUEPRINT.get());
copyBlueprint(output, ModItems.MP_443_BLUEPRINT.get());