aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/generated/data/minecraft/advancements/ygasi/defence1.json41
-rw-r--r--src/main/generated/data/minecraft/advancements/ygasi/defence2.json41
-rw-r--r--src/main/generated/data/minecraft/advancements/ygasi/defence3.json41
-rw-r--r--src/main/generated/data/minecraft/advancements/ygasi/druidry.json4
-rw-r--r--src/main/generated/data/minecraft/advancements/ygasi/element1.json40
-rw-r--r--src/main/generated/data/minecraft/advancements/ygasi/element2.json40
-rw-r--r--src/main/generated/data/minecraft/advancements/ygasi/element3.json40
-rw-r--r--src/main/generated/data/minecraft/advancements/ygasi/extra.json40
-rw-r--r--src/main/generated/data/minecraft/advancements/ygasi/fight1.json40
-rw-r--r--src/main/generated/data/minecraft/advancements/ygasi/fight2.json40
-rw-r--r--src/main/generated/data/minecraft/advancements/ygasi/fight3.json40
-rw-r--r--src/main/generated/data/minecraft/advancements/ygasi/force1.json40
-rw-r--r--src/main/generated/data/minecraft/advancements/ygasi/force2.json40
-rw-r--r--src/main/generated/data/minecraft/advancements/ygasi/force3.json40
-rw-r--r--src/main/generated/data/minecraft/advancements/ygasi/mercenary.json6
-rw-r--r--src/main/generated/data/minecraft/advancements/ygasi/nature1.json40
-rw-r--r--src/main/generated/data/minecraft/advancements/ygasi/nature2.json40
-rw-r--r--src/main/generated/data/minecraft/advancements/ygasi/nature3.json40
-rw-r--r--src/main/generated/data/minecraft/advancements/ygasi/necromancy1.json40
-rw-r--r--src/main/generated/data/minecraft/advancements/ygasi/necromancy2.json40
-rw-r--r--src/main/generated/data/minecraft/advancements/ygasi/necromancy3.json40
-rw-r--r--src/main/generated/data/minecraft/advancements/ygasi/ninja1.json40
-rw-r--r--src/main/generated/data/minecraft/advancements/ygasi/ninja2.json40
-rw-r--r--src/main/generated/data/minecraft/advancements/ygasi/ninja3.json40
-rw-r--r--src/main/generated/data/minecraft/advancements/ygasi/offence1.json41
-rw-r--r--src/main/generated/data/minecraft/advancements/ygasi/offence2.json41
-rw-r--r--src/main/generated/data/minecraft/advancements/ygasi/offence3.json41
-rw-r--r--src/main/generated/data/minecraft/advancements/ygasi/protean1.json40
-rw-r--r--src/main/generated/data/minecraft/advancements/ygasi/protean2.json40
-rw-r--r--src/main/generated/data/minecraft/advancements/ygasi/protean3.json40
-rw-r--r--src/main/generated/data/minecraft/advancements/ygasi/root.json4
-rw-r--r--src/main/generated/data/minecraft/advancements/ygasi/wizardry.json4
-rw-r--r--src/main/java/dev/mayaqq/ygasi/Ygasi.java9
-rw-r--r--src/main/java/dev/mayaqq/ygasi/gui/BranchGui.java88
-rw-r--r--src/main/java/dev/mayaqq/ygasi/gui/DruidryGui.java4
-rw-r--r--src/main/java/dev/mayaqq/ygasi/gui/ExtraGui.java36
-rw-r--r--src/main/java/dev/mayaqq/ygasi/gui/MercenaryGui.java12
-rw-r--r--src/main/java/dev/mayaqq/ygasi/gui/WizardryGui.java4
-rw-r--r--src/main/java/dev/mayaqq/ygasi/registry/dataGen/advancements/AdvancementProvider.java1
-rw-r--r--src/main/java/dev/mayaqq/ygasi/registry/dataGen/advancements/Advancements.java207
-rw-r--r--src/main/java/dev/mayaqq/ygasi/util/GetAdvancementProgress.java10
-rw-r--r--src/main/java/dev/mayaqq/ygasi/util/YgasiUtils.java (renamed from src/main/java/dev/mayaqq/ygasi/util/GrantAdvancementCriterion.java)8
-rw-r--r--src/main/resources/data/ygasi/lang/en_us.json4
-rw-r--r--src/main/resources/fabric.mod.json4
44 files changed, 1414 insertions, 117 deletions
diff --git a/src/main/generated/data/minecraft/advancements/ygasi/defence1.json b/src/main/generated/data/minecraft/advancements/ygasi/defence1.json
new file mode 100644
index 0000000..bdfcdc0
--- /dev/null
+++ b/src/main/generated/data/minecraft/advancements/ygasi/defence1.json
@@ -0,0 +1,41 @@
+{
+ "parent": "minecraft:ygasi/mercenary",
+ "criteria": {
+ "gotten_previous": {
+ "conditions": {
+ "advancement_identifier": "minecraft:ygasi/mercenary"
+ },
+ "trigger": "revelationary:advancement_gotten"
+ },
+ "unlocked_defence1": {
+ "trigger": "minecraft:impossible"
+ }
+ },
+ "display": {
+ "announce_to_chat": false,
+ "description": {
+ "translate": "advancements.ygasi.mercenary.defence1.description"
+ },
+ "frame": "task",
+ "hidden": true,
+ "icon": {
+ "item": "minecraft:iron_chestplate",
+ "nbt": "{Damage:0}"
+ },
+ "show_toast": false,
+ "title": {
+ "translate": "advancements.ygasi.mercenary.defence1.title"
+ }
+ },
+ "requirements": [
+ [
+ "unlocked_defence1"
+ ],
+ [
+ "gotten_previous"
+ ]
+ ],
+ "rewards": {
+ "experience": 1
+ }
+} \ No newline at end of file
diff --git a/src/main/generated/data/minecraft/advancements/ygasi/defence2.json b/src/main/generated/data/minecraft/advancements/ygasi/defence2.json
new file mode 100644
index 0000000..d6e66a0
--- /dev/null
+++ b/src/main/generated/data/minecraft/advancements/ygasi/defence2.json
@@ -0,0 +1,41 @@
+{
+ "parent": "minecraft:ygasi/defence1",
+ "criteria": {
+ "gotten_previous": {
+ "conditions": {
+ "advancement_identifier": "minecraft:ygasi/defence1"
+ },
+ "trigger": "revelationary:advancement_gotten"
+ },
+ "unlocked_defence2": {
+ "trigger": "minecraft:impossible"
+ }
+ },
+ "display": {
+ "announce_to_chat": false,
+ "description": {
+ "translate": "advancements.ygasi.mercenary.defence2.description"
+ },
+ "frame": "task",
+ "hidden": true,
+ "icon": {
+ "item": "minecraft:iron_chestplate",
+ "nbt": "{Damage:0}"
+ },
+ "show_toast": false,
+ "title": {
+ "translate": "advancements.ygasi.mercenary.defence2.title"
+ }
+ },
+ "requirements": [
+ [
+ "unlocked_defence2"
+ ],
+ [
+ "gotten_previous"
+ ]
+ ],
+ "rewards": {
+ "experience": 1
+ }
+} \ No newline at end of file
diff --git a/src/main/generated/data/minecraft/advancements/ygasi/defence3.json b/src/main/generated/data/minecraft/advancements/ygasi/defence3.json
new file mode 100644
index 0000000..5567889
--- /dev/null
+++ b/src/main/generated/data/minecraft/advancements/ygasi/defence3.json
@@ -0,0 +1,41 @@
+{
+ "parent": "minecraft:ygasi/defence2",
+ "criteria": {
+ "gotten_previous": {
+ "conditions": {
+ "advancement_identifier": "minecraft:ygasi/defence2"
+ },
+ "trigger": "revelationary:advancement_gotten"
+ },
+ "unlocked_defence3": {
+ "trigger": "minecraft:impossible"
+ }
+ },
+ "display": {
+ "announce_to_chat": false,
+ "description": {
+ "translate": "advancements.ygasi.mercenary.defence3.description"
+ },
+ "frame": "task",
+ "hidden": true,
+ "icon": {
+ "item": "minecraft:iron_chestplate",
+ "nbt": "{Damage:0}"
+ },
+ "show_toast": false,
+ "title": {
+ "translate": "advancements.ygasi.mercenary.defence3.title"
+ }
+ },
+ "requirements": [
+ [
+ "unlocked_defence3"
+ ],
+ [
+ "gotten_previous"
+ ]
+ ],
+ "rewards": {
+ "experience": 1
+ }
+} \ No newline at end of file
diff --git a/src/main/generated/data/minecraft/advancements/ygasi/druidry.json b/src/main/generated/data/minecraft/advancements/ygasi/druidry.json
index 884cfed..fa73a5e 100644
--- a/src/main/generated/data/minecraft/advancements/ygasi/druidry.json
+++ b/src/main/generated/data/minecraft/advancements/ygasi/druidry.json
@@ -14,7 +14,7 @@
"display": {
"announce_to_chat": false,
"description": {
- "text": "Unlock the druidry branch!"
+ "translate": "advancements.ygasi.druidry.description"
},
"frame": "goal",
"hidden": false,
@@ -23,7 +23,7 @@
},
"show_toast": false,
"title": {
- "text": "Druidry"
+ "translate": "advancements.ygasi.druidry.title"
}
},
"requirements": [
diff --git a/src/main/generated/data/minecraft/advancements/ygasi/element1.json b/src/main/generated/data/minecraft/advancements/ygasi/element1.json
new file mode 100644
index 0000000..199af31
--- /dev/null
+++ b/src/main/generated/data/minecraft/advancements/ygasi/element1.json
@@ -0,0 +1,40 @@
+{
+ "parent": "minecraft:ygasi/wizardry",
+ "criteria": {
+ "gotten_previous": {
+ "conditions": {
+ "advancement_identifier": "minecraft:ygasi/wizardry"
+ },
+ "trigger": "revelationary:advancement_gotten"
+ },
+ "unlocked_element1": {
+ "trigger": "minecraft:impossible"
+ }
+ },
+ "display": {
+ "announce_to_chat": false,
+ "description": {
+ "translate": "advancements.ygasi.wizardry.element1.description"
+ },
+ "frame": "task",
+ "hidden": true,
+ "icon": {
+ "item": "minecraft:fire_charge"
+ },
+ "show_toast": false,
+ "title": {
+ "translate": "advancements.ygasi.wizardry.element1.title"
+ }
+ },
+ "requirements": [
+ [
+ "unlocked_element1"
+ ],
+ [
+ "gotten_previous"
+ ]
+ ],
+ "rewards": {
+ "experience": 1
+ }
+} \ No newline at end of file
diff --git a/src/main/generated/data/minecraft/advancements/ygasi/element2.json b/src/main/generated/data/minecraft/advancements/ygasi/element2.json
new file mode 100644
index 0000000..54e758f
--- /dev/null
+++ b/src/main/generated/data/minecraft/advancements/ygasi/element2.json
@@ -0,0 +1,40 @@
+{
+ "parent": "minecraft:ygasi/element1",
+ "criteria": {
+ "gotten_previous": {
+ "conditions": {
+ "advancement_identifier": "minecraft:ygasi/element1"
+ },
+ "trigger": "revelationary:advancement_gotten"
+ },
+ "unlocked_element2": {
+ "trigger": "minecraft:impossible"
+ }
+ },
+ "display": {
+ "announce_to_chat": false,
+ "description": {
+ "translate": "advancements.ygasi.wizardry.element2.description"
+ },
+ "frame": "task",
+ "hidden": true,
+ "icon": {
+ "item": "minecraft:fire_charge"
+ },
+ "show_toast": false,
+ "title": {
+ "translate": "advancements.ygasi.wizardry.element2.title"
+ }
+ },
+ "requirements": [
+ [
+ "unlocked_element2"
+ ],
+ [
+ "gotten_previous"
+ ]
+ ],
+ "rewards": {
+ "experience": 1
+ }
+} \ No newline at end of file
diff --git a/src/main/generated/data/minecraft/advancements/ygasi/element3.json b/src/main/generated/data/minecraft/advancements/ygasi/element3.json
new file mode 100644
index 0000000..8bd713f
--- /dev/null
+++ b/src/main/generated/data/minecraft/advancements/ygasi/element3.json
@@ -0,0 +1,40 @@
+{
+ "parent": "minecraft:ygasi/element2",
+ "criteria": {
+ "gotten_previous": {
+ "conditions": {
+ "advancement_identifier": "minecraft:ygasi/element2"
+ },
+ "trigger": "revelationary:advancement_gotten"
+ },
+ "unlocked_element3": {
+ "trigger": "minecraft:impossible"
+ }
+ },
+ "display": {
+ "announce_to_chat": false,
+ "description": {
+ "translate": "advancements.ygasi.wizardry.element3.description"
+ },
+ "frame": "task",
+ "hidden": true,
+ "icon": {
+ "item": "minecraft:fire_charge"
+ },
+ "show_toast": false,
+ "title": {
+ "translate": "advancements.ygasi.wizardry.element3.title"
+ }
+ },
+ "requirements": [
+ [
+ "unlocked_element3"
+ ],
+ [
+ "gotten_previous"
+ ]
+ ],
+ "rewards": {
+ "experience": 1
+ }
+} \ No newline at end of file
diff --git a/src/main/generated/data/minecraft/advancements/ygasi/extra.json b/src/main/generated/data/minecraft/advancements/ygasi/extra.json
new file mode 100644
index 0000000..c4ae6f2
--- /dev/null
+++ b/src/main/generated/data/minecraft/advancements/ygasi/extra.json
@@ -0,0 +1,40 @@
+{
+ "parent": "minecraft:ygasi/root",
+ "criteria": {
+ "gotten_previous": {
+ "conditions": {
+ "advancement_identifier": "minecraft:ygasi/root"
+ },
+ "trigger": "revelationary:advancement_gotten"
+ },
+ "unlocked_extra": {
+ "trigger": "minecraft:impossible"
+ }
+ },
+ "display": {
+ "announce_to_chat": false,
+ "description": {
+ "translate": "advancements.ygasi.extra.description"
+ },
+ "frame": "goal",
+ "hidden": false,
+ "icon": {
+ "item": "minecraft:emerald"
+ },
+ "show_toast": false,
+ "title": {
+ "translate": "advancements.ygasi.extra.title"
+ }
+ },
+ "requirements": [
+ [
+ "unlocked_extra"
+ ],
+ [
+ "gotten_previous"
+ ]
+ ],
+ "rewards": {
+ "experience": 1
+ }
+} \ No newline at end of file
diff --git a/src/main/generated/data/minecraft/advancements/ygasi/fight1.json b/src/main/generated/data/minecraft/advancements/ygasi/fight1.json
new file mode 100644
index 0000000..08879a8
--- /dev/null
+++ b/src/main/generated/data/minecraft/advancements/ygasi/fight1.json
@@ -0,0 +1,40 @@
+{
+ "parent": "minecraft:ygasi/wizardry",
+ "criteria": {
+ "gotten_previous": {
+ "conditions": {
+ "advancement_identifier": "minecraft:ygasi/wizardry"
+ },
+ "trigger": "revelationary:advancement_gotten"
+ },
+ "unlocked_fight1": {
+ "trigger": "minecraft:impossible"
+ }
+ },
+ "display": {
+ "announce_to_chat": false,
+ "description": {
+ "translate": "advancements.ygasi.wizardry.fight1.description"
+ },
+ "frame": "task",
+ "hidden": true,
+ "icon": {
+ "item": "minecraft:blaze_powder"
+ },
+ "show_toast": false,
+ "title": {
+ "translate": "advancements.ygasi.wizardry.fight1.title"
+ }
+ },
+ "requirements": [
+ [
+ "unlocked_fight1"
+ ],
+ [
+ "gotten_previous"
+ ]
+ ],
+ "rewards": {
+ "experience": 1
+ }
+} \ No newline at end of file
diff --git a/src/main/generated/data/minecraft/advancements/ygasi/fight2.json b/src/main/generated/data/minecraft/advancements/ygasi/fight2.json
new file mode 100644
index 0000000..ad7f6d8
--- /dev/null
+++ b/src/main/generated/data/minecraft/advancements/ygasi/fight2.json
@@ -0,0 +1,40 @@
+{
+ "parent": "minecraft:ygasi/fight1",
+ "criteria": {
+ "gotten_previous": {
+ "conditions": {
+ "advancement_identifier": "minecraft:ygasi/fight1"
+ },
+ "trigger": "revelationary:advancement_gotten"
+ },
+ "unlocked_fight2": {
+ "trigger": "minecraft:impossible"
+ }
+ },
+ "display": {
+ "announce_to_chat": false,
+ "description": {
+ "translate": "advancements.ygasi.wizardry.fight2.description"
+ },
+ "frame": "task",
+ "hidden": true,
+ "icon": {
+ "item": "minecraft:blaze_powder"
+ },
+ "show_toast": false,
+ "title": {
+ "translate": "advancements.ygasi.wizardry.fight2.title"
+ }
+ },
+ "requirements": [
+ [
+ "unlocked_fight2"
+ ],
+ [
+ "gotten_previous"
+ ]
+ ],
+ "rewards": {
+ "experience": 1
+ }
+} \ No newline at end of file
diff --git a/src/main/generated/data/minecraft/advancements/ygasi/fight3.json b/src/main/generated/data/minecraft/advancements/ygasi/fight3.json
new file mode 100644
index 0000000..e8360a1
--- /dev/null
+++ b/src/main/generated/data/minecraft/advancements/ygasi/fight3.json
@@ -0,0 +1,40 @@
+{
+ "parent": "minecraft:ygasi/fight2",
+ "criteria": {
+ "gotten_previous": {
+ "conditions": {
+ "advancement_identifier": "minecraft:ygasi/fight2"
+ },
+ "trigger": "revelationary:advancement_gotten"
+ },
+ "unlocked_fight3": {
+ "trigger": "minecraft:impossible"
+ }
+ },
+ "display": {
+ "announce_to_chat": false,
+ "description": {
+ "translate": "advancements.ygasi.wizardry.fight3.description"
+ },
+ "frame": "task",
+ "hidden": true,
+ "icon": {
+ "item": "minecraft:blaze_powder"
+ },
+ "show_toast": false,
+ "title": {
+ "translate": "advancements.ygasi.wizardry.fight3.title"
+ }
+ },
+ "requirements": [
+ [
+ "unlocked_fight3"
+ ],
+ [
+ "gotten_previous"
+ ]
+ ],
+ "rewards": {
+ "experience": 1
+ }
+} \ No newline at end of file
diff --git a/src/main/generated/data/minecraft/advancements/ygasi/force1.json b/src/main/generated/data/minecraft/advancements/ygasi/force1.json
new file mode 100644
index 0000000..5e88eff
--- /dev/null
+++ b/src/main/generated/data/minecraft/advancements/ygasi/force1.json
@@ -0,0 +1,40 @@
+{
+ "parent": "minecraft:ygasi/wizardry",
+ "criteria": {
+ "gotten_previous": {
+ "conditions": {
+ "advancement_identifier": "minecraft:ygasi/wizardry"
+ },
+ "trigger": "revelationary:advancement_gotten"
+ },
+ "unlocked_force1": {
+ "trigger": "minecraft:impossible"
+ }
+ },
+ "display": {
+ "announce_to_chat": false,
+ "description": {
+ "translate": "advancements.ygasi.wizardry.force1.description"
+ },
+ "frame": "task",
+ "hidden": true,
+ "icon": {
+ "item": "minecraft:ender_pearl"
+ },
+ "show_toast": false,
+ "title": {
+ "translate": "advancements.ygasi.wizardry.force1.title"
+ }
+ },
+ "requirements": [
+ [
+ "unlocked_force1"
+ ],
+ [
+ "gotten_previous"
+ ]
+ ],
+ "rewards": {
+ "experience": 1
+ }
+} \ No newline at end of file
diff --git a/src/main/generated/data/minecraft/advancements/ygasi/force2.json b/src/main/generated/data/minecraft/advancements/ygasi/force2.json
new file mode 100644
index 0000000..e8bb729
--- /dev/null
+++ b/src/main/generated/data/minecraft/advancements/ygasi/force2.json
@@ -0,0 +1,40 @@
+{
+ "parent": "minecraft:ygasi/force1",
+ "criteria": {
+ "gotten_previous": {
+ "conditions": {
+ "advancement_identifier": "minecraft:ygasi/force1"
+ },
+ "trigger": "revelationary:advancement_gotten"
+ },
+ "unlocked_force2": {
+ "trigger": "minecraft:impossible"
+ }
+ },
+ "display": {
+ "announce_to_chat": false,
+ "description": {
+ "translate": "advancements.ygasi.wizardry.force2.description"
+ },
+ "frame": "task",
+ "hidden": true,
+ "icon": {
+ "item": "minecraft:ender_pearl"
+ },
+ "show_toast": false,
+ "title": {
+ "translate": "advancements.ygasi.wizardry.force2.title"
+ }
+ },
+ "requirements": [
+ [
+ "unlocked_force2"
+ ],
+ [
+ "gotten_previous"
+ ]
+ ],
+ "rewards": {
+ "experience": 1
+ }
+} \ No newline at end of file
diff --git a/src/main/generated/data/minecraft/advancements/ygasi/force3.json b/src/main/generated/data/minecraft/advancements/ygasi/force3.json
new file mode 100644
index 0000000..f95f569
--- /dev/null
+++ b/src/main/generated/data/minecraft/advancements/ygasi/force3.json
@@ -0,0 +1,40 @@
+{
+ "parent": "minecraft:ygasi/force2",
+ "criteria": {
+ "gotten_previous": {
+ "conditions": {
+ "advancement_identifier": "minecraft:ygasi/force2"
+ },
+ "trigger": "revelationary:advancement_gotten"
+ },
+ "unlocked_force3": {
+ "trigger": "minecraft:impossible"
+ }
+ },
+ "display": {
+ "announce_to_chat": false,
+ "description": {
+ "translate": "advancements.ygasi.wizardry.force3.description"
+ },
+ "frame": "task",
+ "hidden": true,
+ "icon": {
+ "item": "minecraft:ender_pearl"
+ },
+ "show_toast": false,
+ "title": {
+ "translate": "advancements.ygasi.wizardry.force3.title"
+ }
+ },
+ "requirements": [
+ [
+ "unlocked_force3"
+ ],
+ [
+ "gotten_previous"
+ ]
+ ],
+ "rewards": {
+ "experience": 1
+ }
+} \ No newline at end of file
diff --git a/src/main/generated/data/minecraft/advancements/ygasi/mercenary.json b/src/main/generated/data/minecraft/advancements/ygasi/mercenary.json
index fcf77bc..85339ae 100644
--- a/src/main/generated/data/minecraft/advancements/ygasi/mercenary.json
+++ b/src/main/generated/data/minecraft/advancements/ygasi/mercenary.json
@@ -14,17 +14,17 @@
"display": {
"announce_to_chat": false,
"description": {
- "text": "Unlock the mercenary branch!"
+ "translate": "advancements.ygasi.mercenary.description"
},
"frame": "goal",
"hidden": false,
"icon": {
- "item": "minecraft:iron_sword",
+ "item": "minecraft:diamond_sword",
"nbt": "{Damage:0}"
},
"show_toast": false,
"title": {
- "text": "Mercenary"
+ "translate": "advancements.ygasi.mercenary.title"
}
},
"requirements": [
diff --git a/src/main/generated/data/minecraft/advancements/ygasi/nature1.json b/src/main/generated/data/minecraft/advancements/ygasi/nature1.json
new file mode 100644
index 0000000..46f1aa7
--- /dev/null
+++ b/src/main/generated/data/minecraft/advancements/ygasi/nature1.json
@@ -0,0 +1,40 @@
+{
+ "parent": "minecraft:ygasi/druidry",
+ "criteria": {
+ "gotten_previous": {
+ "conditions": {
+ "advancement_identifier": "minecraft:ygasi/druidry"
+ },
+ "trigger": "revelationary:advancement_gotten"
+ },
+ "unlocked_nature1": {
+ "trigger": "minecraft:impossible"
+ }
+ },
+ "display": {
+ "announce_to_chat": false,
+ "description": {
+ "translate": "advancements.ygasi.druidry.nature1.description"
+ },
+ "frame": "task",
+ "hidden": true,
+ "icon": {
+ "item": "minecraft:grass_block"
+ },
+ "show_toast": false,
+ "title": {
+ "translate": "advancements.ygasi.druidry.nature1.title"
+ }
+ },
+ "requirements": [
+ [
+ "unlocked_nature1"
+ ],
+ [
+ "gotten_previous"
+ ]
+ ],
+ "rewards": {
+ "experience": 1
+ }
+} \ No newline at end of file
diff --git a/src/main/generated/data/minecraft/advancements/ygasi/nature2.json b/src/main/generated/data/minecraft/advancements/ygasi/nature2.json
new file mode 100644
index 0000000..f70c0a3
--- /dev/null
+++ b/src/main/generated/data/minecraft/advancements/ygasi/nature2.json
@@ -0,0 +1,40 @@
+{
+ "parent": "minecraft:ygasi/nature1",
+ "criteria": {
+ "gotten_previous": {
+ "conditions": {
+ "advancement_identifier": "minecraft:ygasi/nature1"
+ },
+ "trigger": "revelationary:advancement_gotten"
+ },
+ "unlocked_nature2": {
+ "trigger": "minecraft:impossible"
+ }
+ },
+ "display": {
+ "announce_to_chat": false,
+ "description": {
+ "translate": "advancements.ygasi.druidry.nature2.description"
+ },
+ "frame": "task",
+ "hidden": true,
+ "icon": {
+ "item": "minecraft:grass_block"
+ },
+ "show_toast": false,
+ "title": {
+ "translate": "advancements.ygasi.druidry.nature2.title"
+ }
+ },
+ "requirements": [
+ [
+ "unlocked_nature2"
+ ],
+ [
+ "gotten_previous"
+ ]
+ ],
+ "rewards": {
+ "experience": 1
+ }
+} \ No newline at end of file
diff --git a/src/main/generated/data/minecraft/advancements/ygasi/nature3.json b/src/main/generated/data/minecraft/advancements/ygasi/nature3.json
new file mode 100644
index 0000000..f198e1e
--- /dev/null
+++ b/src/main/generated/data/minecraft/advancements/ygasi/nature3.json
@@ -0,0 +1,40 @@
+{
+ "parent": "minecraft:ygasi/nature2",
+ "criteria": {
+ "gotten_previous": {
+ "conditions": {
+ "advancement_identifier": "minecraft:ygasi/nature2"
+ },
+ "trigger": "revelationary:advancement_gotten"
+ },
+ "unlocked_nature3": {
+ "trigger": "minecraft:impossible"
+ }
+ },
+ "display": {
+ "announce_to_chat": false,
+ "description": {
+ "translate": "advancements.ygasi.druidry.nature3.description"
+ },
+ "frame": "task",
+ "hidden": true,
+ "icon": {
+ "item": "minecraft:grass_block"
+ },
+ "show_toast": false,
+ "title": {
+ "translate": "advancements.ygasi.druidry.nature3.title"
+ }
+ },
+ "requirements": [
+ [
+ "unlocked_nature3"
+ ],
+ [
+ "gotten_previous"
+ ]
+ ],
+ "rewards": {
+ "experience": 1
+ }
+} \ No newline at end of file
diff --git a/src/main/generated/data/minecraft/advancements/ygasi/necromancy1.json b/src/main/generated/data/minecraft/advancements/ygasi/necromancy1.json
new file mode 100644
index 0000000..d8afc8f
--- /dev/null
+++ b/src/main/generated/data/minecraft/advancements/ygasi/necromancy1.json
@@ -0,0 +1,40 @@
+{
+ "parent": "minecraft:ygasi/druidry",
+ "criteria": {
+ "gotten_previous": {
+ "conditions": {
+ "advancement_identifier": "minecraft:ygasi/druidry"
+ },
+ "trigger": "revelationary:advancement_gotten"
+ },
+ "unlocked_necromancy1": {
+ "trigger": "minecraft:impossible"
+ }
+ },
+ "display": {
+ "announce_to_chat": false,
+ "description": {
+ "translate": "advancements.ygasi.druidry.necromancy1.description"
+ },
+ "frame": "task",
+ "hidden": true,
+ "icon": {
+ "item": "minecraft:bone"
+ },
+ "show_toast": false,
+ "title": {
+ "translate": "advancements.ygasi.druidry.necromancy1.title"
+ }
+ },
+ "requirements": [
+ [
+ "unlocked_necromancy1"
+ ],
+ [
+ "gotten_previous"
+ ]
+ ],
+ "rewards": {
+ "experience": 1
+ }
+} \ No newline at end of file
diff --git a/src/main/generated/data/minecraft/advancements/ygasi/necromancy2.json b/src/main/generated/data/minecraft/advancements/ygasi/necromancy2.json
new file mode 100644
index 0000000..7840604
--- /dev/null
+++ b/src/main/generated/data/minecraft/advancements/ygasi/necromancy2.json
@@ -0,0 +1,40 @@
+{
+ "parent": "minecraft:ygasi/necromancy1",
+ "criteria": {
+ "gotten_previous": {
+ "conditions": {
+ "advancement_identifier": "minecraft:ygasi/necromancy1"
+ },
+ "trigger": "revelationary:advancement_gotten"
+ },
+ "unlocked_necromancy2": {
+ "trigger": "minecraft:impossible"
+ }
+ },
+ "display": {
+ "announce_to_chat": false,
+ "description": {
+ "translate": "advancements.ygasi.druidry.necromancy2.description"
+ },
+ "frame": "task",
+ "hidden": true,
+ "icon": {
+ "item": "minecraft:bone"
+ },
+ "show_toast": false,
+ "title": {
+ "translate": "advancements.ygasi.druidry.necromancy2.title"
+ }
+ },
+ "requirements": [
+ [
+ "unlocked_necromancy2"
+ ],
+ [
+ "gotten_previous"
+ ]
+ ],
+ "rewards": {
+ "experience": 1
+ }
+} \ No newline at end of file
diff --git a/src/main/generated/data/minecraft/advancements/ygasi/necromancy3.json b/src/main/generated/data/minecraft/advancements/ygasi/necromancy3.json
new file mode 100644
index 0000000..39295bf
--- /dev/null
+++ b/src/main/generated/data/minecraft/advancements/ygasi/necromancy3.json
@@ -0,0 +1,40 @@
+{
+ "parent": "minecraft:ygasi/necromancy2",
+ "criteria": {
+ "gotten_previous": {
+ "conditions": {
+ "advancement_identifier": "minecraft:ygasi/necromancy2"
+ },
+ "trigger": "revelationary:advancement_gotten"
+ },
+ "unlocked_necromancy3": {
+ "trigger": "minecraft:impossible"
+ }
+ },
+ "display": {
+ "announce_to_chat": false,
+ "description": {
+ "translate": "advancements.ygasi.druidry.necromancy3.description"
+ },
+ "frame": "task",
+ "hidden": true,
+ "icon": {
+ "item": "minecraft:bone"
+ },
+ "show_toast": false,
+ "title": {
+ "translate": "advancements.ygasi.druidry.necromancy3.title"
+ }
+ },
+ "requirements": [
+ [
+ "unlocked_necromancy3"
+ ],
+ [
+ "gotten_previous"
+ ]
+ ],
+ "rewards": {
+ "experience": 1
+ }
+} \ No newline at end of file
diff --git a/src/main/generated/data/minecraft/advancements/ygasi/ninja1.json b/src/main/generated/data/minecraft/advancements/ygasi/ninja1.json
new file mode 100644
index 0000000..eaf63a0
--- /dev/null
+++ b/src/main/generated/data/minecraft/advancements/ygasi/ninja1.json
@@ -0,0 +1,40 @@
+{
+ "parent": "minecraft:ygasi/mercenary",
+ "criteria": {
+ "gotten_previous": {
+ "conditions": {
+ "advancement_identifier": "minecraft:ygasi/mercenary"
+ },
+ "trigger": "revelationary:advancement_gotten"
+ },
+ "unlocked_ninja1": {
+ "trigger": "minecraft:impossible"
+ }
+ },
+ "display": {
+ "announce_to_chat": false,
+ "description": {
+ "translate": "advancements.ygasi.mercenary.ninja1.description"
+ },
+ "frame": "task",
+ "hidden": true,
+ "icon": {
+ "item": "minecraft:bamboo"
+ },
+ "show_toast": false,
+ "title": {
+ "translate": "advancements.ygasi.mercenary.ninja1.title"
+ }
+ },
+ "requirements": [
+ [
+ "unlocked_ninja1"
+ ],
+ [
+ "gotten_previous"
+ ]
+ ],
+ "rewards": {
+ "experience": 1
+ }
+} \ No newline at end of file
diff --git a/src/main/generated/data/minecraft/advancements/ygasi/ninja2.json b/src/main/generated/data/minecraft/advancements/ygasi/ninja2.json
new file mode 100644
index 0000000..a3d229b
--- /dev/null
+++ b/src/main/generated/data/minecraft/advancements/ygasi/ninja2.json
@@ -0,0 +1,40 @@
+{
+ "parent": "minecraft:ygasi/ninja1",
+ "criteria": {
+ "gotten_previous": {
+ "conditions": {
+ "advancement_identifier": "minecraft:ygasi/ninja1"
+ },
+ "trigger": "revelationary:advancement_gotten"
+ },
+ "unlocked_ninja2": {
+ "trigger": "minecraft:impossible"
+ }
+ },
+ "display": {
+ "announce_to_chat": false,
+ "description": {
+ "translate": "advancements.ygasi.mercenary.ninja2.description"
+ },
+ "frame": "task",
+ "hidden": true,
+ "icon": {
+ "item": "minecraft:bamboo"
+ },
+ "show_toast": false,
+ "title": {
+ "translate": "advancements.ygasi.mercenary.ninja2.title"
+ }
+ },
+ "requirements": [
+ [
+ "unlocked_ninja2"
+ ],
+ [
+ "gotten_previous"
+ ]
+ ],
+ "rewards": {
+ "experience": 1
+ }
+} \ No newline at end of file
diff --git a/src/main/generated/data/minecraft/advancements/ygasi/ninja3.json b/src/main/generated/data/minecraft/advancements/ygasi/ninja3.json
new file mode 100644
index 0000000..f3435ce
--- /dev/null
+++ b/src/main/generated/data/minecraft/advancements/ygasi/ninja3.json
@@ -0,0 +1,40 @@
+{
+ "parent": "minecraft:ygasi/ninja2",
+ "criteria": {
+ "gotten_previous": {
+ "conditions": {
+ "advancement_identifier": "minecraft:ygasi/ninja2"
+ },
+ "trigger": "revelationary:advancement_gotten"
+ },
+ "unlocked_ninja3": {
+ "trigger": "minecraft:impossible"
+ }
+ },
+ "display": {
+ "announce_to_chat": false,
+ "description": {
+ "translate": "advancements.ygasi.mercenary.ninja3.description"
+ },
+ "frame": "task",
+ "hidden": true,
+ "icon": {
+ "item": "minecraft:bamboo"
+ },
+ "show_toast": false,
+ "title": {
+ "translate": "advancements.ygasi.mercenary.ninja3.title"
+ }
+ },
+ "requirements": [
+ [
+ "unlocked_ninja3"
+ ],
+ [
+ "gotten_previous"
+ ]
+ ],
+ "rewards": {
+ "experience": 1
+ }
+} \ No newline at end of file
diff --git a/src/main/generated/data/minecraft/advancements/ygasi/offence1.json b/src/main/generated/data/minecraft/advancements/ygasi/offence1.json
new file mode 100644
index 0000000..ede1593
--- /dev/null
+++ b/src/main/generated/data/minecraft/advancements/ygasi/offence1.json
@@ -0,0 +1,41 @@
+{
+ "parent": "minecraft:ygasi/mercenary",
+ "criteria": {
+ "gotten_previous": {
+ "conditions": {
+ "advancement_identifier": "minecraft:ygasi/mercenary"
+ },
+ "trigger": "revelationary:advancement_gotten"
+ },
+ "unlocked_offence1": {
+ "trigger": "minecraft:impossible"
+ }
+ },
+ "display": {
+ "announce_to_chat": false,
+ "description": {
+ "translate": "advancements.ygasi.mercenary.offence1.description"
+ },
+ "frame": "task",
+ "hidden": true,
+ "icon": {
+ "item": "minecraft:iron_sword",
+ "nbt": "{Damage:0}"
+ },
+ "show_toast": false,
+ "title": {
+ "translate": "advancements.ygasi.mercenary.offence1.title"
+ }
+ },
+ "requirements": [
+ [
+ "unlocked_offence1"
+ ],
+ [
+ "gotten_previous"
+ ]
+ ],
+ "rewards": {
+ "experience": 1
+ }
+} \ No newline at end of file
diff --git a/src/main/generated/data/minecraft/advancements/ygasi/offence2.json b/src/main/generated/data/minecraft/advancements/ygasi/offence2.json
new file mode 100644
index 0000000..7d3a72e
--- /dev/null
+++ b/src/main/generated/data/minecraft/advancements/ygasi/offence2.json
@@ -0,0 +1,41 @@
+{
+ "parent": "minecraft:ygasi/offence1",
+ "criteria": {
+ "gotten_previous": {
+ "conditions": {
+ "advancement_identifier": "minecraft:ygasi/offence1"
+ },
+ "trigger": "revelationary:advancement_gotten"
+ },
+ "unlocked_offence2": {
+ "trigger": "minecraft:impossible"
+ }
+ },
+ "display": {
+ "announce_to_chat": false,
+ "description": {
+ "translate": "advancements.ygasi.mercenary.offence2.description"
+ },
+ "frame": "task",
+ "hidden": true,
+ "icon": {
+ "item": "minecraft:iron_sword",
+ "nbt": "{Damage:0}"
+ },
+ "show_toast": false,
+ "title": {
+ "translate": "advancements.ygasi.mercenary.offence2.title"
+ }
+ },
+ "requirements": [
+ [
+ "unlocked_offence2"
+ ],
+ [
+ "gotten_previous"
+ ]
+ ],
+ "rewards": {
+ "experience": 1
+ }
+} \ No newline at end of file
diff --git a/src/main/generated/data/minecraft/advancements/ygasi/offence3.json b/src/main/generated/data/minecraft/advancements/ygasi/offence3.json
new file mode 100644
index 0000000..b70eeae
--- /dev/null
+++ b/src/main/generated/data/minecraft/advancements/ygasi/offence3.json
@@ -0,0 +1,41 @@
+{
+ "parent": "minecraft:ygasi/offence2",
+ "criteria": {
+ "gotten_previous": {
+ "conditions": {
+ "advancement_identifier": "minecraft:ygasi/offence2"
+ },
+ "trigger": "revelationary:advancement_gotten"
+ },
+ "unlocked_offence3": {
+ "trigger": "minecraft:impossible"
+ }
+ },
+ "display": {
+ "announce_to_chat": false,
+ "description": {
+ "translate": "advancements.ygasi.mercenary.offence3.description"
+ },
+ "frame": "task",
+ "hidden": true,
+ "icon": {
+ "item": "minecraft:iron_sword",
+ "nbt": "{Damage:0}"
+ },
+ "show_toast": false,
+ "title": {
+ "translate": "advancements.ygasi.mercenary.offence3.title"
+ }
+ },
+ "requirements": [
+ [
+ "unlocked_offence3"
+ ],
+ [
+ "gotten_previous"
+ ]
+ ],
+ "rewards": {
+ "experience": 1
+ }
+} \ No newline at end of file
diff --git a/src/main/generated/data/minecraft/advancements/ygasi/protean1.json b/src/main/generated/data/minecraft/advancements/ygasi/protean1.json
new file mode 100644
index 0000000..0ff6471
--- /dev/null
+++ b/src/main/generated/data/minecraft/advancements/ygasi/protean1.json
@@ -0,0 +1,40 @@
+{
+ "parent": "minecraft:ygasi/druidry",
+ "criteria": {
+ "gotten_previous": {
+ "conditions": {
+ "advancement_identifier": "minecraft:ygasi/druidry"
+ },
+ "trigger": "revelationary:advancement_gotten"
+ },
+ "unlocked_protean1": {
+ "trigger": "minecraft:impossible"
+ }
+ },
+ "display": {
+ "announce_to_chat": false,
+ "description": {
+ "translate": "advancements.ygasi.druidry.protean1.description"
+ },
+ "frame": "task",
+ "hidden": true,
+ "icon": {
+ "item": "minecraft:slime_ball"
+ },
+ "show_toast": false,
+ "title": {
+ "translate": "advancements.ygasi.druidry.protean1.title"
+ }
+ },
+ "requirements": [
+ [
+ "unlocked_protean1"
+ ],
+ [
+ "gotten_previous"
+ ]
+ ],
+ "rewards": {
+ "experience": 1
+ }
+} \ No newline at end of file
diff --git a/src/main/generated/data/minecraft/advancements/ygasi/protean2.json b/src/main/generated/data/minecraft/advancements/ygasi/protean2.json
new file mode 100644
index 0000000..eb99cac
--- /dev/null
+++ b/src/main/generated/data/minecraft/advancements/ygasi/protean2.json
@@ -0,0 +1,40 @@
+{
+ "parent": "minecraft:ygasi/protean1",
+ "criteria": {
+ "gotten_previous": {
+ "conditions": {
+ "advancement_identifier": "minecraft:ygasi/protean1"
+ },
+ "trigger": "revelationary:advancement_gotten"
+ },
+ "unlocked_protean2": {
+ "trigger": "minecraft:impossible"
+ }
+ },
+ "display": {
+ "announce_to_chat": false,
+ "description": {
+ "translate": "advancements.ygasi.druidry.protean2.description"
+ },
+ "frame": "task",
+ "hidden": true,
+ "icon": {
+ "item": "minecraft:slime_ball"
+ },
+ "show_toast": false,
+ "title": {
+ "translate": "advancements.ygasi.druidry.protean2.title"
+ }
+ },
+ "requirements": [
+ [
+ "unlocked_protean2"
+ ],
+ [
+ "gotten_previous"
+ ]
+ ],
+ "rewards": {
+ "experience": 1
+ }
+} \ No newline at end of file
diff --git a/src/main/generated/data/minecraft/advancements/ygasi/protean3.json b/src/main/generated/data/minecraft/advancements/ygasi/protean3.json
new file mode 100644
index 0000000..a4b7054
--- /dev/null
+++ b/src/main/generated/data/minecraft/advancements/ygasi/protean3.json
@@ -0,0 +1,40 @@
+{
+ "parent": "minecraft:ygasi/protean2",
+ "criteria": {
+ "gotten_previous": {
+ "conditions": {
+ "advancement_identifier": "minecraft:ygasi/protean2"
+ },
+ "trigger": "revelationary:advancement_gotten"
+ },
+ "unlocked_protean3": {
+ "trigger": "minecraft:impossible"
+ }
+ },
+ "display": {
+ "announce_to_chat": false,
+ "description": {
+ "translate": "advancements.ygasi.druidry.protean3.description"
+ },
+ "frame": "task",
+ "hidden": true,
+ "icon": {
+ "item": "minecraft:slime_ball"
+ },
+ "show_toast": false,
+ "title": {
+ "translate": "advancements.ygasi.druidry.protean3.title"
+ }
+ },
+ "requirements": [
+ [
+ "unlocked_protean3"
+ ],
+ [
+ "gotten_previous"
+ ]
+ ],
+ "rewards": {
+ "experience": 1
+ }
+} \ No newline at end of file
diff --git a/src/main/generated/data/minecraft/advancements/ygasi/root.json b/src/main/generated/data/minecraft/advancements/ygasi/root.json
index 5606565..8527500 100644
--- a/src/main/generated/data/minecraft/advancements/ygasi/root.json
+++ b/src/main/generated/data/minecraft/advancements/ygasi/root.json
@@ -8,7 +8,7 @@
"announce_to_chat": false,
"background": "minecraft:textures/block/sculk_catalyst_top.png",
"description": {
- "text": "The journey begins here!"
+ "translate": "advancements.ygasi.root.description"
},
"frame": "challenge",
"hidden": false,
@@ -17,7 +17,7 @@
},
"show_toast": true,
"title": {
- "text": "You've got a skill issue!"
+ "translate": "advancements.ygasi.root.title"
}
},
"requirements": [
diff --git a/src/main/generated/data/minecraft/advancements/ygasi/wizardry.json b/src/main/generated/data/minecraft/advancements/ygasi/wizardry.json
index d52332b..e28c0e2 100644
--- a/src/main/generated/data/minecraft/advancements/ygasi/wizardry.json
+++ b/src/main/generated/data/minecraft/advancements/ygasi/wizardry.json
@@ -14,7 +14,7 @@
"display": {
"announce_to_chat": false,
"description": {
- "text": "Unlock the wizardry branch!"
+ "translate": "advancements.ygasi.wizardry.description"
},
"frame": "goal",
"hidden": false,
@@ -23,7 +23,7 @@
},
"show_toast": false,
"title": {
- "text": "Wizardry"
+ "translate": "advancements.ygasi.wizardry.title"
}
},
"requirements": [
diff --git a/src/main/java/dev/mayaqq/ygasi/Ygasi.java b/src/main/java/dev/mayaqq/ygasi/Ygasi.java
index 4d13d53..5c598ee 100644
--- a/src/main/java/dev/mayaqq/ygasi/Ygasi.java
+++ b/src/main/java/dev/mayaqq/ygasi/Ygasi.java
@@ -4,8 +4,9 @@ import dev.mayaqq.ygasi.items.SkillBookItem;
import dev.mayaqq.ygasi.registry.CommandRegistry;
import dev.mayaqq.ygasi.registry.ConfigRegistry;
import dev.mayaqq.ygasi.registry.StatRegistry;
-import dev.mayaqq.ygasi.util.GrantAdvancementCriterion;
+import dev.mayaqq.ygasi.util.YgasiUtils;
import eu.pb4.polymer.api.item.PolymerItemGroup;
+import eu.pb4.polymer.api.item.PolymerItemUtils;
import eu.pb4.polymer.api.resourcepack.PolymerModelData;
import eu.pb4.polymer.api.resourcepack.PolymerRPUtils;
import net.fabricmc.api.ModInitializer;
@@ -41,10 +42,10 @@ public class Ygasi implements ModInitializer {
if (ConfigRegistry.CONFIG.enableSkillBook) {
ServerPlayConnectionEvents.JOIN.register((handler, sender, server) -> {
- if (!handler.player.getScoreboardTags().contains("ygasi:skill_book_unlocked")) {
- handler.player.addScoreboardTag("ygasi:skill_book_unlocked");
+ if (!handler.player.getScoreboardTags().contains("skill_book_unlocked")) {
+ handler.player.addScoreboardTag("skill_book_unlocked");
handler.player.getInventory().offerOrDrop(new ItemStack(SKILL_BOOK));
- GrantAdvancementCriterion.grantAdvancementCriterion(handler.player, new Identifier("ygasi", "skill_book"), "opened_skill_menu");
+ YgasiUtils.grantAdvancementCriterion(handler.player, new Identifier("ygasi", "recipes/minecraft_ygasi/skill_book"), "opened_skill_menu");
}
});
}
diff --git a/src/main/java/dev/mayaqq/ygasi/gui/BranchGui.java b/src/main/java/dev/mayaqq/ygasi/gui/BranchGui.java
index ca02eec..a9ccb71 100644
--- a/src/main/java/dev/mayaqq/ygasi/gui/BranchGui.java
+++ b/src/main/java/dev/mayaqq/ygasi/gui/BranchGui.java
@@ -1,7 +1,6 @@
package dev.mayaqq.ygasi.gui;
-import dev.mayaqq.ygasi.util.GetAdvancementProgress;
-import dev.mayaqq.ygasi.util.GrantAdvancementCriterion;
+import dev.mayaqq.ygasi.util.YgasiUtils;
import eu.pb4.sgui.api.elements.*;
import net.minecraft.item.ItemStack;
@@ -50,9 +49,9 @@ public class BranchGui {
}
//branch items
- if (!GetAdvancementProgress.get(player, "mercenary")) {
+ if (!YgasiUtils.getAdvancementProgress(player, "mercenary")) {
gui.setSlot(11, new GuiElementBuilder()
- .setItem(Items.IRON_SWORD)
+ .setItem(Items.DIAMOND_SWORD)
.setCustomModelData(1)
.hideFlag(ItemStack.TooltipSection.MODIFIERS)
.addLoreLine(Text.literal("Cost: " + ConfigRegistry.CONFIG.branchCost).setStyle(Style.EMPTY.withFormatting(Formatting.DARK_GRAY)))
@@ -62,7 +61,7 @@ public class BranchGui {
);
} else {
gui.setSlot(11, new GuiElementBuilder()
- .setItem(Items.IRON_SWORD)
+ .setItem(Items.DIAMOND_SWORD)
.hideFlag(ItemStack.TooltipSection.MODIFIERS)
.glow()
.setName(Text.literal("Mercenary")
@@ -71,7 +70,7 @@ public class BranchGui {
);
}
- if (!GetAdvancementProgress.get(player, "wizardry")) {
+ if (!YgasiUtils.getAdvancementProgress(player, "wizardry")) {
gui.setSlot(13, new GuiElementBuilder()
.setItem(Items.BLAZE_ROD)
.addLoreLine(Text.literal("Cost: " + ConfigRegistry.CONFIG.branchCost).setStyle(Style.EMPTY.withFormatting(Formatting.DARK_GRAY)))
@@ -89,7 +88,7 @@ public class BranchGui {
);
}
- if (!GetAdvancementProgress.get(player, "druidry")) {
+ if (!YgasiUtils.getAdvancementProgress(player, "druidry")) {
gui.setSlot(15, new GuiElementBuilder()
.setItem(Items.OAK_SAPLING)
.addLoreLine(Text.literal("Cost: " + ConfigRegistry.CONFIG.branchCost).setStyle(Style.EMPTY.withFormatting(Formatting.DARK_GRAY)))
@@ -106,7 +105,33 @@ public class BranchGui {
.setCallback((index, clickType, actionType) -> DruidryGui.gui(player))
);
}
- GrantAdvancementCriterion.grantAdvancementCriterion(player, new Identifier("minecraft", "ygasi/root"), "opened_skill_menu");
+
+ if (!YgasiUtils.getAdvancementProgress(player, "extra")) {
+ gui.setSlot(26, new GuiElementBuilder()
+ .setItem(Items.BOOK)
+ .addLoreLine(Text.literal("Cost: " + ConfigRegistry.CONFIG.branchCost / 2).setStyle(Style.EMPTY.withFormatting(Formatting.DARK_GRAY)))
+ .setName(Text.literal("Extra")
+ .setStyle(Style.EMPTY.withBold(true).withFormatting(Formatting.BLUE)))
+ .setCallback((index, clickType, actionType) -> save(player, "extra", "§9Extra Skills"))
+ );
+ } else {
+ gui.setSlot(26, new GuiElementBuilder()
+ .setItem(Items.BOOK)
+ .glow()
+ .setName(Text.literal("Extra Skills")
+ .setStyle(Style.EMPTY.withBold(true).withFormatting(Formatting.BLUE)))
+ .setCallback((index, clickType, actionType) -> ExtraGui.gui(player))
+ );
+ }
+
+ //info item
+ gui.setSlot(18, new GuiElementBuilder()
+ .setItem(Items.PAPER)
+ .setName(Text.literal("Info").formatted(Formatting.GOLD).formatted(Formatting.BOLD))
+ .setCallback((index, clickType, actionType) -> infoMessage(player))
+ );
+
+ YgasiUtils.grantAdvancementCriterion(player, new Identifier("minecraft", "ygasi/root"), "opened_skill_menu");
gui.open();
} catch (Exception e) {
@@ -114,24 +139,39 @@ public class BranchGui {
}
}
public static void save(ServerPlayerEntity player, String branch, String branchName) {
- if (player.getStatHandler().getStat(Stats.CUSTOM.getOrCreateStat(SKILL_POINTS)) >= ConfigRegistry.CONFIG.branchCost) {
- player.getStatHandler().setStat(player, Stats.CUSTOM.getOrCreateStat(SKILL_POINTS), player.getStatHandler().getStat(Stats.CUSTOM.getOrCreateStat(SKILL_POINTS)) - ConfigRegistry.CONFIG.branchCost);
- player.sendMessage(Text.of("You have selected the §a" + branchName + " §fbranch!"), false);
- player.closeHandledScreen();
- if (branch.equals("mercenary")) {
- GrantAdvancementCriterion.grantAdvancementCriterion(player, new Identifier("minecraft", "ygasi/mercenary"), "unlocked_mercenary");
- MercenaryGui.gui(player);
- } else if (branch.equals("wizardry")) {
- GrantAdvancementCriterion.grantAdvancementCriterion(player, new Identifier("minecraft", "ygasi/wizardry"), "unlocked_wizardry");
- WizardryGui.gui(player);
- } else if (branch.equals("druidry")) {
- GrantAdvancementCriterion.grantAdvancementCriterion(player, new Identifier("minecraft", "ygasi/druidry"), "unlocked_druidry");
- DruidryGui.gui(player);
+ if (branch.equals("extra")) {
+ if (player.getStatHandler().getStat(Stats.CUSTOM.getOrCreateStat(SKILL_POINTS)) >= ConfigRegistry.CONFIG.branchCost / 2) {
+ player.getStatHandler().setStat(player, Stats.CUSTOM.getOrCreateStat(SKILL_POINTS), player.getStatHandler().getStat(Stats.CUSTOM.getOrCreateStat(SKILL_POINTS)) - ConfigRegistry.CONFIG.branchCost / 2);
+ YgasiUtils.grantAdvancementCriterion(player, new Identifier("minecraft", "ygasi/extra"), "unlocked_extra");
+ player.sendMessage(Text.of("§aYou have unlocked the " + branchName + " branch!"), false);
+ ExtraGui.gui(player);
+ } else {
+ player.sendMessage(Text.of("§cYou do not have enough skill points to unlock this branch!"), false);
}
-
} else {
- player.sendMessage(Text.translatable("gui.ygasi.no.skill").setStyle(Style.EMPTY.withBold(true).withFormatting(Formatting.RED)), false);
- player.closeHandledScreen();
+ if (player.getStatHandler().getStat(Stats.CUSTOM.getOrCreateStat(SKILL_POINTS)) >= ConfigRegistry.CONFIG.branchCost) {
+ player.getStatHandler().setStat(player, Stats.CUSTOM.getOrCreateStat(SKILL_POINTS), player.getStatHandler().getStat(Stats.CUSTOM.getOrCreateStat(SKILL_POINTS)) - ConfigRegistry.CONFIG.branchCost);
+ player.sendMessage(Text.of("You have selected the §a" + branchName + " §fbranch!"), false);
+ player.closeHandledScreen();
+ if (branch.equals("mercenary")) {
+ YgasiUtils.grantAdvancementCriterion(player, new Identifier("minecraft", "ygasi/mercenary"), "unlocked_mercenary");
+ MercenaryGui.gui(player);
+ } else if (branch.equals("wizardry")) {
+ YgasiUtils.grantAdvancementCriterion(player, new Identifier("minecraft", "ygasi/wizardry"), "unlocked_wizardry");
+ WizardryGui.gui(player);
+ } else if (branch.equals("druidry")) {
+ YgasiUtils.grantAdvancementCriterion(player, new Identifier("minecraft", "ygasi/druidry"), "unlocked_druidry");
+ DruidryGui.gui(player);
+ }
+
+ } else {
+ player.sendMessage(Text.translatable("gui.ygasi.no.skill").setStyle(Style.EMPTY.withBold(true).withFormatting(Formatting.RED)), false);
+ player.closeHandledScreen();
+ }
}
}
+ public static void infoMessage(ServerPlayerEntity player) {
+ player.closeHandledScreen();
+ player.sendMessage(Text.translatable("gui.ygasi.info.main"), false);
+ }
} \ No newline at end of file
diff --git a/src/main/java/dev/mayaqq/ygasi/gui/DruidryGui.java b/src/main/java/dev/mayaqq/ygasi/gui/DruidryGui.java
index d2be67e..dc5e5e7 100644
--- a/src/main/java/dev/mayaqq/ygasi/gui/DruidryGui.java
+++ b/src/main/java/dev/mayaqq/ygasi/gui/DruidryGui.java
@@ -1,6 +1,6 @@
package dev.mayaqq.ygasi.gui;
-import dev.mayaqq.ygasi.util.GetAdvancementProgress;
+import dev.mayaqq.ygasi.util.YgasiUtils;
import eu.pb4.sgui.api.elements.GuiElementBuilder;
import net.minecraft.item.Items;
import net.minecraft.screen.ScreenHandlerType;
@@ -13,7 +13,7 @@ import static dev.mayaqq.ygasi.registry.StatRegistry.SKILL_POINTS;
public class DruidryGui {
public static void gui(ServerPlayerEntity player) {
try {
- if (!GetAdvancementProgress.get(player, "druidry")) {
+ if (!YgasiUtils.getAdvancementProgress(player, "druidry")) {
player.sendMessage(Text.of("§cYou have not unlocked this branch yet!"), false);
BranchGui.gui(player);
} else {
diff --git a/src/main/java/dev/mayaqq/ygasi/gui/ExtraGui.java b/src/main/java/dev/mayaqq/ygasi/gui/ExtraGui.java
new file mode 100644
index 0000000..98ca697
--- /dev/null
+++ b/src/main/java/dev/mayaqq/ygasi/gui/ExtraGui.java
@@ -0,0 +1,36 @@
+package dev.mayaqq.ygasi.gui;
+
+import dev.mayaqq.ygasi.util.YgasiUtils;
+import eu.pb4.sgui.api.elements.GuiElementBuilder;
+import net.minecraft.item.Items;
+import net.minecraft.screen.ScreenHandlerType;
+import net.minecraft.server.network.ServerPlayerEntity;
+import net.minecraft.stat.Stats;
+import net.minecraft.text.Text;
+
+import static dev.mayaqq.ygasi.registry.StatRegistry.SKILL_POINTS;
+
+public class ExtraGui {
+ public static void gui(ServerPlayerEntity player) {
+ try {
+ if (!YgasiUtils.getAdvancementProgress(player, "extra")) {
+ player.sendMessage(Text.of("§cYou have not unlocked this branch yet!"), false);
+ BranchGui.gui(player);
+ } else {
+ SkillGui gui = new SkillGui(ScreenHandlerType.GENERIC_9X3, player, false) {};
+
+ gui.setTitle(Text.of( "§9§lExtra " + "§3Skill Points: " + player.getStatHandler().getStat(Stats.CUSTOM.getOrCreateStat(SKILL_POINTS))));
+
+ for (int x = 0; x <= 26; x++) {
+ gui.setSlot(x, new GuiElementBuilder()
+ .setItem(Items.GRAY_STAINED_GLASS_PANE)
+ .setName(Text.of(" "))
+ );
+ }
+ gui.open();
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+} \ No newline at end of file
diff --git a/src/main/java/dev/mayaqq/ygasi/gui/MercenaryGui.java b/src/main/java/dev/mayaqq/ygasi/gui/MercenaryGui.java
index ea75c43..79cc08d 100644
--- a/src/main/java/dev/mayaqq/ygasi/gui/MercenaryGui.java
+++ b/src/main/java/dev/mayaqq/ygasi/gui/MercenaryGui.java
@@ -1,6 +1,6 @@
package dev.mayaqq.ygasi.gui;
-import dev.mayaqq.ygasi.util.GetAdvancementProgress;
+import dev.mayaqq.ygasi.util.YgasiUtils;
import eu.pb4.sgui.api.elements.GuiElementBuilder;
import net.minecraft.item.Items;
import net.minecraft.screen.ScreenHandlerType;
@@ -13,14 +13,14 @@ import static dev.mayaqq.ygasi.registry.StatRegistry.SKILL_POINTS;
public class MercenaryGui {
public static void gui(ServerPlayerEntity player) {
try {
- if (!GetAdvancementProgress.get(player, "mercenary")) {
+ if (!YgasiUtils.getAdvancementProgress(player, "mercenary")) {
player.sendMessage(Text.of("§cYou have not unlocked this branch yet!"), false);
BranchGui.gui(player);
} else {
SkillGui gui = new SkillGui(ScreenHandlerType.GENERIC_9X6, player, false) {};
gui.setTitle(Text.of( "§c§lMercenary " + "§3Skill Points: " + player.getStatHandler().getStat(Stats.CUSTOM.getOrCreateStat(SKILL_POINTS))));
-
+ //background items
for (int x = 0; x <= 53; x++) {
gui.setSlot(x, new GuiElementBuilder()
.setItem(Items.GRAY_STAINED_GLASS_PANE)
@@ -28,6 +28,12 @@ public class MercenaryGui {
);
}
+ //skill items
+ gui.setSlot(49, new GuiElementBuilder()
+ .setItem(Items.DIAMOND_BLOCK)
+ .setName(Text.of("§c§lMercenary Unlocked!"))
+ .addLoreLine(Text.of("§3Skill Points: " + player.getStatHandler().getStat(Stats.CUSTOM.getOrCreateStat(SKILL_POINTS))))
+ );
gui.open();
}
diff --git a/src/main/java/dev/mayaqq/ygasi/gui/WizardryGui.java b/src/main/java/dev/mayaqq/ygasi/gui/WizardryGui.java
index f5ae47f..d049e5a 100644
--- a/src/main/java/dev/mayaqq/ygasi/gui/WizardryGui.java
+++ b/src/main/java/dev/mayaqq/ygasi/gui/WizardryGui.java
@@ -1,6 +1,6 @@
package dev.mayaqq.ygasi.gui;
-import dev.mayaqq.ygasi.util.GetAdvancementProgress;
+import dev.mayaqq.ygasi.util.YgasiUtils;
import eu.pb4.sgui.api.elements.GuiElementBuilder;
import net.minecraft.item.Items;
import net.minecraft.screen.ScreenHandlerType;
@@ -13,7 +13,7 @@ import static dev.mayaqq.ygasi.registry.StatRegistry.SKILL_POINTS;
public class WizardryGui {
public static void gui(ServerPlayerEntity player) {
try {
- if (!GetAdvancementProgress.get(player, "wizardry")) {
+ if (!YgasiUtils.getAdvancementProgress(player, "wizardry")) {
player.sendMessage(Text.of("§cYou have not unlocked this branch yet!"), false);
BranchGui.gui(player);
} else {
diff --git a/src/main/java/dev/mayaqq/ygasi/registry/dataGen/advancements/AdvancementProvider.java b/src/main/java/dev/mayaqq/ygasi/registry/dataGen/advancements/AdvancementProvider.java
index 6a91296..5748316 100644
--- a/src/main/java/dev/mayaqq/ygasi/registry/dataGen/advancements/AdvancementProvider.java
+++ b/src/main/java/dev/mayaqq/ygasi/registry/dataGen/advancements/AdvancementProvider.java
@@ -1,6 +1,5 @@
package dev.mayaqq.ygasi.registry.dataGen.advancements;
-import dev.mayaqq.ygasi.registry.dataGen.advancements.Advancements;
import net.fabricmc.fabric.api.datagen.v1.FabricDataGenerator;
import net.fabricmc.fabric.api.datagen.v1.provider.FabricAdvancementProvider;
import net.minecraft.advancement.Advancement;
diff --git a/src/main/java/dev/mayaqq/ygasi/registry/dataGen/advancements/Advancements.java b/src/main/java/dev/mayaqq/ygasi/registry/dataGen/advancements/Advancements.java
index 6cd5665..130a885 100644
--- a/src/main/java/dev/mayaqq/ygasi/registry/dataGen/advancements/Advancements.java
+++ b/src/main/java/dev/mayaqq/ygasi/registry/dataGen/advancements/Advancements.java
@@ -16,66 +16,159 @@ public class Advancements implements Consumer<Consumer<Advancement>> {
@Override
public void accept(Consumer<Advancement> consumer) {
- Advancement rootAdvancement = Advancement.Builder.create()
- .display(
- Items.DIAMOND, // The display icon
- Text.literal("You've got a skill issue!"), // The title
- Text.literal("The journey begins here!"), // The description
- new Identifier("textures/block/sculk_catalyst_top.png"), // Background image used
- AdvancementFrame.CHALLENGE, // Options: TASK, CHALLENGE, GOAL
- true, // Show toast top right
- false, // Announce to chat
- false // Hidden in the advancement tab
- )
- // The first string used in criterion is the name referenced by other advancements when they want to have 'requirements'
- .criterion("opened_skill_menu", new ImpossibleCriterion.Conditions())
- .rewards(AdvancementRewards.Builder.experience(1))
- .build(consumer, "ygasi" + "/root");
+ //main root advancement
+ Advancement rootAdvancement = Advancement.Builder.create().display(Items.DIAMOND, // The display icon
+ Text.translatable("advancements.ygasi.root.title"), // The title
+ Text.translatable("advancements.ygasi.root.description"), // The description
+ new Identifier("textures/block/sculk_catalyst_top.png"), // Background image used
+ AdvancementFrame.CHALLENGE, // Options: TASK, CHALLENGE, GOAL
+ true, // Show toast top right
+ false, // Announce to chat
+ false // Hidden in the advancement tab
+ ).criterion("opened_skill_menu", new ImpossibleCriterion.Conditions()).rewards(AdvancementRewards.Builder.experience(1)).build(consumer, "ygasi" + "/root");
+ //branch advancements
Advancement mercenary = Advancement.Builder.create().parent(rootAdvancement)
- .display(
- Items.IRON_SWORD,
- Text.literal("Mercenary"),
- Text.literal("Unlock the mercenary branch!"),
- null,
- AdvancementFrame.GOAL,
- false,
- false,
- false
- )
- .criterion("unlocked_mercenary", new ImpossibleCriterion.Conditions())
- .criterion("gotten_previous", new AdvancementGottenCriterion.Conditions(EntityPredicate.Extended.EMPTY, rootAdvancement.getId()))
- .rewards(AdvancementRewards.Builder.experience(1))
- .build(consumer, "ygasi" + "/mercenary");
+ .display(Items.DIAMOND_SWORD, Text.translatable("advancements.ygasi.mercenary.title"), Text.translatable("advancements.ygasi.mercenary.description"), null, AdvancementFrame.GOAL, false, false, false)
+ .criterion("unlocked_mercenary", new ImpossibleCriterion.Conditions()).criterion("gotten_previous", new AdvancementGottenCriterion.Conditions(EntityPredicate.Extended.EMPTY, rootAdvancement.getId()))
+ .rewards(AdvancementRewards.Builder.experience(1)).build(consumer, "ygasi" + "/mercenary");
Advancement wizardry = Advancement.Builder.create().parent(rootAdvancement)
- .display(
- Items.BLAZE_ROD,
- Text.literal("Wizardry"),
- Text.literal("Unlock the wizardry branch!"),
- null,
- AdvancementFrame.GOAL,
- false,
- false,
- false
- )
- .criterion("unlocked_wizardry", new ImpossibleCriterion.Conditions())
- .criterion("gotten_previous", new AdvancementGottenCriterion.Conditions(EntityPredicate.Extended.EMPTY, rootAdvancement.getId()))
- .rewards(AdvancementRewards.Builder.experience(1))
- .build(consumer, "ygasi" + "/wizardry");
+ .display(Items.BLAZE_ROD, Text.translatable("advancements.ygasi.wizardry.title"), Text.translatable("advancements.ygasi.wizardry.description"), null, AdvancementFrame.GOAL, false, false, false)
+ .criterion("unlocked_wizardry", new ImpossibleCriterion.Conditions()).criterion("gotten_previous", new AdvancementGottenCriterion.Conditions(EntityPredicate.Extended.EMPTY, rootAdvancement.getId()))
+ .rewards(AdvancementRewards.Builder.experience(1)).build(consumer, "ygasi" + "/wizardry");
Advancement druidry = Advancement.Builder.create().parent(rootAdvancement)
- .display(
- Items.OAK_SAPLING,
- Text.literal("Druidry"),
- Text.literal("Unlock the druidry branch!"),
- null,
- AdvancementFrame.GOAL,
- false,
- false,
- false
- )
- .criterion("unlocked_druidry", new ImpossibleCriterion.Conditions())
- .criterion("gotten_previous", new AdvancementGottenCriterion.Conditions(EntityPredicate.Extended.EMPTY, rootAdvancement.getId()))
- .rewards(AdvancementRewards.Builder.experience(1))
- .build(consumer, "ygasi" + "/druidry");
+ .display(Items.OAK_SAPLING, Text.translatable("advancements.ygasi.druidry.title"), Text.translatable("advancements.ygasi.druidry.description"), null, AdvancementFrame.GOAL, false, false, false)
+ .criterion("unlocked_druidry", new ImpossibleCriterion.Conditions()).criterion("gotten_previous", new AdvancementGottenCriterion.Conditions(EntityPredicate.Extended.EMPTY, rootAdvancement.getId()))
+ .rewards(AdvancementRewards.Builder.experience(1)).build(consumer, "ygasi" + "/druidry");
+ Advancement extra = Advancement.Builder.create().parent(rootAdvancement)
+ .display(Items.EMERALD, Text.translatable("advancements.ygasi.extra.title"), Text.translatable("advancements.ygasi.extra.description"), null, AdvancementFrame.GOAL, false, false, false)
+ .criterion("unlocked_extra", new ImpossibleCriterion.Conditions()).criterion("gotten_previous", new AdvancementGottenCriterion.Conditions(EntityPredicate.Extended.EMPTY, rootAdvancement.getId()))
+ .rewards(AdvancementRewards.Builder.experience(1)).build(consumer, "ygasi" + "/extra");
+
+ //mercenary skills
+
+ Advancement offence1 = Advancement.Builder.create().parent(mercenary)
+ .display(Items.IRON_SWORD, Text.translatable("advancements.ygasi.mercenary.offence1.title"), Text.translatable("advancements.ygasi.mercenary.offence1.description"), null, AdvancementFrame.TASK, false, false, true)
+ .criterion("unlocked_offence1", new ImpossibleCriterion.Conditions()).criterion("gotten_previous", new AdvancementGottenCriterion.Conditions(EntityPredicate.Extended.EMPTY, mercenary.getId()))
+ .rewards(AdvancementRewards.Builder.experience(1)).build(consumer, "ygasi" + "/offence1");
+ Advancement offence2 = Advancement.Builder.create().parent(offence1)
+ .display(Items.IRON_SWORD, Text.translatable("advancements.ygasi.mercenary.offence2.title"), Text.translatable("advancements.ygasi.mercenary.offence2.description"), null, AdvancementFrame.TASK, false, false, true)
+ .criterion("unlocked_offence2", new ImpossibleCriterion.Conditions()).criterion("gotten_previous", new AdvancementGottenCriterion.Conditions(EntityPredicate.Extended.EMPTY, offence1.getId()))
+ .rewards(AdvancementRewards.Builder.experience(1)).build(consumer, "ygasi" + "/offence2");
+ Advancement offence3 = Advancement.Builder.create().parent(offence2)
+ .display(Items.IRON_SWORD, Text.translatable("advancements.ygasi.mercenary.offence3.title"), Text.translatable("advancements.ygasi.mercenary.offence3.description"), null, AdvancementFrame.TASK, false, false, true)
+ .criterion("unlocked_offence3", new ImpossibleCriterion.Conditions()).criterion("gotten_previous", new AdvancementGottenCriterion.Conditions(EntityPredicate.Extended.EMPTY, offence2.getId()))
+ .rewards(AdvancementRewards.Builder.experience(1)).build(consumer, "ygasi" + "/offence3");
+
+ Advancement ninja1 = Advancement.Builder.create().parent(mercenary)
+ .display(Items.BAMBOO, Text.translatable("advancements.ygasi.mercenary.ninja1.title"), Text.translatable("advancements.ygasi.mercenary.ninja1.description"), null, AdvancementFrame.TASK, false, false, true)
+ .criterion("unlocked_ninja1", new ImpossibleCriterion.Conditions()).criterion("gotten_previous", new AdvancementGottenCriterion.Conditions(EntityPredicate.Extended.EMPTY, mercenary.getId()))
+ .rewards(AdvancementRewards.Builder.experience(1)).build(consumer, "ygasi" + "/ninja1");
+ Advancement ninja2 = Advancement.Builder.create().parent(ninja1)
+ .display(Items.BAMBOO, Text.translatable("advancements.ygasi.mercenary.ninja2.title"), Text.translatable("advancements.ygasi.mercenary.ninja2.description"), null, AdvancementFrame.TASK, false, false, true)
+ .criterion("unlocked_ninja2", new ImpossibleCriterion.Conditions()).criterion("gotten_previous", new AdvancementGottenCriterion.Conditions(EntityPredicate.Extended.EMPTY, ninja1.getId()))
+ .rewards(AdvancementRewards.Builder.experience(1)).build(consumer, "ygasi" + "/ninja2");
+ Advancement ninja3 = Advancement.Builder.create().parent(ninja2)
+ .display(Items.BAMBOO, Text.translatable("advancements.ygasi.mercenary.ninja3.title"), Text.translatable("advancements.ygasi.mercenary.ninja3.description"), null, AdvancementFrame.TASK, false, false, true)
+ .criterion("unlocked_ninja3", new ImpossibleCriterion.Conditions()).criterion("gotten_previous", new AdvancementGottenCriterion.Conditions(EntityPredicate.Extended.EMPTY, ninja2.getId()))
+ .rewards(AdvancementRewards.Builder.experience(1)).build(consumer, "ygasi" + "/ninja3");
+
+ Advancement defence1 = Advancement.Builder.create().parent(mercenary)
+ .display(Items.IRON_CHESTPLATE, Text.translatable("advancements.ygasi.mercenary.defence1.title"), Text.translatable("advancements.ygasi.mercenary.defence1.description"), null, AdvancementFrame.TASK, false, false, true)
+ .criterion("unlocked_defence1", new ImpossibleCriterion.Conditions()).criterion("gotten_previous", new AdvancementGottenCriterion.Conditions(EntityPredicate.Extended.EMPTY, mercenary.getId()))
+ .rewards(AdvancementRewards.Builder.experience(1)).build(consumer, "ygasi" + "/defence1");
+ Advancement defence2 = Advancement.Builder.create().parent(defence1)
+ .display(Items.IRON_CHESTPLATE, Text.translatable("advancements.ygasi.mercenary.defence2.title"), Text.translatable("advancements.ygasi.mercenary.defence2.description"), null, AdvancementFrame.TASK, false, false, true)
+ .criterion("unlocked_defence2", new ImpossibleCriterion.Conditions()).criterion("gotten_previous", new AdvancementGottenCriterion.Conditions(EntityPredicate.Extended.EMPTY, defence1.getId()))
+ .rewards(AdvancementRewards.Builder.experience(1)).build(consumer, "ygasi" + "/defence2");
+ Advancement defence3 = Advancement.Builder.create().parent(defence2)
+ .display(Items.IRON_CHESTPLATE, Text.translatable("advancements.ygasi.mercenary.defence3.title"), Text.translatable("advancements.ygasi.mercenary.defence3.description"), null, AdvancementFrame.TASK, false, false, true)
+ .criterion("unlocked_defence3", new ImpossibleCriterion.Conditions()).criterion("gotten_previous", new AdvancementGottenCriterion.Conditions(EntityPredicate.Extended.EMPTY, defence2.getId()))
+ .rewards(AdvancementRewards.Builder.experience(1)).build(consumer, "ygasi" + "/defence3");
+
+ //wizardry skills
+
+ Advancement fight1 = Advancement.Builder.create().parent(wizardry)
+ .display(Items.BLAZE_POWDER, Text.translatable("advancements.ygasi.wizardry.fight1.title"), Text.translatable("advancements.ygasi.wizardry.fight1.description"), null, AdvancementFrame.TASK, false, false, true)
+ .criterion("unlocked_fight1", new ImpossibleCriterion.Conditions()).criterion("gotten_previous", new AdvancementGottenCriterion.Conditions(EntityPredicate.Extended.EMPTY, wizardry.getId()))
+ .rewards(AdvancementRewards.Builder.experience(1)).build(consumer, "ygasi" + "/fight1");
+ Advancement fight2 = Advancement.Builder.create().parent(fight1)
+ .display(Items.BLAZE_POWDER, Text.translatable("advancements.ygasi.wizardry.fight2.title"), Text.translatable("advancements.ygasi.wizardry.fight2.description"), null, AdvancementFrame.TASK, false, false, true)
+ .criterion("unlocked_fight2", new ImpossibleCriterion.Conditions()).criterion("gotten_previous", new AdvancementGottenCriterion.Conditions(EntityPredicate.Extended.EMPTY, fight1.getId()))
+ .rewards(AdvancementRewards.Builder.experience(1)).build(consumer, "ygasi" + "/fight2");
+ Advancement fight3 = Advancement.Builder.create().parent(fight2)
+ .display(Items.BLAZE_POWDER, Text.translatable("advancements.ygasi.wizardry.fight3.title"), Text.translatable("advancements.ygasi.wizardry.fight3.description"), null, AdvancementFrame.TASK, false, false, true)
+ .criterion("unlocked_fight3", new ImpossibleCriterion.Conditions()).criterion("gotten_previous", new AdvancementGottenCriterion.Conditions(EntityPredicate.Extended.EMPTY, fight2.getId()))
+ .rewards(AdvancementRewards.Builder.experience(1)).build(consumer, "ygasi" + "/fight3");
+
+ Advancement element1 = Advancement.Builder.create().parent(wizardry)
+ .display(Items.FIRE_CHARGE, Text.translatable("advancements.ygasi.wizardry.element1.title"), Text.translatable("advancements.ygasi.wizardry.element1.description"), null, AdvancementFrame.TASK, false, false, true)
+ .criterion("unlocked_element1", new ImpossibleCriterion.Conditions()).criterion("gotten_previous", new AdvancementGottenCriterion.Conditions(EntityPredicate.Extended.EMPTY, wizardry.getId()))
+ .rewards(AdvancementRewards.Builder.experience(1)).build(consumer, "ygasi" + "/element1");
+ Advancement element2 = Advancement.Builder.create().parent(element1)
+ .display(Items.FIRE_CHARGE, Text.translatable("advancements.ygasi.wizardry.element2.title"), Text.translatable("advancements.ygasi.wizardry.element2.description"), null, AdvancementFrame.TASK, false, false, true)
+ .criterion("unlocked_element2", new ImpossibleCriterion.Conditions()).criterion("gotten_previous", new AdvancementGottenCriterion.Conditions(EntityPredicate.Extended.EMPTY, element1.getId()))
+ .rewards(AdvancementRewards.Builder.experience(1)).build(consumer, "ygasi" + "/element2");
+ Advancement element3 = Advancement.Builder.create().parent(element2)
+ .display(Items.FIRE_CHARGE, Text.translatable("advancements.ygasi.wizardry.element3.title"), Text.translatable("advancements.ygasi.wizardry.element3.description"), null, AdvancementFrame.TASK, false, false, true)
+ .criterion("unlocked_element3", new ImpossibleCriterion.Conditions()).criterion("gotten_previous", new AdvancementGottenCriterion.Conditions(EntityPredicate.Extended.EMPTY, element2.getId()))
+ .rewards(AdvancementRewards.Builder.experience(1)).build(consumer, "ygasi" + "/element3");
+
+ Advancement force1 = Advancement.Builder.create().parent(wizardry)
+ .display(Items.ENDER_PEARL, Text.translatable("advancements.ygasi.wizardry.force1.title"), Text.translatable("advancements.ygasi.wizardry.force1.description"), null, AdvancementFrame.TASK, false, false, true)
+ .criterion("unlocked_force1", new ImpossibleCriterion.Conditions()).criterion("gotten_previous", new AdvancementGottenCriterion.Conditions(EntityPredicate.Extended.EMPTY, wizardry.getId()))
+ .rewards(AdvancementRewards.Builder.experience(1)).build(consumer, "ygasi" + "/force1");
+ Advancement force2 = Advancement.Builder.create().parent(force1)
+ .display(Items.ENDER_PEARL, Text.translatable("advancements.ygasi.wizardry.force2.title"), Text.translatable("advancements.ygasi.wizardry.force2.description"), null, AdvancementFrame.TASK, false, false, true)
+ .criterion("unlocked_force2", new ImpossibleCriterion.Conditions()).criterion("gotten_previous", new AdvancementGottenCriterion.Conditions(EntityPredicate.Extended.EMPTY, force1.getId()))
+ .rewards(AdvancementRewards.Builder.experience(1)).build(consumer, "ygasi" + "/force2");
+ Advancement force3 = Advancement.Builder.create().parent(force2)
+ .display(Items.ENDER_PEARL, Text.translatable("advancements.ygasi.wizardry.force3.title"), Text.translatable("advancements.ygasi.wizardry.force3.description"), null, AdvancementFrame.TASK, false, false, true)
+ .criterion("unlocked_force3", new ImpossibleCriterion.Conditions()).criterion("gotten_previous", new AdvancementGottenCriterion.Conditions(EntityPredicate.Extended.EMPTY, force2.getId()))
+ .rewards(AdvancementRewards.Builder.experience(1)).build(consumer, "ygasi" + "/force3");
+
+ //druidry skills
+
+ Advancement necromancy1 = Advancement.Builder.create().parent(druidry)
+ .display(Items.BONE, Text.translatable("advancements.ygasi.druidry.necromancy1.title"), Text.translatable("advancements.ygasi.druidry.necromancy1.description"), null, AdvancementFrame.TASK, false, false, true)
+ .criterion("unlocked_necromancy1", new ImpossibleCriterion.Conditions()).criterion("gotten_previous", new AdvancementGottenCriterion.Conditions(EntityPredicate.Extended.EMPTY, druidry.getId()))
+ .rewards(AdvancementRewards.Builder.experience(1)).build(consumer, "ygasi" + "/necromancy1");
+ Advancement necromancy2 = Advancement.Builder.create().parent(necromancy1)
+ .display(Items.BONE, Text.translatable("advancements.ygasi.druidry.necromancy2.title"), Text.translatable("advancements.ygasi.druidry.necromancy2.description"), null, AdvancementFrame.TASK, false, false, true)
+ .criterion("unlocked_necromancy2", new ImpossibleCriterion.Conditions()).criterion("gotten_previous", new AdvancementGottenCriterion.Conditions(EntityPredicate.Extended.EMPTY, necromancy1.getId()))
+ .rewards(AdvancementRewards.Builder.experience(1)).build(consumer, "ygasi" + "/necromancy2");
+ Advancement necromancy3 = Advancement.Builder.create().parent(necromancy2)
+ .display(Items.BONE, Text.translatable("advancements.ygasi.druidry.necromancy3.title"), Text.translatable("advancements.ygasi.druidry.necromancy3.description"), null, AdvancementFrame.TASK, false, false, true)
+ .criterion("unlocked_necromancy3", new ImpossibleCriterion.Conditions()).criterion("gotten_previous", new AdvancementGottenCriterion.Conditions(EntityPredicate.Extended.EMPTY, necromancy2.getId()))
+ .rewards(AdvancementRewards.Builder.experience(1)).build(consumer, "ygasi" + "/necromancy3");
+
+ Advancement nature1 = Advancement.Builder.create().parent(druidry)
+ .display(Items.GRASS_BLOCK, Text.translatable("advancements.ygasi.druidry.nature1.title"), Text.translatable("advancements.ygasi.druidry.nature1.description"), null, AdvancementFrame.TASK, false, false, true)
+ .criterion("unlocked_nature1", new ImpossibleCriterion.Conditions()).criterion("gotten_previous", new AdvancementGottenCriterion.Conditions(EntityPredicate.Extended.EMPTY, druidry.getId()))
+ .rewards(AdvancementRewards.Builder.experience(1)).build(consumer, "ygasi" + "/nature1");
+ Advancement nature2 = Advancement.Builder.create().parent(nature1)
+ .display(Items.GRASS_BLOCK, Text.translatable("advancements.ygasi.druidry.nature2.title"), Text.translatable("advancements.ygasi.druidry.nature2.description"), null, AdvancementFrame.TASK, false, false, true)
+ .criterion("unlocked_nature2", new ImpossibleCriterion.Conditions()).criterion("gotten_previous", new AdvancementGottenCriterion.Conditions(EntityPredicate.Extended.EMPTY, nature1.getId()))
+ .rewards(AdvancementRewards.Builder.experience(1)).build(consumer, "ygasi" + "/nature2");
+ Advancement nature3 = Advancement.Builder.create().parent(nature2)
+ .display(Items.GRASS_BLOCK, Text.translatable("advancements.ygasi.druidry.nature3.title"), Text.translatable("advancements.ygasi.druidry.nature3.description"), null, AdvancementFrame.TASK, false, false, true)
+ .criterion("unlocked_nature3", new ImpossibleCriterion.Conditions()).criterion("gotten_previous", new AdvancementGottenCriterion.Conditions(EntityPredicate.Extended.EMPTY, nature2.getId()))
+ .rewards(AdvancementRewards.Builder.experience(1)).build(consumer, "ygasi" + "/nature3");
+
+ Advancement protean1 = Advancement.Builder.create().parent(druidry)
+ .display(Items.SLIME_BALL, Text.translatable("advancements.ygasi.druidry.protean1.title"), Text.translatable("advancements.ygasi.druidry.protean1.description"), null, AdvancementFrame.TASK, false, false, true)
+ .criterion("unlocked_protean1", new ImpossibleCriterion.Conditions()).criterion("gotten_previous", new AdvancementGottenCriterion.Conditions(EntityPredicate.Extended.EMPTY, druidry.getId()))
+ .rewards(AdvancementRewards.Builder.experience(1)).build(consumer, "ygasi" + "/protean1");
+ Advancement protean2 = Advancement.Builder.create().parent(protean1)
+ .display(Items.SLIME_BALL, Text.translatable("advancements.ygasi.druidry.protean2.title"), Text.translatable("advancements.ygasi.druidry.protean2.description"), null, AdvancementFrame.TASK, false, false, true)
+ .criterion("unlocked_protean2", new ImpossibleCriterion.Conditions()).criterion("gotten_previous", new AdvancementGottenCriterion.Conditions(EntityPredicate.Extended.EMPTY, protean1.getId()))
+ .rewards(AdvancementRewards.Builder.experience(1)).build(consumer, "ygasi" + "/protean2");
+ Advancement protean3 = Advancement.Builder.create().parent(protean2)
+ .display(Items.SLIME_BALL, Text.translatable("advancements.ygasi.druidry.protean3.title"), Text.translatable("advancements.ygasi.druidry.protean3.description"), null, AdvancementFrame.TASK, false, false, true)
+ .criterion("unlocked_protean3", new ImpossibleCriterion.Conditions()).criterion("gotten_previous", new AdvancementGottenCriterion.Conditions(EntityPredicate.Extended.EMPTY, protean2.getId()))
+ .rewards(AdvancementRewards.Builder.experience(1)).build(consumer, "ygasi" + "/protean3");
+
+ //extra
+
}
} \ No newline at end of file
diff --git a/src/main/java/dev/mayaqq/ygasi/util/GetAdvancementProgress.java b/src/main/java/dev/mayaqq/ygasi/util/GetAdvancementProgress.java
deleted file mode 100644
index 9b4d4a8..0000000
--- a/src/main/java/dev/mayaqq/ygasi/util/GetAdvancementProgress.java
+++ /dev/null
@@ -1,10 +0,0 @@
-package dev.mayaqq.ygasi.util;
-
-import net.minecraft.server.network.ServerPlayerEntity;
-import net.minecraft.util.Identifier;
-
-public class GetAdvancementProgress {
- public static boolean get(ServerPlayerEntity player, String advancement) {
- return player.getAdvancementTracker().getProgress(player.getServer().getAdvancementLoader().get(new Identifier("minecraft", "ygasi/" + advancement))).isDone();
- }
-}
diff --git a/src/main/java/dev/mayaqq/ygasi/util/GrantAdvancementCriterion.java b/src/main/java/dev/mayaqq/ygasi/util/YgasiUtils.java
index c141c06..ba3cfc8 100644
--- a/src/main/java/dev/mayaqq/ygasi/util/GrantAdvancementCriterion.java
+++ b/src/main/java/dev/mayaqq/ygasi/util/YgasiUtils.java
@@ -9,7 +9,7 @@ import org.jetbrains.annotations.NotNull;
import static dev.mayaqq.ygasi.Ygasi.LOGGER;
-public class GrantAdvancementCriterion {
+public class YgasiUtils {
public static void grantAdvancementCriterion(@NotNull ServerPlayerEntity serverPlayerEntity, Identifier advancementIdentifier, String criterion) {
if (serverPlayerEntity.getServer() == null) {
return;
@@ -26,4 +26,8 @@ public class GrantAdvancementCriterion {
}
}
}
-}
+
+ public static boolean getAdvancementProgress(ServerPlayerEntity player, String advancement) {
+ return player.getAdvancementTracker().getProgress(player.getServer().getAdvancementLoader().get(new Identifier("minecraft", "ygasi/" + advancement))).isDone();
+ }
+} \ No newline at end of file
diff --git a/src/main/resources/data/ygasi/lang/en_us.json b/src/main/resources/data/ygasi/lang/en_us.json
index 4af9c88..c986d87 100644
--- a/src/main/resources/data/ygasi/lang/en_us.json
+++ b/src/main/resources/data/ygasi/lang/en_us.json
@@ -4,5 +4,7 @@
"creative.ygasi.group": "Ygasi",
- "gui.ygasi.no.skill": "You don't have enough skill points to unlock this branch!"
+ "gui.ygasi.no.skill": "You don't have enough skill points to unlock this branch!",
+
+ "gui.ygasi.info.main": "§6§lYgasi Skill Advancement System:\n§r§3When using Ygasi, every time you get an Advancement, you will get a §6Skill Point!§3 Then when you gather enough skill points throughout your journey you can unlock new interesting skills in the §6skill book§3 and improve your game experience, from protecting yourself from falling to summoning a horde of undead you can do everything with just a bit of patience, skill and fun!"
} \ No newline at end of file
diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json
index bec8142..656a474 100644
--- a/src/main/resources/fabric.mod.json
+++ b/src/main/resources/fabric.mod.json
@@ -9,8 +9,8 @@
"Mayaqq"
],
"contact": {
- "homepage": "https://github.com/Maximusbarcz",
- "sources": "https://github.com/Maximusbarcz/youve-got-a-skill-issue"
+ "homepage": "https://github.com/Mayaqq",
+ "sources": "https://github.com/Mayaqq/youve-got-a-skill-issue"
},
"license": "LGPL-3",