TheBrokenRail
e654df798c
All checks were successful
RelicCraft/pipeline/head This commit looks good
Final Tweaks
36 lines
1.2 KiB
Java
36 lines
1.2 KiB
Java
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<DuplicateTimeDilaterCriterion.Conditions> {
|
|
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);
|
|
}
|
|
}
|
|
} |