public class Stat<T> extends ScoreboardCriterion
ScoreboardCriterion.RenderType
Modifier and Type | Field and Description |
---|---|
private StatFormatter |
formatter |
private StatType<T> |
type |
private T |
value |
AIR, ARMOR, DEATH_COUNT, DUMMY, FOOD, HEALTH, KILLED_BY_TEAMS, LEVEL, OBJECTIVES, PLAYER_KILL_COUNT, TEAM_KILLS, TOTAL_KILL_COUNT, TRIGGER, XP
Modifier | Constructor and Description |
---|---|
protected |
Stat(StatType<T> type,
T value,
StatFormatter formatter) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
String |
format(int int2) |
private static <T> String |
getName(Identifier id) |
static <T> String |
getName(StatType<T> type,
T value) |
StatType<T> |
getType() |
T |
getValue() |
int |
hashCode() |
String |
toString() |
createStatCriterion, getCriterionType, getName, isReadOnly
private final StatFormatter formatter
private final T value
protected Stat(StatType<T> type, T value, StatFormatter formatter)
private static <T> String getName(@Nullable Identifier id)
public T getValue()
@Environment(value=CLIENT) public String format(int int2)