Move all remaining advancements to datagen and some new ones

This commit is contained in:
Sollace 2024-03-23 23:16:44 +00:00
parent f67ab25a54
commit d0d17a3eed
No known key found for this signature in database
GPG key ID: E52FACE7B5C773DB
64 changed files with 444 additions and 1889 deletions

View file

@ -57,6 +57,8 @@ public interface UTags {
TagKey<DamageType> BREAKS_SUNGLASSES = damage("breaks_sunglasses");
TagKey<DamageType> SPELLBOOK_IMMUNE_TO = damage("spellbook_immune_to");
TagKey<DamageType> FROM_ROCKS = damage("from_rocks");
TagKey<DamageType> FROM_HORSESHOES = damage("from_horseshoes");
TagKey<DimensionType> HAS_NO_ATMOSPHERE = dimension("has_no_atmosphere");

View file

@ -50,6 +50,22 @@ public class CustomEventCriterion extends AbstractCriterion<CustomEventCriterion
void trigger(@Nullable Entity player);
}
public static Conditions create(String name) {
return new Conditions(LootContextPredicate.EMPTY, name, RacePredicate.EMPTY, null, 1);
}
public static Conditions create(String name, int count) {
return new Conditions(LootContextPredicate.EMPTY, name, RacePredicate.EMPTY, null, count);
}
public static Conditions createFlying(String name) {
return new Conditions(LootContextPredicate.EMPTY, name, RacePredicate.EMPTY, true, 1);
}
public static Conditions createFlying(String name, int count) {
return new Conditions(LootContextPredicate.EMPTY, name, RacePredicate.EMPTY, true, count);
}
public static class Conditions extends AbstractCriterionConditions {
private final String event;

View file

@ -31,7 +31,7 @@ public record RacePredicate(Set<Race> include, Set<Race> exclude) implements Pre
return of(getRaces(root, "include"), getRaces(root, "exclude"));
}
private static RacePredicate of(Set<Race> include, Set<Race> exclude) {
public static RacePredicate of(Set<Race> include, Set<Race> exclude) {
if (include.isEmpty() && exclude.isEmpty()) {
return EMPTY;
}
@ -56,6 +56,10 @@ public record RacePredicate(Set<Race> include, Set<Race> exclude) implements Pre
return (include.isEmpty() || include.contains(race)) && !(!exclude.isEmpty() && exclude.contains(race));
}
public boolean isEmpty() {
return include.isEmpty() && exclude.isEmpty();
}
public JsonObject toJson() {
JsonObject json = new JsonObject();
if (!include.isEmpty()) {

View file

@ -97,7 +97,10 @@ public class SendViaDragonBreathScrollCriterion extends AbstractCriterion<SendVi
public JsonObject toJson(AdvancementEntityPredicateSerializer serializer) {
JsonObject json = super.toJson(serializer);
json.add("item", item.toJson());
json.add("race", races.toJson());
if (!races.isEmpty()) {
json.add("race", races.toJson());
}
json.addProperty("is_receiving_end", isReceivingEnd);
recipientName.ifPresent(recipient -> json.addProperty("recipient_name", recipient));
if (recipientPresent != TriState.DEFAULT) {
json.addProperty("recipient_present", recipientPresent.getBoxed());

View file

@ -4,6 +4,7 @@ import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import com.minelittlepony.unicopia.datagen.providers.SeasonsGrowthRatesProvider;
import com.minelittlepony.unicopia.datagen.providers.UAdvancementsProvider;
import com.minelittlepony.unicopia.datagen.providers.UBlockTagProvider;
import com.minelittlepony.unicopia.datagen.providers.UItemTagProvider;
import com.minelittlepony.unicopia.datagen.providers.UModelProvider;
@ -38,6 +39,7 @@ public class Datagen implements DataGeneratorEntrypoint {
pack.addProvider(UBlockAdditionsLootTableProvider::new);
pack.addProvider(UChestAdditionsLootTableProvider::new);
pack.addProvider(SeasonsGrowthRatesProvider::new);
pack.addProvider(UAdvancementsProvider::new);
}
@Override

View file

@ -0,0 +1,137 @@
package com.minelittlepony.unicopia.datagen.providers;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
import org.jetbrains.annotations.Nullable;
import com.minelittlepony.unicopia.Unicopia;
import net.minecraft.advancement.Advancement;
import net.minecraft.advancement.AdvancementCriterion;
import net.minecraft.advancement.AdvancementDisplay;
import net.minecraft.advancement.AdvancementFrame;
import net.minecraft.advancement.AdvancementRewards;
import net.minecraft.advancement.CriterionMerger;
import net.minecraft.advancement.criterion.CriterionConditions;
import net.minecraft.item.ItemConvertible;
import net.minecraft.text.Text;
import net.minecraft.util.Identifier;
import net.minecraft.util.Util;
public class AdvancementDisplayBuilder {
private static final Identifier BACKGROUND = new Identifier("textures/gui/advancements/backgrounds/stone.png");
public static AdvancementDisplayBuilder create(ItemConvertible icon) {
return new AdvancementDisplayBuilder(icon, Advancement.Builder.create(), false, false, false);
}
private Identifier background = BACKGROUND;
private boolean toast;
private boolean hidden;
private boolean announce;
private final ItemConvertible icon;
private AdvancementFrame frame = AdvancementFrame.TASK;
@Nullable
private String group;
private final Advancement.Builder advancementBuilder;
AdvancementDisplayBuilder(ItemConvertible icon, Advancement.Builder advancementBuilder, boolean toast, boolean announce, boolean hidden) {
this.icon = icon;
this.advancementBuilder = advancementBuilder;
this.toast = toast;
this.announce = announce;
this.hidden = hidden;
}
public AdvancementDisplayBuilder frame(AdvancementFrame frame) {
this.frame = frame;
return this;
}
public AdvancementDisplayBuilder background(Identifier background) {
this.background = background;
return this;
}
public AdvancementDisplayBuilder showToast() {
this.toast = true;
return this;
}
public AdvancementDisplayBuilder hidden() {
this.hidden = true;
return this;
}
public AdvancementDisplayBuilder visible() {
this.hidden = false;
return this;
}
public AdvancementDisplayBuilder announce() {
this.announce = true;
return this;
}
public AdvancementDisplayBuilder group(String group) {
this.group = group;
return this;
}
public AdvancementDisplayBuilder rewards(AdvancementRewards.Builder builder) {
advancementBuilder.rewards(builder.build());
return this;
}
public AdvancementDisplayBuilder criterion(String name, CriterionConditions conditions) {
advancementBuilder.criterion(name, new AdvancementCriterion(conditions));
return this;
}
public AdvancementDisplayBuilder criteriaMerger(CriterionMerger merger) {
advancementBuilder.criteriaMerger(merger);
return this;
}
public AdvancementDisplayBuilder parent(Identifier parent) {
advancementBuilder.parent(parent);
return this;
}
public AdvancementDisplayBuilder apply(Consumer<AdvancementDisplayBuilder> consumer) {
consumer.accept(this);
return this;
}
public Parent build(Consumer<Advancement> exporter, String name) {
Identifier id = Unicopia.id(group == null ? name : group + "/" + name);
String key = Util.createTranslationKey("advancements", Unicopia.id(name));
Advancement advancement = advancementBuilder.display(new AdvancementDisplay(icon.asItem().getDefaultStack(),
Text.translatable(key + ".title"),
Text.translatable(key + ".description"), background, frame, toast, announce, hidden))
.build(id);
exporter.accept(advancement);
return new Parent(advancement, group);
}
public record Parent(Advancement parent, @Nullable String group) {
public AdvancementDisplayBuilder child(ItemConvertible icon) {
return new AdvancementDisplayBuilder(icon, Advancement.Builder.create().parent(parent),
parent.getDisplay().shouldShowToast(),
parent.getDisplay().shouldAnnounceToChat(),
parent.getDisplay().isHidden()
).frame(parent.getDisplay().getFrame()).background(parent.getDisplay().getBackground()).group(group);
}
public void children(Consumer<Parent> children) {
children.accept(this);
}
public void children(Consumer<Advancement> exporter, BiConsumer<Consumer<Advancement>, Parent> children) {
children.accept(exporter, this);
}
}
}

View file

@ -0,0 +1,250 @@
package com.minelittlepony.unicopia.datagen.providers;
import java.util.Optional;
import java.util.Set;
import java.util.function.Consumer;
import com.minelittlepony.unicopia.Race;
import com.minelittlepony.unicopia.UTags;
import com.minelittlepony.unicopia.advancement.CustomEventCriterion;
import com.minelittlepony.unicopia.advancement.RaceChangeCriterion;
import com.minelittlepony.unicopia.advancement.RacePredicate;
import com.minelittlepony.unicopia.advancement.SendViaDragonBreathScrollCriterion;
import com.minelittlepony.unicopia.item.UItems;
import com.minelittlepony.unicopia.item.enchantment.UEnchantments;
import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput;
import net.fabricmc.fabric.api.datagen.v1.provider.FabricAdvancementProvider;
import net.fabricmc.fabric.api.util.TriState;
import net.minecraft.advancement.Advancement;
import net.minecraft.advancement.AdvancementFrame;
import net.minecraft.advancement.AdvancementRewards;
import net.minecraft.advancement.CriterionMerger;
import net.minecraft.advancement.criterion.ConsumeItemCriterion;
import net.minecraft.advancement.criterion.CriterionConditions;
import net.minecraft.advancement.criterion.EnchantedItemCriterion;
import net.minecraft.advancement.criterion.InventoryChangedCriterion;
import net.minecraft.advancement.criterion.OnKilledCriterion;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.entity.damage.DamageType;
import net.minecraft.item.Item;
import net.minecraft.item.ItemConvertible;
import net.minecraft.item.Items;
import net.minecraft.predicate.NumberRange;
import net.minecraft.predicate.TagPredicate;
import net.minecraft.predicate.entity.DamageSourcePredicate;
import net.minecraft.predicate.entity.EntityPredicate;
import net.minecraft.predicate.entity.LootContextPredicate;
import net.minecraft.predicate.item.EnchantmentPredicate;
import net.minecraft.predicate.item.ItemPredicate;
import net.minecraft.registry.Registries;
import net.minecraft.registry.tag.TagKey;
import net.minecraft.util.Identifier;
public class UAdvancementsProvider extends FabricAdvancementProvider {
public UAdvancementsProvider(FabricDataOutput output) {
super(output);
}
@Override
public void generateAdvancement(Consumer<Advancement> consumer) {
AdvancementDisplayBuilder.create(UItems.ALICORN_BADGE).criterion("crafting_table", hasItems(Items.CRAFTING_TABLE)).build(consumer, "root").children(root -> {
createTribeRootAdvancement(consumer, root, Race.EARTH).children(consumer, this::generateEarthTribeAdvancementsTree);
createTribeRootAdvancement(consumer, root, Race.BAT).children(consumer, this::generateBatTribeAdvancementsTree);
createTribeRootAdvancement(consumer, root, Race.PEGASUS).children(consumer, this::generatePegasusTribeAdvancementsTree);
createTribeRootAdvancement(consumer, root, Race.UNICORN).children(consumer, this::generateUnicornTribeAdvancementsTree);
root.child(UItems.DRAGON_BREATH_SCROLL).criterion("has_scroll", hasItems(UItems.DRAGON_BREATH_SCROLL)).build(consumer, "take_a_note").children(p -> {
p.child(UItems.DRAGON_BREATH_SCROLL).criterion("send_scroll", dragonScroll(false, Items.WRITTEN_BOOK)).build(consumer, "dear_princess");
p.child(UItems.IMPORTED_OATS).hidden().frame(AdvancementFrame.CHALLENGE)
.criterion("send_oats", dragonScroll(false, UItems.OATS, UItems.IMPORTED_OATS))
.criterion("receieve_oats", dragonScroll(true, UItems.OATS, UItems.IMPORTED_OATS))
.criteriaMerger(CriterionMerger.OR)
.build(consumer, "imported_oats");
p.child(Items.CHIPPED_ANVIL).hidden().frame(AdvancementFrame.CHALLENGE).criterion("ding_sun", dingCelestia(Set.of(), Set.of(Race.BAT))).build(consumer, "blasphemy");
p.child(Items.CHIPPED_ANVIL).hidden().frame(AdvancementFrame.CHALLENGE).criterion("ding_sun", dingCelestia(Set.of(Race.BAT), Set.of())).build(consumer, "sweet_sweet_revenge");
});
root.child(UItems.OATS).criterion("has_oats", hasItems(UItems.OATS)).build(consumer, "what_the_hay");
root.child(UItems.IRON_HORSE_SHOE).criterion("killed_entity_with_horseshoe", killWithItems(UTags.FROM_HORSESHOES)).build(consumer, "dead_ringer");
root.child(UItems.PINECONE).frame(AdvancementFrame.CHALLENGE).criterion("eat_pinecone", ConsumeItemCriterion.Conditions.item(UItems.PINECONE)).build(consumer, "eat_pinecone");
root.child(UItems.GIANT_BALLOON).criterion("ride_balloon", CustomEventCriterion.create("ride_balloon")).build(consumer, "travelling_in_style");
root.child(UItems.MUFFIN).hidden().criterion("has_muffin", hasItems(UItems.MUFFIN)).build(consumer, "baked_bads");
root.child(UItems.HORSE_SHOE_FRIES).criterion("has_horse_shoe_fries", hasItems(UItems.HORSE_SHOE_FRIES)).build(consumer, "lucky");
root.child(UItems.TOAST).criterion("has_toast", hasItems(UItems.TOAST)).build(consumer, "toast")
.child(UItems.BURNED_TOAST).hidden().criterion("has_burned_toast", hasItems(UItems.BURNED_TOAST)).build(consumer, "burn_toast");
root.child(UItems.GREEN_APPLE).criterion("has_apple", hasItems(UTags.FRESH_APPLES)).build(consumer, "apple_route").children(p -> {
p.child(UItems.SWEET_APPLE)
.criterion("has_all_apples", hasItems(Items.APPLE, UItems.GREEN_APPLE, UItems.SWEET_APPLE, UItems.SOUR_APPLE, UItems.ROTTEN_APPLE, UItems.ZAP_APPLE, UItems.COOKED_ZAP_APPLE, Items.GOLDEN_APPLE))
.build(consumer, "sweet_apple_acres");
p.child(UItems.ZAP_BULB).criterion("has_zap_apple", hasItems(UItems.ZAP_APPLE)).build(consumer, "trick_apple").children(pp -> {
pp.child(UItems.ZAP_APPLE).hidden().criterion("eat_trick_apple", CustomEventCriterion.createFlying("eat_trick_apple")).build(consumer, "eat_trick_apple");
pp.child(UItems.ZAP_APPLE).hidden().criterion("feed_trick_apple", CustomEventCriterion.createFlying("feed_trick_apple")).build(consumer, "feed_trick_apple");
});
p.child(UItems.JUICE).criterion("has_juice", hasItems(UItems.JUICE)).build(consumer, "juice")
.child(UItems.BURNED_JUICE).hidden().criterion("has_burned_juice", hasItems(UItems.BURNED_JUICE)).build(consumer, "burn_juice")
.child(UItems.CIDER).visible().criterion("has_cider", hasItems(UItems.CIDER)).rewards(AdvancementRewards.Builder.experience(12)).build(consumer, "brew_cider");
});
});
generateEnchantmentsAdvancementsTree(consumer);
}
private AdvancementDisplayBuilder.Parent createTribeRootAdvancement(Consumer<Advancement> consumer, AdvancementDisplayBuilder.Parent root, Race race) {
AdvancementDisplayBuilder builder = root.child(Registries.ITEM.get(race.getId().withSuffixedPath("_badge"))).showToast().announce().group(race.getId().getPath())
.criterion("be_" + race.getId().getPath(), new RaceChangeCriterion.Conditions(LootContextPredicate.EMPTY, race));
if (race == Race.UNICORN) {
builder
.criterion("be_alicorn", new RaceChangeCriterion.Conditions(LootContextPredicate.EMPTY, Race.ALICORN))
.criteriaMerger(CriterionMerger.OR);
}
return builder.build(consumer, race.getId().getPath() + "_route");
}
private void generateEarthTribeAdvancementsTree(Consumer<Advancement> consumer, AdvancementDisplayBuilder.Parent parent) {
parent.child(UItems.ROCK).criterion("has_rock", hasItems(UItems.ROCK)).build(consumer, "born_on_a_rock_farm").children(p -> {
p.child(UItems.PEBBLES).criterion("killed_entity_with_rock", killWithItems(UTags.FROM_ROCKS)).build(consumer, "sticks_and_stones");
p.child(UItems.WEIRD_ROCK).hidden().criterion("has_rock", hasItems(UItems.WEIRD_ROCK)).build(consumer, "thats_unusual");
});
}
private void generatePegasusTribeAdvancementsTree(Consumer<Advancement> consumer, AdvancementDisplayBuilder.Parent parent) {
parent.child(Items.PHANTOM_MEMBRANE).hidden().frame(AdvancementFrame.CHALLENGE).criterion("deter_phantom", CustomEventCriterion.createFlying("kill_phantom_while_flying")).rewards(AdvancementRewards.Builder.experience(100)).build(consumer, "deter_phantom");
parent.child(Items.GLASS_PANE).criterion("break_window", CustomEventCriterion.createFlying("break_window")).rewards(AdvancementRewards.Builder.experience(10)).build(consumer, "rainbow_crash");
parent.child(UItems.PEGASUS_BADGE).criterion("fly_through_the_pain", CustomEventCriterion.createFlying("second_wind")).rewards(AdvancementRewards.Builder.experience(10)).build(consumer, "second_wind");
parent.child(UItems.EMPTY_JAR).criterion("has_empty_jar", hasItems(UItems.EMPTY_JAR)).build(consumer, "jar")
.child(UItems.RAIN_CLOUD_JAR).criterion("has_cloud_jar", hasItems(UTags.CLOUD_JARS)).rewards(AdvancementRewards.Builder.experience(55)).build(consumer, "gotcha");
parent.child(UItems.LIGHTNING_JAR).frame(AdvancementFrame.CHALLENGE).criterion("lightning_strike", CustomEventCriterion.createFlying("lightning_strike")).rewards(AdvancementRewards.Builder.experience(30)).build(consumer, "mid_flight_interruption").children(p -> {
p.child(UItems.LIGHTNING_JAR).hidden().frame(AdvancementFrame.CHALLENGE).apply(d -> applyLightningBugCriterions(d, RacePredicate.of(Set.of(Race.CHANGELING), Set.of()), 10, 90)).build(consumer, "lightning_bug");
p.child(UItems.LIGHTNING_JAR).hidden().frame(AdvancementFrame.CHALLENGE).apply(d -> applyLightningBugCriterions(d, RacePredicate.of(Set.of(), Set.of(Race.CHANGELING)), 10, 90)).build(consumer, "wonder_bolt");
});
parent.child(UItems.PEGASUS_FEATHER).hidden().frame(AdvancementFrame.CHALLENGE).criterion("shed_feather", CustomEventCriterion.createFlying("shed_feather")).rewards(AdvancementRewards.Builder.experience(1)).build(consumer, "molting_season_1")
.child(UItems.PEGASUS_FEATHER).apply(d -> applyShedFeatherCriterions(d, 2, 2)).build(consumer, "molting_season_2")
.child(UItems.PEGASUS_FEATHER).apply(d -> applyShedFeatherCriterions(d, 4, 8)).build(consumer, "molting_season_3")
.child(UItems.PEGASUS_FEATHER).apply(d -> applyShedFeatherCriterions(d, 8, 20)).build(consumer, "molting_season_4")
.child(UItems.PEGASUS_FEATHER).apply(d -> applyShedFeatherCriterions(d, 16, 40)).build(consumer, "molting_season_5")
.child(UItems.PEGASUS_FEATHER).apply(d -> applyShedFeatherCriterions(d, 32, 80)).build(consumer, "molting_season_6")
.child(UItems.PEGASUS_FEATHER).apply(d -> applyShedFeatherCriterions(d, 64, 200)).build(consumer, "molting_season_7")
.child(UItems.PEGASUS_FEATHER).apply(d -> applyShedFeatherCriterions(d, 128, 500)).build(consumer, "molting_season_8")
.child(UItems.PEGASUS_FEATHER).apply(d -> applyShedFeatherCriterions(d, 256, 1000)).build(consumer, "molting_season_9")
.child(UItems.PEGASUS_FEATHER).apply(d -> applyShedFeatherCriterions(d, 512, 2280)).build(consumer, "molting_season_10")
.child(UItems.GOLDEN_FEATHER).apply(d -> applyShedFeatherCriterions(d, 1024, 4560)).build(consumer, "molting_season_11")
.child(UItems.GOLDEN_FEATHER).apply(d -> applyShedFeatherCriterions(d, 2048, 10000)).frame(AdvancementFrame.GOAL).build(consumer, "dedicated_flier");
}
private AdvancementDisplayBuilder applyShedFeatherCriterions(AdvancementDisplayBuilder builder, int repeats, int experience) {
for (int i = 1; i <= repeats; i++) {
builder.criterion("shed_feather_" + i, CustomEventCriterion.createFlying("shed_feather", i));
}
return builder.criteriaMerger(CriterionMerger.AND).rewards(AdvancementRewards.Builder.experience(experience));
}
private AdvancementDisplayBuilder applyLightningBugCriterions(AdvancementDisplayBuilder builder, RacePredicate race, int repeats, int experience) {
for (int i = 1; i <= repeats; i++) {
builder.criterion("lightning_struck_player_" + i, new CustomEventCriterion.Conditions(LootContextPredicate.EMPTY, "lightning_struck_player", race, true, i));
}
return builder.criteriaMerger(CriterionMerger.AND).rewards(AdvancementRewards.Builder.experience(experience));
}
private void generateUnicornTribeAdvancementsTree(Consumer<Advancement> consumer, AdvancementDisplayBuilder.Parent parent) {
parent.child(UItems.SPELLBOOK).criterion("has_spellbook", hasItems(UItems.SPELLBOOK)).build(consumer, "books").children(p -> {
p.child(UItems.CRYSTAL_SHARD).criterion("has_shard", hasItems(UItems.CRYSTAL_SHARD)).build(consumer, "crystaline").children(pp -> {
pp.child(UItems.CRYSTAL_HEART).criterion("power_up_heart", CustomEventCriterion.create("power_up_heart")).rewards(AdvancementRewards.Builder.experience(105)).build(consumer, "power_up_heart");
});
p.child(UItems.ALICORN_AMULET).criterion("has_alicorn_amulet", hasItems(UItems.ALICORN_AMULET)).build(consumer, "tempting")
.child(Items.CRYING_OBSIDIAN).criterion("light_altar", CustomEventCriterion.create("light_altar")).build(consumer, "hello_darkness_my_old_friend")
.child(UItems.BROKEN_ALICORN_AMULET).frame(AdvancementFrame.GOAL).criterion("defeat_sombra", CustomEventCriterion.create("defeat_sombra")).rewards(AdvancementRewards.Builder.experience(2000)).build(consumer, "save_the_day")
.children(pp -> {
pp.child(UItems.UNICORN_AMULET).frame(AdvancementFrame.GOAL).criterion("obtain_the_thing", hasItems(UItems.UNICORN_AMULET)).rewards(AdvancementRewards.Builder.experience(1100)).build(consumer, "ascension");
pp.child(UItems.BROKEN_ALICORN_AMULET).hidden().frame(AdvancementFrame.CHALLENGE).criterion("defeat_sombra_again", CustomEventCriterion.create("defeat_sombra", 2)).rewards(AdvancementRewards.Builder.experience(2000)).build(consumer, "doctor_sombrero");
});
p.child(Items.WATER_BUCKET).criterion("split_sea", CustomEventCriterion.create("split_sea")).rewards(AdvancementRewards.Builder.experience(105)).build(consumer, "split_the_sea");
});
parent.child(UItems.PEGASUS_AMULET).hidden().frame(AdvancementFrame.CHALLENGE).criterion("teleport_above_world", CustomEventCriterion.create("teleport_above_world")).rewards(AdvancementRewards.Builder.experience(100)).build(consumer, "a_falling_wizard");
}
private void generateBatTribeAdvancementsTree(Consumer<Advancement> consumer, AdvancementDisplayBuilder.Parent parent) {
parent.child(Items.LIGHT).criterion("look_into_sun", CustomEventCriterion.create("look_into_sun")).build(consumer, "praise_the_sun").children(p -> {
p.child(UItems.SUNGLASSES).criterion("wear_shades", CustomEventCriterion.create("wear_shades")).build(consumer, "cool_potato");
p.child(Items.BLACK_CANDLE).frame(AdvancementFrame.CHALLENGE).criterion("screech_twenty_mobs", CustomEventCriterion.createFlying("screech_twenty_mobs")).build(consumer, "screech_twenty_mobs").children(pp -> {
pp.child(Items.BRICK).frame(AdvancementFrame.CHALLENGE).criterion("super_scare_entity", CustomEventCriterion.createFlying("super_scare_entity")).build(consumer, "extra_spooky");
});
p.child(Items.BLACK_CANDLE).frame(AdvancementFrame.CHALLENGE).criterion("screech_self", CustomEventCriterion.createFlying("screech_self")).build(consumer, "screech_self");
});
}
private void generateEnchantmentsAdvancementsTree(Consumer<Advancement> consumer) {
AdvancementDisplayBuilder.create(Items.NETHERITE_SCRAP)
.criterion("enchant_with_consumption", enchant(UEnchantments.CONSUMPTION))
.rewards(AdvancementRewards.Builder.experience(120))
.parent(new Identifier("story/enchant_item"))
.group("enchanting")
.build(consumer, "experimental")
.child(Items.NETHERITE_PICKAXE)
.criterion("use_consumption", CustomEventCriterion.create("use_consumption"))
.rewards(AdvancementRewards.Builder.experience(1200))
.group("enchanting")
.hidden()
.build(consumer, "xp_miner");
AdvancementDisplayBuilder.create(Items.GOLDEN_APPLE)
.criterion("enchant_with_heart_bound", enchant(UEnchantments.HEART_BOUND))
.rewards(AdvancementRewards.Builder.experience(120))
.group("enchanting")
.build(consumer, "hearts_stronger_than_horses")
.child(Items.GOLDEN_PICKAXE)
.criterion("use_soulmate", CustomEventCriterion.create("use_soulmate"))
.rewards(AdvancementRewards.Builder.experience(1200))
.group("enchanting")
.hidden()
.build(consumer, "soulmate");
}
public static CriterionConditions enchant(Enchantment enchantment) {
return new EnchantedItemCriterion.Conditions(LootContextPredicate.EMPTY, ItemPredicate.Builder.create()
.enchantment(new EnchantmentPredicate(enchantment, NumberRange.IntRange.ANY))
.build(), NumberRange.IntRange.ANY);
}
public static CriterionConditions dragonScroll(boolean receiving, ItemConvertible...items) {
return dragonScroll(receiving, ItemPredicate.Builder.create().items(items).build());
}
public static CriterionConditions dragonScroll(boolean receiving, ItemPredicate items) {
return new SendViaDragonBreathScrollCriterion.Conditions(
LootContextPredicate.EMPTY,
ItemPredicate.ANY,
receiving,
Optional.empty(),
TriState.DEFAULT,
Optional.empty(),
RacePredicate.EMPTY
);
}
static CriterionConditions hasItems(ItemConvertible...items) {
return InventoryChangedCriterion.Conditions.items(items);
}
static CriterionConditions hasItems(TagKey<Item> items) {
return InventoryChangedCriterion.Conditions.items(ItemPredicate.Builder.create().tag(items).build());
}
static CriterionConditions killWithItems(TagKey<DamageType> tag) {
return OnKilledCriterion.Conditions.createPlayerKilledEntity(EntityPredicate.ANY,
DamageSourcePredicate.Builder.create().tag(TagPredicate.expected(tag)).build()
);
}
static CriterionConditions dingCelestia(Set<Race> includeTribes, Set<Race> excludeTribes) {
return new SendViaDragonBreathScrollCriterion.Conditions(
LootContextPredicate.EMPTY,
ItemPredicate.Builder.create().tag(UTags.IS_DELIVERED_AGGRESSIVELY).build(), false,
Optional.of("princess celestia"),
TriState.FALSE,
Optional.of("dings_on_celestias_head"),
RacePredicate.of(includeTribes, excludeTribes));
}
}

View file

@ -1594,12 +1594,18 @@
"advancements.unicopia.praise_the_sun.description": "Experience Celestia's unbridled glory",
"advancements.unicopia.cool_potato.title": "Cool Potato",
"advancements.unicopia.cool_potato.description": "Protect your eyes from the sun",
"advancements.unicopia.take_a_note.title": "Take a Note, Spike",
"advancements.unicopia.take_a_note.description": "Obtain a dragon breath scroll",
"advancements.unicopia.dear_princess.title": "Dear princess...",
"advancements.unicopia.dear_princess.description": "Send a letter with a dragon's breath scroll",
"advancements.unicopia.baked_bads.title": "Baked Bads",
"advancements.unicopia.baked_bads.description": "Bake a delicious muffin",
"advancements.unicopia.mid_flight_interruption.title": "Mid-Flight Interruption",
"advancements.unicopia.mid_flight_interruption.description": "Get struck by lightning whilst flying in a storm",
"advancements.unicopia.lightning_bug.title": "Lightning Bug",
"advancements.unicopia.lightning_bug.description": "Attract 10 lightning strikes",
"advancements.unicopia.lightning_bug.description": "Attract 10 lightning strikes as a changeling",
"advancements.unicopia.wonder_bolt.title": "Wonder Bolt",
"advancements.unicopia.wonder_bolt.description": "Attract 10 lightning strikes",
"advancements.unicopia.jar.title": "Oh wow. What's this?",
"advancements.unicopia.jar.description": "Find an empty jar",
"advancements.unicopia.gotcha.title": "Got'cha!",
@ -1672,11 +1678,29 @@
"advancements.unicopia.sky_route.title": "Path of the Pegasus",
"advancements.unicopia.sky_route.description": "Join the Clousdale Pegasi",
"advancements.unicopia.molting_season_1.title": "Molting Season",
"advancements.unicopia.molting_season_1.description": "Drop a feather whilst flying",
"advancements.unicopia.molting_season_1.description": "Drop your first feather whilst flying",
"advancements.unicopia.molting_season_2.title": "Molting Season 2",
"advancements.unicopia.molting_season_2.description": "Drop 5 feathers whilst flying",
"advancements.unicopia.molting_season_2.description": "Drop your second feather whilst flying",
"advancements.unicopia.molting_season_3.title": "Molting Season 3",
"advancements.unicopia.molting_season_3.description": "Drop 15 feathers whilst flying",
"advancements.unicopia.molting_season_3.description": "Drop your fourth feather whilst flying",
"advancements.unicopia.molting_season_4.title": "Molting Season 4",
"advancements.unicopia.molting_season_4.description": "Drop your eighth feather whilst flying",
"advancements.unicopia.molting_season_5.title": "Molting Season 5",
"advancements.unicopia.molting_season_5.description": "Drop your sixteenth feather whilst flying",
"advancements.unicopia.molting_season_6.title": "Molting Season 6",
"advancements.unicopia.molting_season_6.description": "Drop your thirty-second feather whilst flying",
"advancements.unicopia.molting_season_7.title": "Molting Season 7",
"advancements.unicopia.molting_season_7.description": "Drop your sixty-fourth feather whilst flying",
"advancements.unicopia.molting_season_8.title": "Molting Season 8",
"advancements.unicopia.molting_season_8.description": "Drop your hundred-and-twenty-eighth feather whilst flying",
"advancements.unicopia.molting_season_9.title": "Molting Season 9",
"advancements.unicopia.molting_season_9.description": "Drop your two-hundred-and-fifty-sixth feather whilst flying",
"advancements.unicopia.molting_season_10.title": "Molting Season 10",
"advancements.unicopia.molting_season_10.description": "Drop your five-hundred-and-twelth feather whilst flying",
"advancements.unicopia.molting_season_11.title": "Molting Season 11",
"advancements.unicopia.molting_season_11.description": "Drop your one-thousand-and-twenty-fourth feather whilst flying",
"advancements.unicopia.dedicated_flier.title": "It's okay, you can stop now",
"advancements.unicopia.dedicated_flier.description": "Drop your two-thousand-and-fourty-eighth feather whilst flying",
"advancements.unicopia.rainbow_crash.title": "Dammit, Rainbow",
"advancements.unicopia.rainbow_crash.description": "Wage war on the evil glass window nation",
"advancements.unicopia.second_wind.title": "Second Wind",

View file

@ -1,31 +0,0 @@
{
"parent": "unicopia:unicopia/earth/earth_route",
"display": {
"icon": {
"item": "unicopia:green_apple"
},
"title": {
"translate": "advancements.unicopia.apple_route.title"
},
"description": {
"translate": "advancements.unicopia.apple_route.description"
},
"frame": "task",
"show_toast": true,
"announce_to_chat": false,
"hidden": true
},
"criteria": {
"has_apple": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{ "tag": "unicopia:apples" }
]
}
}
},
"requirements": [
[ "has_apple" ]
]
}

View file

@ -1,31 +0,0 @@
{
"parent": "unicopia:unicopia/earth/earth_route",
"display": {
"icon": {
"item": "unicopia:muffin"
},
"title": {
"translate": "advancements.unicopia.baked_bads.title"
},
"description": {
"translate": "advancements.unicopia.baked_bads.description"
},
"frame": "task",
"show_toast": true,
"announce_to_chat": true,
"hidden": true
},
"criteria": {
"throw_muffin": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{ "items": [ "unicopia:muffin" ] }
]
}
}
},
"requirements": [
[ "throw_muffin" ]
]
}

