From 2369445529f03faa4426fc7bcbb298d610deb37f Mon Sep 17 00:00:00 2001 From: Sollace Date: Sat, 20 May 2023 12:00:48 +0100 Subject: [PATCH] Fix some advancements and add advancements for farming rocks --- .../unicopia/mixin/MixinPlayerInventory.java | 2 +- .../resources/assets/unicopia/lang/en_us.json | 17 +++++++-- .../unicopia/earth/born_on_a_rock_farm.json | 31 ++++++++++++++++ .../unicopia/earth/earth_route.json | 37 +++++++++++++++++++ .../unicopia/earth/thats_unusual.json | 31 ++++++++++++++++ .../{xp_mine.json => xp_miner.json} | 4 +- 6 files changed, 115 insertions(+), 7 deletions(-) create mode 100644 src/main/resources/data/unicopia/advancements/unicopia/earth/born_on_a_rock_farm.json create mode 100644 src/main/resources/data/unicopia/advancements/unicopia/earth/earth_route.json create mode 100644 src/main/resources/data/unicopia/advancements/unicopia/earth/thats_unusual.json rename src/main/resources/data/unicopia/advancements/unicopia/enchanting/{xp_mine.json => xp_miner.json} (80%) diff --git a/src/main/java/com/minelittlepony/unicopia/mixin/MixinPlayerInventory.java b/src/main/java/com/minelittlepony/unicopia/mixin/MixinPlayerInventory.java index 5661455b..9d012156 100644 --- a/src/main/java/com/minelittlepony/unicopia/mixin/MixinPlayerInventory.java +++ b/src/main/java/com/minelittlepony/unicopia/mixin/MixinPlayerInventory.java @@ -43,7 +43,7 @@ abstract class MixinPlayerInventory implements Inventory, Nameable { if (EnchantmentHelper.getLevel(Enchantments.BINDING_CURSE, stack) == 0 && EnchantmentUtil.consumeEnchantment(UEnchantments.HEART_BOUND, 1, stack, player.world.random, EnchantmentUtil.getLuck(3, player))) { original.set(i, ItemStack.EMPTY); - UCriteria.USE_CONSUMPTION.trigger(player); + UCriteria.USE_SOULMATE.trigger(player); storedCombinedInventory.get(group).set(i, stack); } } diff --git a/src/main/resources/assets/unicopia/lang/en_us.json b/src/main/resources/assets/unicopia/lang/en_us.json index 6384f31b..a6fe335d 100644 --- a/src/main/resources/assets/unicopia/lang/en_us.json +++ b/src/main/resources/assets/unicopia/lang/en_us.json @@ -622,13 +622,15 @@ "advancements.unicopia.eat_pinecone.description": "Eat a pinecone", "advancements.unicopia.imported_oats.title": "As Delicious As They Are Expensive", "advancements.unicopia.imported_oats.description": "Send of receive fancy imported oats", + "advancements.unicopia.experimental.title": "You Can't Take It With You", "advancements.unicopia.experimental.description": "Enchant a tool with Consumption", - "advancements.unicopia.xp_mine.title": "XP Miner", - "advancements.unicopia.xp_mine.description": "Use consumption to dig up some experience", - "advancements.unicopia.hearts_stronger_than_horses.title": "You Can Keep it With You", + "advancements.unicopia.xp_miner.title": "XP Miner", + "advancements.unicopia.xp_miner.description": "Use consumption to dig up some experience", + + "advancements.unicopia.hearts_stronger_than_horses.title": "Hearts Stronger Than Horses", "advancements.unicopia.hearts_stronger_than_horses.description": "Enchant a tool with Heart Bound", - "advancements.unicopia.soulmate.title": "Hearts Stronger Than Horses", + "advancements.unicopia.soulmate.title": "You Can Keep it With You", "advancements.unicopia.soulmate.description": "Die whilst holding a heart-bound item", "advancements.unicopia.burn_juice.title": "That doesn't seem right", @@ -649,6 +651,13 @@ "advancements.unicopia.screech_self.title": "Jeepers!", "advancements.unicopia.screech_self.description": "Be so terrifying that you even scared your self a little", + "advancements.unicopia.earth_route.title": "Path of the Pony", + "advancements.unicopia.earth_route.description": "Join the Apple Clan", + "advancements.unicopia.born_on_a_rock_farm.title": "Born on a Rock Farm", + "advancements.unicopia.born_on_a_rock_farm.description": "Successfully farm your first rock", + "advancements.unicopia.thats_unusual.title": "That's Unusual", + "advancements.unicopia.thats_unusual.description": "But what does it do?", + "advancements.unicopia.sky_route.title": "Path of the Pegasus", "advancements.unicopia.sky_route.description": "Join the Clousdale Pegasi", diff --git a/src/main/resources/data/unicopia/advancements/unicopia/earth/born_on_a_rock_farm.json b/src/main/resources/data/unicopia/advancements/unicopia/earth/born_on_a_rock_farm.json new file mode 100644 index 00000000..792cd712 --- /dev/null +++ b/src/main/resources/data/unicopia/advancements/unicopia/earth/born_on_a_rock_farm.json @@ -0,0 +1,31 @@ +{ + "parent": "unicopia:unicopia/earth/earth_route", + "display": { + "icon": { + "item": "unicopia:rock" + }, + "title": { + "translate": "advancements.unicopia.born_on_a_rock_farm.title" + }, + "description": { + "translate": "advancements.unicopia.born_on_a_rock_farm.description" + }, + "frame": "task", + "show_toast": true, + "announce_to_chat": true, + "hidden": false + }, + "criteria": { + "has_rock": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { "items": [ "unicopia:rock" ] } + ] + } + } + }, + "requirements": [ + [ "has_rock" ] + ] +} diff --git a/src/main/resources/data/unicopia/advancements/unicopia/earth/earth_route.json b/src/main/resources/data/unicopia/advancements/unicopia/earth/earth_route.json new file mode 100644 index 00000000..032ca041 --- /dev/null +++ b/src/main/resources/data/unicopia/advancements/unicopia/earth/earth_route.json @@ -0,0 +1,37 @@ +{ + "parent": "unicopia:unicopia/root", + "display": { + "icon": { + "item": "minecraft:apple" + }, + "title": { + "translate": "advancements.unicopia.earth_route.title" + }, + "description": { + "translate": "advancements.unicopia.earth_route.description" + }, + "frame": "task", + "show_toast": true, + "announce_to_chat": true, + "hidden": false + }, + "criteria": { + "be_pony": { + "trigger": "unicopia:player_change_race", + "conditions": { + "race": "earth" + } + }, + "has_rock": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { "items": [ "unicopia:rock" ] } + ] + } + } + }, + "requirements": [ + [ "be_pony", "has_rock" ] + ] +} diff --git a/src/main/resources/data/unicopia/advancements/unicopia/earth/thats_unusual.json b/src/main/resources/data/unicopia/advancements/unicopia/earth/thats_unusual.json new file mode 100644 index 00000000..4ec3184e --- /dev/null +++ b/src/main/resources/data/unicopia/advancements/unicopia/earth/thats_unusual.json @@ -0,0 +1,31 @@ +{ + "parent": "unicopia:unicopia/earth/born_on_a_rock_farm", + "display": { + "icon": { + "item": "unicopia:weird_rock" + }, + "title": { + "translate": "advancements.unicopia.thats_unusual.title" + }, + "description": { + "translate": "advancements.unicopia.thats_unusual.description" + }, + "frame": "task", + "show_toast": true, + "announce_to_chat": true, + "hidden": true + }, + "criteria": { + "has_rock": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { "items": [ "unicopia:weird_rock" ] } + ] + } + } + }, + "requirements": [ + [ "has_rock" ] + ] +} diff --git a/src/main/resources/data/unicopia/advancements/unicopia/enchanting/xp_mine.json b/src/main/resources/data/unicopia/advancements/unicopia/enchanting/xp_miner.json similarity index 80% rename from src/main/resources/data/unicopia/advancements/unicopia/enchanting/xp_mine.json rename to src/main/resources/data/unicopia/advancements/unicopia/enchanting/xp_miner.json index 0721fe43..ceec072b 100644 --- a/src/main/resources/data/unicopia/advancements/unicopia/enchanting/xp_mine.json +++ b/src/main/resources/data/unicopia/advancements/unicopia/enchanting/xp_miner.json @@ -5,10 +5,10 @@ "item": "minecraft:netherite_pickaxe" }, "title": { - "translate": "advancements.unicopia.xp_mine.title" + "translate": "advancements.unicopia.xp_miner.title" }, "description": { - "translate": "advancements.unicopia.xp_mine.description" + "translate": "advancements.unicopia.xp_miner.description" }, "frame": "task", "show_toast": true,