mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-26 06:53:20 +00:00
Fixed conditional advancement loading when using the "advancements" array.
Added automatic generation of conditional advancements from the criteria in the conditional recipe entries. Added advancement name calculation from the recipe ID.
This commit is contained in:
1 parent
5477a36656
commit
59b4affbe7
7 files changed
+201
-12
No files matched your search
@@ -69,7 +69,9 @@ f51f026a75e27a0a53a76771d553c0e3385a2966 assets/piston_event_test/models/item/sh
|
||||
cf16f861eaf5815238c2278eb48bde0688cb73b7 assets/scaffolding_test/blockstates/scaffolding_method_test.json
|
||||
862196702dcd5538c5ceb4ac6202e57eb5c8a97f data/custom_tag_types_test/tags/custom_tag_types_test/custom_types/tests.json
|
||||
4fbaf6f4a3ea05cc071076e27f44ac81f9cc50e3 data/data_gen_test/advancements/conditional.json
|
||||
66442c8000af9af4ba36109b3c9d09d9ffd57277 data/data_gen_test/advancements/recipes/conditional2.json
|
||||
ed4cbf1a3a2f5d8969f6346fdc9acdbe81d0c919 data/data_gen_test/recipes/conditional.json
|
||||
ca9827bff0a49957e01cf3887ef5131ad8710320 data/data_gen_test/recipes/conditional2.json
|
||||
40208299608468b044f64317995f9182ec219d90 data/data_gen_test/tags/blocks/test.json
|
||||
d65c425e740dc833f29d16606a1171825876be0d data/data_gen_test/tags/blocks/thing/one.json
|
||||
1f70ed4ddc878bada5e43d3c44a34157806beda8 data/data_gen_test/tags/blocks/thing/three.json
|
||||
|
||||
+62
@@ -0,0 +1,62 @@
|
||||
{
|
||||
"advancements": [
|
||||
{
|
||||
"conditions": [
|
||||
{
|
||||
"value": {
|
||||
"values": [
|
||||
{
|
||||
"value": {
|
||||
"modid": "minecraft",
|
||||
"type": "forge:mod_loaded"
|
||||
},
|
||||
"type": "forge:not"
|
||||
},
|
||||
{
|
||||
"item": "minecraft:dirt",
|
||||
"type": "forge:item_exists"
|
||||
},
|
||||
{
|
||||
"type": "forge:false"
|
||||
}
|
||||
],
|
||||
"type": "forge:and"
|
||||
},
|
||||
"type": "forge:not"
|
||||
}
|
||||
],
|
||||
"advancement": {
|
||||
"parent": "minecraft:recipes/root",
|
||||
"rewards": {
|
||||
"recipes": [
|
||||
"minecraft:diamond_block"
|
||||
]
|
||||
},
|
||||
"criteria": {
|
||||
"has_dirt": {
|
||||
"trigger": "minecraft:inventory_changed",
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"item": "minecraft:dirt"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"has_the_recipe": {
|
||||
"trigger": "minecraft:recipe_unlocked",
|
||||
"conditions": {
|
||||
"recipe": "minecraft:diamond_block"
|
||||
}
|
||||
}
|
||||
},
|
||||
"requirements": [
|
||||
[
|
||||
"has_dirt",
|
||||
"has_the_recipe"
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
{
|
||||
"type": "forge:conditional",
|
||||
"recipes": [
|
||||
{
|
||||
"conditions": [
|
||||
{
|
||||
"value": {
|
||||
"values": [
|
||||
{
|
||||
"value": {
|
||||
"modid": "minecraft",
|
||||
"type": "forge:mod_loaded"
|
||||
},
|
||||
"type": "forge:not"
|
||||
},
|
||||
{
|
||||
"item": "minecraft:dirt",
|
||||
"type": "forge:item_exists"
|
||||
},
|
||||
{
|
||||
"type": "forge:false"
|
||||
}
|
||||
],
|
||||
"type": "forge:and"
|
||||
},
|
||||
"type": "forge:not"
|
||||
}
|
||||
],
|
||||
"recipe": {
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"pattern": [
|
||||
"XXX",
|
||||
"XXX",
|
||||
"XXX"
|
||||
],
|
||||
"key": {
|
||||
"X": {
|
||||
"item": "minecraft:dirt"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
"item": "minecraft:diamond_block",
|
||||
"count": 64
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in new issue
Block a user