package com.thebrokenrail.twine.advancement; import com.google.gson.JsonObject; import com.thebrokenrail.twine.Twine; 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 ChestBoatCriterion extends AbstractCriterion { private static final Identifier ID = new Identifier(Twine.NAMESPACE, "chest_boat"); public void trigger(ServerPlayerEntity player) { this.test(player, conditions -> true); } @Override protected AbstractCriterionConditions conditionsFromJson(JsonObject obj, EntityPredicate.Extended playerPredicate, AdvancementEntityPredicateDeserializer predicateDeserializer) { return new AbstractCriterionConditions(ID, playerPredicate) {}; } @Override public Identifier getId() { return ID; } }