package com.thebrokenrail.reliccraft.advancement; 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.predicate.entity.AdvancementEntityPredicateDeserializer; import net.minecraft.predicate.entity.EntityPredicate; import net.minecraft.server.network.ServerPlayerEntity; import net.minecraft.util.Identifier; public class DilateTimeCriterion extends AbstractCriterion { private static final Identifier ID = new Identifier(RelicCraft.NAMESPACE, "dilate_time"); public DilateTimeCriterion() { } @Override public Identifier getId() { return ID; } @Override protected AbstractCriterionConditions conditionsFromJson(JsonObject obj, EntityPredicate.Extended playerPredicate, AdvancementEntityPredicateDeserializer predicateDeserializer) { return new AbstractCriterionConditions(ID, playerPredicate) { }; } public void trigger(ServerPlayerEntity player) { test(player, conditions -> true); } }