View file

@ -1,29 +0,0 @@
{
"parent": "unicopia:unicopia/bat/praise_the_sun",
"display": {
"icon": {
"item": "unicopia:sunglasses"
},
"title": {
"translate": "advancements.unicopia.cool_potato.title"
},
"description": {
"translate": "advancements.unicopia.cool_potato.description"
},
"frame": "task",
"show_toast": true,
"announce_to_chat": true,
"hidden": false
},
"criteria": {
"wear_shades": {
"trigger": "unicopia:custom",
"conditions": {
"event": "wear_shades"
}
}
},
"requirements": [
[ "wear_shades" ]
]
}

View file

@ -1,29 +0,0 @@
{
"parent": "unicopia:unicopia/bat/screech_twenty_mobs",
"display": {
"icon": {
"item": "minecraft:brick"
},
"title": {
"translate": "advancements.unicopia.extra_spooky.title"
},
"description": {
"translate": "advancements.unicopia.extra_spooky.description"
},
"frame": "task",
"show_toast": true,
"announce_to_chat": true,
"hidden": true
},
"criteria": {
"spook_extra_hard": {
"trigger": "unicopia:custom",
"conditions": {
"event": "super_scare_entity"
}
}
},
"requirements": [
[ "spook_extra_hard" ]
]
}

