This repository has been archived on 2023-11-26. You can view files and clone it, but cannot push or open issues or pull requests.
RelicCraft/src/main/java/com/thebrokenrail/reliccraft/advancement/UseTeleportationBeaconCriterion.java

32 lines
1.2 KiB
Java
Raw Normal View History

2020-04-04 02:32:34 +00:00
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;
2020-06-28 16:38:49 +00:00
import net.minecraft.predicate.entity.AdvancementEntityPredicateDeserializer;
import net.minecraft.predicate.entity.EntityPredicate;
2020-04-04 02:32:34 +00:00
import net.minecraft.server.network.ServerPlayerEntity;
import net.minecraft.util.Identifier;
2020-06-28 16:38:49 +00:00
public class UseTeleportationBeaconCriterion extends AbstractCriterion<AbstractCriterionConditions> {
2020-04-04 02:32:34 +00:00
private static final Identifier ID = new Identifier(RelicCraft.NAMESPACE, "use_teleportation_beacon");
public UseTeleportationBeaconCriterion() {
}
2020-04-05 22:17:42 +00:00
@Override
2020-04-04 02:32:34 +00:00
public Identifier getId() {
return ID;
}
2020-04-05 22:17:42 +00:00
@Override
2020-06-28 16:38:49 +00:00
protected AbstractCriterionConditions conditionsFromJson(JsonObject obj, EntityPredicate.Extended playerPredicate, AdvancementEntityPredicateDeserializer predicateDeserializer) {
2020-06-28 17:41:53 +00:00
return new AbstractCriterionConditions(ID, playerPredicate) {
};
2020-04-04 02:32:34 +00:00
}
public void trigger(ServerPlayerEntity player) {
2020-06-28 16:38:49 +00:00
test(player, conditions -> true);
2020-04-04 02:32:34 +00:00
}
}