/* * Decompiled with CFR 0.152. * * Could not load the following classes: * com.mojang.serialization.Codec */ package net.minecraft.advancements; import com.mojang.serialization.Codec; import net.minecraft.advancements.AdvancementHolder; import net.minecraft.advancements.Criterion; import net.minecraft.advancements.CriterionTriggerInstance; import net.minecraft.server.PlayerAdvancements; public interface CriterionTrigger { public void addPlayerListener(PlayerAdvancements var1, Listener var2); public void removePlayerListener(PlayerAdvancements var1, Listener var2); public void removePlayerListeners(PlayerAdvancements var1); public Codec codec(); default public Criterion createCriterion(T instance) { return new Criterion(this, instance); } public record Listener(T trigger, AdvancementHolder advancement, String criterion) { public void run(PlayerAdvancements player) { player.award(this.advancement, this.criterion); } } }