View file

@ -1,29 +0,0 @@
{
"parent": "unicopia:unicopia/root",
"display": {
"icon": {
"item": "unicopia:bat_badge"
},
"title": {
"translate": "advancements.unicopia.night_route.title"
},
"description": {
"translate": "advancements.unicopia.night_route.description"
},
"frame": "task",
"show_toast": true,
"announce_to_chat": true,
"hidden": false
},
"criteria": {
"be_bat": {
"trigger": "unicopia:player_change_race",
"conditions": {
"race": "bat"
}
}
},
"requirements": [
[ "be_bat" ]
]
}

View file

@ -1,29 +0,0 @@
{
"parent": "unicopia:unicopia/bat/night_route",
"display": {
"icon": {
"item": "minecraft:light"
},
"title": {
"translate": "advancements.unicopia.praise_the_sun.title"
},
"description": {
"translate": "advancements.unicopia.praise_the_sun.description"
},
"frame": "task",
"show_toast": true,
"announce_to_chat": true,
"hidden": false
},
"criteria": {
"look_into_sun": {
"trigger": "unicopia:custom",
"conditions": {
"event": "look_into_sun"
}
}
},
"requirements": [
[ "look_into_sun" ]
]
}

View file

@ -1,29 +0,0 @@
{
"parent": "unicopia:unicopia/bat/night_route",
"display": {
"icon": {
"item": "minecraft:black_candle"
},
"title": {
"translate": "advancements.unicopia.screech_self.title"
},
"description": {
"translate": "advancements.unicopia.screech_self.description"
},
"frame": "challenge",
"show_toast": true,
"announce_to_chat": true,
"hidden": true
},
"criteria": {
"screech_self": {
"trigger": "unicopia:custom",
"conditions": {
"event": "screech_self"
}
}
},
"requirements": [
[ "screech_self" ]
]
}

