package com.thebrokenrail.reliccraft.advancement; import com.google.gson.JsonDeserializationContext; import com.google.gson.JsonObject; import com.thebrokenrail.reliccraft.RelicCraft; import net.minecraft.advancement.criterion.AbstractCriterion; import net.minecraft.advancement.criterion.AbstractCriterionConditions; import net.minecraft.server.network.ServerPlayerEntity; import net.minecraft.util.Identifier; public class DuplicateTimeDilaterCriterion extends AbstractCriterion { private static final Identifier ID = new Identifier(RelicCraft.NAMESPACE, "duplicate_time_dilater"); public DuplicateTimeDilaterCriterion() { } @Override public Identifier getId() { return ID; } @Override public Conditions conditionsFromJson(JsonObject jsonObject, JsonDeserializationContext jsonDeserializationContext) { return new Conditions(); } public void trigger(ServerPlayerEntity player) { test(player.getAdvancementTracker(), conditions -> true); } public static class Conditions extends AbstractCriterionConditions { public Conditions() { super(ID); } } }