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 UseTeleportationBeaconCriterion extends AbstractCriterion<AbstractCriterionConditions> {
private static final Identifier ID = new Identifier(RelicCraft.NAMESPACE, "use_teleportation_beacon");
public UseTeleportationBeaconCriterion() {
}
@Override
public Identifier getId() {
return ID;
protected AbstractCriterionConditions conditionsFromJson(JsonObject obj, EntityPredicate.Extended playerPredicate, AdvancementEntityPredicateDeserializer predicateDeserializer) {
return new AbstractCriterionConditions(ID, playerPredicate) {
};
public void trigger(ServerPlayerEntity player) {
test(player, conditions -> true);