View file

@ -1,30 +0,0 @@
{
"parent": "unicopia:unicopia/bat/night_route",
"display": {
"icon": {
"item": "minecraft:black_candle"
},
"title": {
"translate": "advancements.unicopia.screech_twenty_mobs.title"
},
"description": {
"translate": "advancements.unicopia.screech_twenty_mobs.description"
},
"frame": "challenge",
"show_toast": true,
"announce_to_chat": true,
"hidden": false
},
"criteria": {
"screech_twenty_mobs": {
"trigger": "unicopia:custom",
"conditions": {
"event": "screech_twenty_mobs",
"flying": true
}
}
},
"requirements": [
[ "screech_twenty_mobs" ]
]
}

View file

@ -1,37 +0,0 @@
{
"parent": "unicopia:unicopia/bat/praise_the_sun",
"display": {
"icon": {
"item": "minecraft:anvil"
},
"title": {
"translate": "advancements.unicopia.sweet_sweet_revenge.title"
},
"description": {
"translate": "advancements.unicopia.sweet_sweet_revenge.description"
},
"frame": "task",
"show_toast": true,
"announce_to_chat": true,
"hidden": true
},
"criteria": {
"ding_sun": {
"trigger": "unicopia:send_dragon_breath",
"conditions": {
"item": {
"tag": "unicopia:is_delivered_aggressively"
},
"recipient_name": "princess celestia",
"recipient_present": false,
"counter": "dings_on_celestias_head",
"race": {
"include": [ "unicopia:bat" ]
}
}
}
},
"requirements": [
[ "ding_sun" ]
]
}

