public class PlayerPredicate extends Object
Modifier and Type | Class and Description |
---|---|
(package private) static class |
PlayerPredicate.AdvancementCriteriaPredicate |
(package private) static interface |
PlayerPredicate.AdvancementPredicate |
static class |
PlayerPredicate.Builder |
(package private) static class |
PlayerPredicate.CompletedAdvancementPredicate |
Modifier and Type | Field and Description |
---|---|
private Map<Identifier,PlayerPredicate.AdvancementPredicate> |
advancements |
static PlayerPredicate |
ANY |
private NumberRange.IntRange |
experienceLevel |
private GameMode |
gamemode |
private it.unimi.dsi.fastutil.objects.Object2BooleanMap<Identifier> |
recipes |
private Map<Stat<?>,NumberRange.IntRange> |
stats |
Modifier | Constructor and Description |
---|---|
private |
PlayerPredicate(NumberRange.IntRange experienceLevel,
GameMode gamemode,
Map<Stat<?>,NumberRange.IntRange> stats,
it.unimi.dsi.fastutil.objects.Object2BooleanMap<Identifier> recipes,
Map<Identifier,PlayerPredicate.AdvancementPredicate> advancements) |
Modifier and Type | Method and Description |
---|---|
private static PlayerPredicate.AdvancementPredicate |
criterionFromJson(JsonElement json) |
static PlayerPredicate |
fromJson(JsonElement json) |
private static <T> Stat<T> |
getStat(StatType<T> type,
Identifier id) |
private static <T> Identifier |
getStatId(Stat<T> stat) |
boolean |
test(Entity entity) |
JsonElement |
toJson() |
public static final PlayerPredicate ANY
private final NumberRange.IntRange experienceLevel
private final GameMode gamemode
private final Map<Stat<?>,NumberRange.IntRange> stats
private final it.unimi.dsi.fastutil.objects.Object2BooleanMap<Identifier> recipes
private final Map<Identifier,PlayerPredicate.AdvancementPredicate> advancements
private PlayerPredicate(NumberRange.IntRange experienceLevel, GameMode gamemode, Map<Stat<?>,NumberRange.IntRange> stats, it.unimi.dsi.fastutil.objects.Object2BooleanMap<Identifier> recipes, Map<Identifier,PlayerPredicate.AdvancementPredicate> advancements)
private static PlayerPredicate.AdvancementPredicate criterionFromJson(JsonElement json)
public boolean test(Entity entity)
public static PlayerPredicate fromJson(@Nullable JsonElement json)
private static <T> Stat<T> getStat(StatType<T> type, Identifier id)
private static <T> Identifier getStatId(Stat<T> stat)
public JsonElement toJson()