Skip to content

Commit

Permalink
Added advancements
Browse files Browse the repository at this point in the history
  • Loading branch information
RealYusufIsmail committed Jun 17, 2024
1 parent ba649a2 commit 3e1b322
Show file tree
Hide file tree
Showing 11 changed files with 460 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// 1.21 2024-06-17T15:16:01.699594 Advancements
a690d2b3c2b9a035ccb523200436396e04cf3721 data/tutorialmod/advancement/example_armor.json
61c4768d554ecaffd3ad56a533a098c295bf7b67 data/tutorialmod/advancement/example_block.json
28badeedfe9eb1d4830a53ffdecacc733cb4dc2a data/tutorialmod/advancement/example_ingot.json
016b7d73cc7cd8d47231f853341cc5a689616812 data/tutorialmod/advancement/pickaxe.json
d137b73f7722b3787eb71fe39a51435258885a11 data/tutorialmod/advancement/raw_example.json
62a841266399c50e5eb5814c9ba995cc112ec932 data/tutorialmod/advancement/root.json
cf9a128aba8e341f7ae7d2176764fdbb8771d213 data/tutorialmod/advancement/sword.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
"criteria": {
"example_boots": {
"conditions": {
"items": [
{
"items": "tutorialmod:boots"
}
]
},
"trigger": "minecraft:inventory_changed"
},
"example_chestplate": {
"conditions": {
"items": [
{
"items": "tutorialmod:chestplate"
}
]
},
"trigger": "minecraft:inventory_changed"
},
"example_helmet": {
"conditions": {
"items": [
{
"items": "tutorialmod:helmet"
}
]
},
"trigger": "minecraft:inventory_changed"
},
"example_leggings": {
"conditions": {
"items": [
{
"items": "tutorialmod:leggings"
}
]
},
"trigger": "minecraft:inventory_changed"
}
},
"display": {
"description": {
"translate": "advancements.tutorialmod.example_armor.description"
},
"frame": "goal",
"icon": {
"count": 1,
"id": "tutorialmod:helmet"
},
"title": {
"translate": "advancements.tutorialmod.example_armor.title"
}
},
"requirements": [
[
"example_helmet",
"example_chestplate",
"example_leggings",
"example_boots"
]
],
"sends_telemetry_event": true
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"parent": "tutorialmod:example_ingot",
"criteria": {
"get_block": {
"conditions": {
"items": [
{
"items": "tutorialmod:example_block"
}
]
},
"trigger": "minecraft:inventory_changed"
}
},
"display": {
"announce_to_chat": false,
"background": "minecraft:block/light_blue_wool.png",
"description": {
"translate": "advancements.tutorialmod.example_block.description"
},
"icon": {
"count": 1,
"id": "tutorialmod:example_block"
},
"title": {
"translate": "advancements.tutorialmod.example_block.title"
}
},
"requirements": [
[
"get_block"
]
],
"sends_telemetry_event": true
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"parent": "tutorialmod:raw_example",
"criteria": {
"get_ingot": {
"conditions": {
"items": [
{
"items": "tutorialmod:example_item"
}
]
},
"trigger": "minecraft:inventory_changed"
}
},
"display": {
"announce_to_chat": false,
"background": "minecraft:block/light_blue_wool.png",
"description": {
"translate": "advancements.tutorialmod.example_ingot.description"
},
"icon": {
"count": 1,
"id": "tutorialmod:example_item"
},
"title": {
"translate": "advancements.tutorialmod.example_ingot.title"
}
},
"requirements": [
[
"get_ingot"
]
],
"sends_telemetry_event": true
}
35 changes: 35 additions & 0 deletions src/generated/resources/data/tutorialmod/advancement/pickaxe.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"parent": "tutorialmod:example_ingot",
"criteria": {
"get_pickaxe": {
"conditions": {
"items": [
{
"items": "tutorialmod:pickaxe"
}
]
},
"trigger": "minecraft:inventory_changed"
}
},
"display": {
"announce_to_chat": false,
"background": "minecraft:block/light_blue_wool.png",
"description": {
"translate": "advancements.tutorialmod.pickaxe.description"
},
"icon": {
"count": 1,
"id": "tutorialmod:pickaxe"
},
"title": {
"translate": "advancements.tutorialmod.pickaxe.title"
}
},
"requirements": [
[
"get_pickaxe"
]
],
"sends_telemetry_event": true
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"parent": "tutorialmod:root",
"criteria": {
"get_ore": {
"conditions": {
"items": [
{
"items": "tutorialmod:raw_example"
}
]
},
"trigger": "minecraft:inventory_changed"
}
},
"display": {
"announce_to_chat": false,
"background": "minecraft:block/light_blue_wool.png",
"description": {
"translate": "advancements.tutorialmod.raw_example.description"
},
"icon": {
"count": 1,
"id": "tutorialmod:raw_example"
},
"title": {
"translate": "advancements.tutorialmod.raw_example.title"
}
},
"requirements": [
[
"get_ore"
]
],
"sends_telemetry_event": true
}
34 changes: 34 additions & 0 deletions src/generated/resources/data/tutorialmod/advancement/root.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"criteria": {
"root": {
"conditions": {
"items": [
{
"items": "minecraft:crafting_table"
}
]
},
"trigger": "minecraft:inventory_changed"
}
},
"display": {
"announce_to_chat": false,
"background": "minecraft:block/light_blue_wool.png",
"description": {
"translate": "advancements.tutorialmod.root.description"
},
"icon": {
"count": 1,
"id": "tutorialmod:example_item"
},
"title": {
"translate": "advancements.tutorialmod.root.title"
}
},
"requirements": [
[
"root"
]
],
"sends_telemetry_event": true
}
35 changes: 35 additions & 0 deletions src/generated/resources/data/tutorialmod/advancement/sword.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"parent": "tutorialmod:example_ingot",
"criteria": {
"get_sword": {
"conditions": {
"items": [
{
"items": "tutorialmod:sword"
}
]
},
"trigger": "minecraft:inventory_changed"
}
},
"display": {
"announce_to_chat": false,
"background": "minecraft:block/light_blue_wool.png",
"description": {
"translate": "advancements.tutorialmod.sword.description"
},
"icon": {
"count": 1,
"id": "tutorialmod:sword"
},
"title": {
"translate": "advancements.tutorialmod.sword.title"
}
},
"requirements": [
[
"get_sword"
]
],
"sends_telemetry_event": true
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package io.github.realyusufismail.tutorialmod.data;

import io.github.realyusufismail.tutorialmod.TutorialMod;
import io.github.realyusufismail.tutorialmod.data.advancement.ModAdvancementProvider;
import io.github.realyusufismail.tutorialmod.data.lang.ModEnLangProvider;
import io.github.realyusufismail.tutorialmod.data.loot.ModGlobalLootModifiersProvider;
import io.github.realyusufismail.tutorialmod.data.lootable.ModLootTables;
Expand Down Expand Up @@ -30,6 +31,7 @@ public static void gatherData(GatherDataEvent event) {
generator.addProvider(true, blockTagsProvider);
generator.addProvider(true, new ModItemTagProvider(output, event.getLookupProvider(), blockTagsProvider, existingFileHelper));
generator.addProvider(true, new ModGlobalLootModifiersProvider(output, event.getLookupProvider()));
generator.addProvider(true, new ModAdvancementProvider(output, event.getLookupProvider(), existingFileHelper));
} catch (RuntimeException e) {
TutorialMod.logger.error("Failed to generate data", e);
}
Expand Down
Loading

0 comments on commit 3e1b322

Please sign in to comment.