View file

@ -1,31 +0,0 @@
{
"parent": "unicopia:unicopia/burn_juice",
"display": {
"icon": {
"item": "unicopia:cider"
},
"title": {
"translate": "advancements.unicopia.brew_cider.title"
},
"description": {
"translate": "advancements.unicopia.brew_cider.description"
},
"frame": "task",
"show_toast": true,
"announce_to_chat": true,
"hidden": true
},
"criteria": {
"has_cider": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{ "items": [ "unicopia:cider" ] }
]
}
}
},
"requirements": [
[ "has_cider" ]
]
}

View file

@ -1,31 +0,0 @@
{
"parent": "unicopia:unicopia/juice",
"display": {
"icon": {
"item": "unicopia:burned_juice"
},
"title": {
"translate": "advancements.unicopia.burn_juice.title"
},
"description": {
"translate": "advancements.unicopia.burn_juice.description"
},
"frame": "task",
"show_toast": true,
"announce_to_chat": true,
"hidden": true
},
"criteria": {
"has_burned_juice": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{ "items": [ "unicopia:burned_juice" ] }
]
}
}
},
"requirements": [
[ "has_burned_juice" ]
]
}

View file

@ -1,31 +0,0 @@
{
"parent": "unicopia:unicopia/toast",
"display": {
"icon": {
"item": "unicopia:burned_toast"
},
"title": {
"translate": "advancements.unicopia.burn_toast.title"
},
"description": {
"translate": "advancements.unicopia.burn_toast.description"
},
"frame": "task",
"show_toast": true,
"announce_to_chat": true,
"hidden": true
},
"criteria": {
"has_burned_toast": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{ "items": [ "unicopia:burned_toast" ] }
]
}
}
},
"requirements": [
[ "has_burned_toast" ]
]
}

View file

@ -1,37 +0,0 @@
{
"parent": "unicopia:unicopia/earth/earth_route",
"display": {
"icon": {
"item": "minecraft:anvil"
},
"title": {
"translate": "advancements.unicopia.blasphemy.title"
},
"description": {
"translate": "advancements.unicopia.blasphemy.description"
},
"frame": "task",
"show_toast": true,
"announce_to_chat": true,
"hidden": true
},
"criteria": {
"ding_sun": {
"trigger": "unicopia:send_dragon_breath",
"conditions": {
"item": {
"tag": "unicopia:is_delivered_aggressively"
},
"recipient_name": "princess celestia",
"recipient_present": false,
"counter": "dings_on_celestias_head",
"race": {
"exclude": [ "unicopia:bat" ]
}
}
}
},
"requirements": [
[ "ding_sun" ]
]
}

View file

@ -1,31 +0,0 @@
{
"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" ]
]
}

View file

@ -1,36 +0,0 @@
{
"parent": "unicopia:unicopia/earth/born_on_a_rock_farm",
"display": {
"icon": {
"item": "unicopia:iron_horse_shoe"
},
"title": {
"translate": "advancements.unicopia.dead_ringer.title"
},
"description": {
"translate": "advancements.unicopia.dead_ringer.description"
},
"frame": "task",
"show_toast": true,
"announce_to_chat": true,
"hidden": true
},
"criteria": {
"killed_entity_with_horseshoe": {
"trigger": "minecraft:player_killed_entity",
"conditions": {
"killing_blow": {
"tags": [
{
"id": "unicopia:from_horseshoes",
"expected": true
}
]
}
}
}
},
"requirements": [
[ "killed_entity_with_horseshoe" ]
]
}

View file

@ -1,37 +0,0 @@
{
"parent": "unicopia:unicopia/root",
"display": {
"icon": {
"item": "unicopia:earth_badge"
},
"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" ]
]
}

View file

@ -1,31 +0,0 @@
{
"parent": "unicopia:unicopia/earth/earth_route",
"display": {
"icon": {
"item": "unicopia:pinecone"
},
"title": {
"translate": "advancements.unicopia.eat_pinecone.title"
},
"description": {
"translate": "advancements.unicopia.eat_pinecone.description"
},
"frame": "goal",
"show_toast": true,
"announce_to_chat": true,
"hidden": false
},
"criteria": {
"eat_pinecone": {
"trigger": "minecraft:consume_item",
"conditions": {
"item": {
"items": [ "unicopia:pinecone" ]
}
}
}
},
"requirements": [
[ "eat_pinecone" ]
]
}

View file

@ -1,40 +0,0 @@
{
"parent": "unicopia:unicopia/earth/earth_route",
"display": {
"icon": {
"item": "unicopia:imported_oats"
},
"title": {
"translate": "advancements.unicopia.imported_oats.title"
},
"description": {
"translate": "advancements.unicopia.imported_oats.description"
},
"frame": "task",
"show_toast": true,
"announce_to_chat": true,
"hidden": true
},
"criteria": {
"send_oats": {
"trigger": "unicopia:send_dragon_breath",
"conditions": {
"item": {
"items": [ "unicopia:oats", "unicopia:imported_oats" ]
}
}
},
"receive_oats": {
"trigger": "unicopia:send_dragon_breath",
"conditions": {
"item": {
"items": [ "unicopia:oats", "unicopia:imported_oats" ]
},
"is_receiving_end": true
}
}
},
"requirements": [
[ "send_oats", "receive_oats" ]
]
}

View file

@ -1,36 +0,0 @@
{
"parent": "unicopia:unicopia/earth/born_on_a_rock_farm",
"display": {
"icon": {
"item": "unicopia:rock"
},
"title": {
"translate": "advancements.unicopia.sticks_and_stones.title"
},
"description": {
"translate": "advancements.unicopia.sticks_and_stones.description"
},
"frame": "task",
"show_toast": true,
"announce_to_chat": true,
"hidden": true
},
"criteria": {
"killed_entity_with_rock": {
"trigger": "minecraft:player_killed_entity",
"conditions": {
"killing_blow": {
"tags": [
{
"id": "unicopia:from_rocks",
"expected": true
}
]
}
}
}
},
"requirements": [
[ "killed_entity_with_rock" ]
]
}

View file

@ -1,31 +0,0 @@
{
"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" ]
]
}

View file

@ -1,29 +0,0 @@
{
"parent": "unicopia:unicopia/earth/earth_route",
"display": {
"icon": {
"item": "unicopia:imported_oats"
},
"title": {
"translate": "advancements.unicopia.travelling_in_style.title"
},
"description": {
"translate": "advancements.unicopia.travelling_in_style.description"
},
"frame": "task",
"show_toast": true,
"announce_to_chat": true,
"hidden": false
},
"criteria": {
"ride_balloon": {
"trigger": "unicopia:custom",
"conditions": {
"event": "ride_balloon"
}
}
},
"requirements": [
[ "ride_balloon" ]
]
}

View file

@ -1,29 +0,0 @@
{
"parent": "unicopia:unicopia/trick_apple",
"display": {
"icon": {
"item": "unicopia:zap_apple"
},
"title": {
"translate": "advancements.unicopia.eat_trick_apple.title"
},
"description": {
"translate": "advancements.unicopia.eat_trick_apple.description"
},
"frame": "task",
"show_toast": true,
"announce_to_chat": true,
"hidden": false
},
"criteria": {
"eat_trick_apple": {
"trigger": "unicopia:custom",
"conditions": {
"event": "eat_trick_apple"
}
}
},
"requirements": [
[ "eat_trick_apple" ]
]
}

View file

@ -1,36 +0,0 @@
{
"parent": "minecraft:story/enchant_item",
"display": {
"icon": {
"item": "minecraft:netherite_pickaxe"
},
"title": {
"translate": "advancements.unicopia.experimental.title"
},
"description": {
"translate": "advancements.unicopia.experimental.description"
},
"frame": "task",
"show_toast": true,
"announce_to_chat": true,
"hidden": false
},
"rewards": {
"experience": 120
},
"criteria": {
"enchant_with_consumption": {
"trigger": "minecraft:enchanted_item",
"conditions": {
"item": {
"enchantments": [
{ "enchantment": "unicopia:consumption" }
]
}
}
}
},
"requirements": [
[ "enchant_with_consumption" ]
]
}

View file

@ -1,36 +0,0 @@
{
"parent": "minecraft:story/enchant_item",
"display": {
"icon": {
"item": "minecraft:golden_pickaxe"
},
"title": {
"translate": "advancements.unicopia.hearts_stronger_than_horses.title"
},
"description": {
"translate": "advancements.unicopia.hearts_stronger_than_horses.description"
},
"frame": "task",
"show_toast": true,
"announce_to_chat": true,
"hidden": false
},
"rewards": {
"experience": 120
},
"criteria": {
"enchant_with_heart_bound": {
"trigger": "minecraft:enchanted_item",
"conditions": {
"item": {
"enchantments": [
{ "enchantment": "unicopia:heart_bound" }
]
}
}
}
},
"requirements": [
[ "enchant_with_heart_bound" ]
]
}

View file

@ -1,32 +0,0 @@
{
"parent": "unicopia:unicopia/enchanting/hearts_stronger_than_horses",
"display": {
"icon": {
"item": "minecraft:golden_apple"
},
"title": {
"translate": "advancements.unicopia.soulmate.title"
},
"description": {
"translate": "advancements.unicopia.soulmate.description"
},
"frame": "task",
"show_toast": true,
"announce_to_chat": true,
"hidden": true
},
"rewards": {
"experience": 1200
},
"criteria": {
"use_soulmate": {
"trigger": "unicopia:custom",
"conditions": {
"event": "use_soulmate"
}
}
},
"requirements": [
[ "use_soulmate" ]
]
}

View file

@ -1,32 +0,0 @@
{
"parent": "unicopia:unicopia/enchanting/experimental",
"display": {
"icon": {
"item": "minecraft:netherite_pickaxe"
},
"title": {
"translate": "advancements.unicopia.xp_miner.title"
},
"description": {
"translate": "advancements.unicopia.xp_miner.description"
},
"frame": "task",
"show_toast": true,
"announce_to_chat": true,
"hidden": true
},
"rewards": {
"experience": 1200
},
"criteria": {
"mine_xp": {
"trigger": "unicopia:custom",
"conditions": {
"event": "use_consumption"
}
}
},
"requirements": [
[ "mine_xp" ]
]
}

View file

@ -1,29 +0,0 @@
{
"parent": "unicopia:unicopia/trick_apple",
"display": {
"icon": {
"item": "unicopia:zap_apple"
},
"title": {
"translate": "advancements.unicopia.feed_trick_apple.title"
},
"description": {
"translate": "advancements.unicopia.feed_trick_apple.description"
},
"frame": "task",
"show_toast": true,
"announce_to_chat": true,
"hidden": false
},
"criteria": {
"eat_trick_apple": {
"trigger": "unicopia:custom",
"conditions": {
"event": "feed_trick_apple"
}
}
},
"requirements": [
[ "eat_trick_apple" ]
]
}

View file

@ -1,35 +0,0 @@
{
"parent": "unicopia:unicopia/jar",
"display": {
"icon": {
"item": "unicopia:rain_cloud_jar"
},
"title": {
"translate": "advancements.unicopia.gotcha.title"
},
"description": {
"translate": "advancements.unicopia.gotcha.description"
},
"frame": "goal",
"show_toast": true,
"announce_to_chat": true,
"hidden": false
},
"rewards": {
"experience": 55
},
"criteria": {
"has_the_jar": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{ "items": [ "unicopia:rain_cloud_jar" ] },
{ "items": [ "unicopia:storm_cloud_jar" ] }
]
}
}
},
"requirements": [
[ "has_the_jar" ]
]
}

View file

@ -1,31 +0,0 @@
{
"parent": "unicopia:unicopia/pegasus/sky_route",
"display": {
"icon": {
"item": "unicopia:empty_jar"
},
"title": {
"translate": "advancements.unicopia.jar.title"
},
"description": {
"translate": "advancements.unicopia.jar.description"
},
"frame": "task",
"show_toast": true,
"announce_to_chat": true,
"hidden": false
},
"criteria": {
"has_the_jar": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{ "items": [ "unicopia:empty_jar" ] }
]
}
}
},
"requirements": [
[ "has_the_jar" ]
]
}

View file

@ -1,31 +0,0 @@
{
"parent": "unicopia:unicopia/apple_route",
"display": {
"icon": {
"item": "unicopia:juice"
},
"title": {
"translate": "advancements.unicopia.juice.title"
},
"description": {
"translate": "advancements.unicopia.juice.description"
},
"frame": "task",
"show_toast": true,
"announce_to_chat": true,
"hidden": false
},
"criteria": {
"has_juice": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{ "items": [ "unicopia:juice" ] }
]
}
}
},
"requirements": [
[ "has_juice" ]
]
}

View file

@ -1,115 +0,0 @@
{
"parent": "unicopia:unicopia/mid_flight_interruption",
"display": {
"icon": {
"item": "unicopia:lightning_jar"
},
"title": {
"translate": "advancements.unicopia.lightning_bug.title"
},
"description": {
"translate": "advancements.unicopia.lightning_bug.description"
},
"frame": "challenge",
"show_toast": true,
"announce_to_chat": true,
"hidden": false
},
"rewards": {
"experience": 90
},
"criteria": {
"lightning_struck_player_1": {
"trigger": "unicopia:custom",
"conditions": {
"event": "lightning_struck_player",
"race": ["bat"],
"repeats": 1
}
},
"lightning_struck_player_2": {
"trigger": "unicopia:custom",
"conditions": {
"event": "lightning_struck_player",
"race": ["bat"],
"repeats": 2
}
},
"lightning_struck_player_3": {
"trigger": "unicopia:custom",
"conditions": {
"event": "lightning_struck_player",
"race": ["bat"],
"repeats": 3
}
},
"lightning_struck_player_4": {
"trigger": "unicopia:custom",
"conditions": {
"event": "lightning_struck_player",
"race": ["bat"],
"repeats": 4
}
},
"lightning_struck_player_5": {
"trigger": "unicopia:custom",
"conditions": {
"event": "lightning_struck_player",
"race": ["bat"],
"repeats": 5
}
},
"lightning_struck_player_6": {
"trigger": "unicopia:custom",
"conditions": {
"event": "lightning_struck_player",
"race": ["bat"],
"repeats": 6
}
},
"lightning_struck_player_7": {
"trigger": "unicopia:custom",
"conditions": {
"event": "lightning_struck_player",
"race": ["bat"],
"repeats": 7
}
},
"lightning_struck_player_8": {
"trigger": "unicopia:custom",
"conditions": {
"event": "lightning_struck_player",
"race": ["bat"],
"repeats": 8
}
},
"lightning_struck_player_9": {
"trigger": "unicopia:custom",
"conditions": {
"event": "lightning_struck_player",
"race": ["bat"],
"repeats": 9
}
},
"lightning_struck_player_10": {
"trigger": "unicopia:custom",
"conditions": {
"event": "lightning_struck_player",
"race": ["bat"],
"repeats": 10
}
}
},
"requirements": [
[ "lightning_struck_player_1" ],
[ "lightning_struck_player_2" ],
[ "lightning_struck_player_3" ],
[ "lightning_struck_player_4" ],
[ "lightning_struck_player_5" ],
[ "lightning_struck_player_6" ],
[ "lightning_struck_player_7" ],
[ "lightning_struck_player_8" ],
[ "lightning_struck_player_9" ],
[ "lightning_struck_player_10" ]
]
}

View file

@ -1,31 +0,0 @@
{
"parent": "unicopia:unicopia/apple_route",
"display": {
"icon": {
"item": "unicopia:horse_shoe_fries"
},
"title": {
"translate": "advancements.unicopia.lucky.title"
},
"description": {
"translate": "advancements.unicopia.lucky.description"
},
"frame": "task",
"show_toast": true,
"announce_to_chat": true,
"hidden": false
},
"criteria": {
"has_horse_shoe_fries": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{ "items": [ "unicopia:horse_shoe_fries" ] }
]
}
}
},
"requirements": [
[ "has_horse_shoe_fries" ]
]
}

View file

@ -1,29 +0,0 @@
{
"parent": "unicopia:unicopia/pegasus/sky_route",
"display": {
"icon": {
"item": "unicopia:pegasus_feather"
},
"title": {
"translate": "advancements.unicopia.mid_flight_interruption.title"
},
"description": {
"translate": "advancements.unicopia.mid_flight_interruption.description"
},
"frame": "challenge",
"show_toast": true,
"announce_to_chat": true,
"hidden": false
},
"criteria": {
"lightning_strike": {
"trigger": "unicopia:custom",
"conditions": {
"event": "lightning_struck_player"
}
}
},
"requirements": [
[ "lightning_strike" ]
]
}

View file

@ -1,32 +0,0 @@
{
"parent": "unicopia:unicopia/pegasus/sky_route",
"display": {
"icon": {
"item": "minecraft:phantom_membrane"
},
"title": {
"translate": "advancements.unicopia.deter_phantom.title"
},
"description": {
"translate": "advancements.unicopia.deter_phantom.description"
},
"frame": "challenge",
"show_toast": true,
"announce_to_chat": true,
"hidden": true
},
"criteria": {
"the_thing": {
"trigger": "unicopia:custom",
"conditions": {
"event": "kill_phantom_while_flying"
}
}
},
"requirements": [
[ "the_thing" ]
],
"rewards": {
"experience": 100
}
}

View file

@ -1,29 +0,0 @@
{
"parent": "unicopia:unicopia/pegasus/sky_route",
"display": {
"icon": {
"item": "unicopia:pegasus_feather"
},
"title": {
"translate": "advancements.unicopia.molting_season_1.title"
},
"description": {
"translate": "advancements.unicopia.molting_season_1.description"
},
"frame": "task",
"show_toast": true,
"announce_to_chat": true,
"hidden": true
},
"criteria": {
"shed_feather": {
"trigger": "unicopia:custom",
"conditions": {
"event": "shed_feather"
}
}
},
"requirements": [
[ "shed_feather" ]
]
}

View file

@ -1,30 +0,0 @@
{
"parent": "unicopia:unicopia/pegasus/molting_season_1",
"display": {
"icon": {
"item": "unicopia:pegasus_feather"
},
"title": {
"translate": "advancements.unicopia.molting_season_2.title"
},
"description": {
"translate": "advancements.unicopia.molting_season_2.description"
},
"frame": "task",
"show_toast": true,
"announce_to_chat": true,
"hidden": true
},
"criteria": {
"shed_feather_5": {
"trigger": "unicopia:custom",
"conditions": {
"event": "shed_feather",
"repeats": 5
}
}
},
"requirements": [
[ "shed_feather_5" ]
]
}

View file

@ -1,30 +0,0 @@
{
"parent": "unicopia:unicopia/pegasus/molting_season_2",
"display": {
"icon": {
"item": "unicopia:pegasus_feather"
},
"title": {
"translate": "advancements.unicopia.molting_season_3.title"
},
"description": {
"translate": "advancements.unicopia.molting_season_3.description"
},
"frame": "task",
"show_toast": true,
"announce_to_chat": true,
"hidden": true
},
"criteria": {
"shed_feather_15": {
"trigger": "unicopia:custom",
"conditions": {
"event": "shed_feather",
"repeats": 15
}
}
},
"requirements": [
[ "shed_feather_15" ]
]
}

View file

@ -1,29 +0,0 @@
{
"parent": "unicopia:unicopia/pegasus/sky_route",
"display": {
"icon": {
"item": "minecraft:glass_pane"
},
"title": {
"translate": "advancements.unicopia.rainbow_crash.title"
},
"description": {
"translate": "advancements.unicopia.rainbow_crash.description"
},
"frame": "task",
"show_toast": true,
"announce_to_chat": true,
"hidden": false
},
"criteria": {
"break_window": {
"trigger": "unicopia:custom",
"conditions": {
"event": "break_window"
}
}
},
"requirements": [
[ "break_window" ]
]
}

View file

@ -1,29 +0,0 @@
{
"parent": "unicopia:unicopia/pegasus/sky_route",
"display": {
"icon": {
"item": "unicopia:pegasus_badge"
},
"title": {
"translate": "advancements.unicopia.second_wind.title"
},
"description": {
"translate": "advancements.unicopia.second_wind.description"
},
"frame": "task",
"show_toast": true,
"announce_to_chat": true,
"hidden": false
},
"criteria": {
"fly_through_the_pain": {
"trigger": "unicopia:custom",
"conditions": {
"event": "second_wind"
}
}
},
"requirements": [
[ "fly_through_the_pain" ]
]
}

View file

@ -1,32 +0,0 @@
{
"parent": "unicopia:unicopia/root",
"display": {
"icon": {
"item": "unicopia:pegasus_badge"
},
"title": {
"translate": "advancements.unicopia.sky_route.title"
},
"description": {
"translate": "advancements.unicopia.sky_route.description"
},
"frame": "task",
"show_toast": true,
"announce_to_chat": true,
"hidden": false
},
"criteria": {
"be_birb": {
"trigger": "unicopia:player_change_race",
"conditions": {
"race": "pegasus"
}
}
},
"requirements": [
[ "be_birb" ]
],
"rewards": {
"experience": 100
}
}

View file

@ -1,31 +0,0 @@
{
"display": {
"icon": {
"item": "unicopia:alicorn_badge"
},
"title": {
"translate": "advancements.unicopia.root.title"
},
"description": {
"translate": "advancements.unicopia.root.description"
},
"frame": "task",
"show_toast": false,
"announce_to_chat": false,
"hidden": false,
"background": "minecraft:textures/gui/advancements/backgrounds/stone.png"
},
"criteria": {
"crafting_table": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{ "item": "minecraft:crafting_table" }
]
}
}
},
"requirements": [
[ "crafting_table" ]
]
}

View file

@ -1,97 +0,0 @@
{
"parent": "unicopia:unicopia/apple_route",
"display": {
"icon": {
"item": "unicopia:sweet_apple"
},
"title": {
"translate": "advancements.unicopia.sweet_apple_acres.title"
},
"description": {
"translate": "advancements.unicopia.sweet_apple_acres.description"
},
"frame": "challenge",
"show_toast": true,
"announce_to_chat": true,
"hidden": true
},
"rewards": {
"experience": 120
},
"criteria": {
"red_apple": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{ "items": [ "minecraft:apple" ] }
]
}
},
"green_apple": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{ "items": [ "unicopia:green_apple" ] }
]
}
},
"sweet_apple": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{ "items": [ "unicopia:sweet_apple" ] }
]
}
},
"sour_apple": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{ "items": [ "unicopia:sour_apple" ] }
]
}
},
"rotten_apple": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{ "items": [ "unicopia:rotten_apple" ] }
]
}
},
"zap_apple": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{ "items": [ "unicopia:zap_apple" ] }
]
}
},
"cooked_zap_apple": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{ "items": [ "unicopia:cooked_zap_apple" ] }
]
}
},
"golden_apple": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{ "items": [ "minecraft:golden_apple" ] }
]
}
}
},
"requirements": [
[ "red_apple" ],
[ "green_apple" ],
[ "sweet_apple" ],
[ "sour_apple" ],
[ "rotten_apple" ],
[ "zap_apple" ],
[ "cooked_zap_apple" ],
[ "golden_apple" ]
]
}

View file

@ -1,31 +0,0 @@
{
"parent": "unicopia:unicopia/apple_route",
"display": {
"icon": {
"item": "unicopia:toast"
},
"title": {
"translate": "advancements.unicopia.toast.title"
},
"description": {
"translate": "advancements.unicopia.toast.description"
},
"frame": "task",
"show_toast": true,
"announce_to_chat": true,
"hidden": false
},
"criteria": {
"has_toast": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{ "items": [ "unicopia:toast" ] }
]
}
}
},
"requirements": [
[ "has_toast" ]
]
}

View file

@ -1,31 +0,0 @@
{
"parent": "unicopia:unicopia/apple_route",
"display": {
"icon": {
"item": "minecraft:enchanted_golden_apple"
},
"title": {
"translate": "advancements.unicopia.trick_apple.title"
},
"description": {
"translate": "advancements.unicopia.trick_apple.description"
},
"frame": "task",
"show_toast": true,
"announce_to_chat": false,
"hidden": false
},
"criteria": {
"has_apple": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{ "items": [ "unicopia:zap_apple" ] }
]
}
}
},
"requirements": [
[ "has_apple" ]
]
}

View file

@ -1,29 +0,0 @@
{
"parent": "unicopia:unicopia/unicorn/magical_route",
"display": {
"icon": {
"item": "unicopia:pegasus_amulet"
},
"title": {
"translate": "advancements.unicopia.a_falling_wizard.title"
},
"description": {
"translate": "advancements.unicopia.a_falling_wizard.description"
},
"frame": "challenge",
"show_toast": true,
"announce_to_chat": true,
"hidden": true
},
"criteria": {
"teleport_above_world": {
"trigger": "unicopia:custom",
"conditions": {
"event": "teleport_above_world"
}
}
},
"requirements": [
[ "teleport_above_world" ]
]
}

View file

@ -1,31 +0,0 @@
{
"parent": "unicopia:unicopia/unicorn/save_the_day",
"display": {
"icon": {
"item": "unicopia:unicorn_amulet"
},
"title": {
"translate": "advancements.unicopia.ascension.title"
},
"description": {
"translate": "advancements.unicopia.ascension.description"
},
"frame": "goal",
"show_toast": true,
"announce_to_chat": true,
"hidden": false
},
"criteria": {
"obtain_the_thing": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{ "items": [ "unicopia:unicorn_amulet" ] }
]
}
}
},
"requirements": [
[ "obtain_the_thing" ]
]
}

View file

@ -1,31 +0,0 @@
{
"parent": "unicopia:unicopia/unicorn/magical_route",
"display": {
"icon": {
"item": "unicopia:spellbook"
},
"title": {
"translate": "advancements.unicopia.books.title"
},
"description": {
"translate": "advancements.unicopia.books.description"
},
"frame": "task",
"show_toast": true,
"announce_to_chat": true,
"hidden": false
},
"criteria": {
"has_book": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{ "items": [ "unicopia:spellbook" ] }
]
}
}
},
"requirements": [
[ "has_book" ]
]
}

View file

@ -1,31 +0,0 @@
{
"parent": "unicopia:unicopia/unicorn/books",
"display": {
"icon": {
"item": "unicopia:crystal_shard"
},
"title": {
"translate": "advancements.unicopia.crystaline.title"
},
"description": {
"translate": "advancements.unicopia.crystaline.description"
},
"frame": "task",
"show_toast": true,
"announce_to_chat": true,
"hidden": false
},
"criteria": {
"has_shard": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{ "items": [ "unicopia:crystal_shard" ] }
]
}
}
},
"requirements": [
[ "has_shard" ]
]
}

View file

@ -1,30 +0,0 @@
{
"parent": "unicopia:unicopia/unicorn/save_the_day",
"display": {
"icon": {
"item": "unicopia:broken_alicorn_amulet"
},
"title": {
"translate": "advancements.unicopia.doctor_sombrero.title"
},
"description": {
"translate": "advancements.unicopia.doctor_sombrero.description"
},
"frame": "challenge",
"show_toast": true,
"announce_to_chat": true,
"hidden": true
},
"criteria": {
"defeat_sombra": {
"trigger": "unicopia:custom",
"conditions": {
"event": "defeat_sombra",
"repeats": 2
}
}
},
"requirements": [
[ "defeat_sombra" ]
]
}

View file

@ -1,29 +0,0 @@
{
"parent": "unicopia:unicopia/unicorn/tempted",
"display": {
"icon": {
"item": "unicopia:alicorn_amulet"
},
"title": {
"translate": "advancements.unicopia.hello_darkness_my_old_friend.title"
},
"description": {
"translate": "advancements.unicopia.hello_darkness_my_old_friend.description"
},
"frame": "challenge",
"show_toast": true,
"announce_to_chat": true,
"hidden": false
},
"criteria": {
"light_altar": {
"trigger": "unicopia:custom",
"conditions": {
"event": "light_altar"
}
}
},
"requirements": [
[ "light_altar" ]
]
}

View file

@ -1,35 +0,0 @@
{
"parent": "unicopia:unicopia/root",
"display": {
"icon": {
"item": "unicopia:unicorn_badge"
},
"title": {
"translate": "advancements.unicopia.magical_route.title"
},
"description": {
"translate": "advancements.unicopia.magical_route.description"
},
"frame": "task",
"show_toast": true,
"announce_to_chat": true,
"hidden": false
},
"criteria": {
"be_horned": {
"trigger": "unicopia:player_change_race",
"conditions": {
"race": "unicorn"
}
},
"be_alihorned": {
"trigger": "unicopia:player_change_race",
"conditions": {
"race": "alicorn"
}
}
},
"requirements": [
[ "be_horned", "be_alihorned" ]
]
}

View file

@ -1,29 +0,0 @@
{
"parent": "unicopia:unicopia/unicorn/crystaline",
"display": {
"icon": {
"item": "unicopia:crystal_heart"
},
"title": {
"translate": "advancements.unicopia.power_up_heart.title"
},
"description": {
"translate": "advancements.unicopia.power_up_heart.description"
},
"frame": "task",
"show_toast": true,
"announce_to_chat": true,
"hidden": false
},
"criteria": {
"power_up_heart": {
"trigger": "unicopia:custom",
"conditions": {
"event": "power_up_heart"
}
}
},
"requirements": [
[ "power_up_heart" ]
]
}

View file

@ -1,29 +0,0 @@
{
"parent": "unicopia:unicopia/unicorn/hello_darkness_my_old_friend",
"display": {
"icon": {
"item": "unicopia:broken_alicorn_amulet"
},
"title": {
"translate": "advancements.unicopia.save_the_day.title"
},
"description": {
"translate": "advancements.unicopia.save_the_day.description"
},
"frame": "challenge",
"show_toast": true,
"announce_to_chat": true,
"hidden": false
},
"criteria": {
"defeat_sombra": {
"trigger": "unicopia:custom",
"conditions": {
"event": "defeat_sombra"
}
}
},
"requirements": [
[ "defeat_sombra" ]
]
}

View file

@ -1,29 +0,0 @@
{
"parent": "unicopia:unicopia/unicorn/books",
"display": {
"icon": {
"item": "minecraft:water_bucket"
},
"title": {
"translate": "advancements.unicopia.split_the_sea.title"
},
"description": {
"translate": "advancements.unicopia.split_the_sea.description"
},
"frame": "challenge",
"show_toast": true,
"announce_to_chat": true,
"hidden": true
},
"criteria": {
"split_sea": {
"trigger": "unicopia:custom",
"conditions": {
"event": "split_sea"
}
}
},
"requirements": [
[ "split_sea" ]
]
}

View file

@ -1,31 +0,0 @@
{
"parent": "unicopia:unicopia/unicorn/books",
"display": {
"icon": {
"item": "unicopia:alicorn_amulet"
},
"title": {
"translate": "advancements.unicopia.tempted.title"
},
"description": {
"translate": "advancements.unicopia.tempted.description"
},
"frame": "challenge",
"show_toast": true,
"announce_to_chat": true,
"hidden": false
},
"criteria": {
"has_amulet": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{ "items": [ "unicopia:alicorn_amulet" ] }
]
}
}
},
"requirements": [
[ "has_amulet" ]
]
}

View file

@ -1,7 +0,0 @@
{
"replace": false,
"values": [
"unicopia:gemstone",
"unicopia:magic_staff"
]
}