Package net.minecraft.scoreboard
Class ScoreboardCriterion
java.lang.Object
net.minecraft.scoreboard.ScoreboardCriterion
- Direct Known Subclasses:
Stat
public class ScoreboardCriterion extends Object
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ScoreboardCriterion.RenderType
-
Field Summary
Fields Modifier and Type Field Description static ScoreboardCriterion
AIR
static ScoreboardCriterion
ARMOR
static Map<String,ScoreboardCriterion>
CRITERIA
A map of all scoreboard criteria by their names.static ScoreboardCriterion
DEATH_COUNT
private ScoreboardCriterion.RenderType
defaultRenderType
static ScoreboardCriterion
DUMMY
static ScoreboardCriterion
FOOD
static ScoreboardCriterion
HEALTH
static ScoreboardCriterion[]
KILLED_BY_TEAMS
static ScoreboardCriterion
LEVEL
private String
name
static ScoreboardCriterion
PLAYER_KILL_COUNT
private boolean
readOnly
static ScoreboardCriterion[]
TEAM_KILLS
static ScoreboardCriterion
TOTAL_KILL_COUNT
static ScoreboardCriterion
TRIGGER
static ScoreboardCriterion
XP
-
Constructor Summary
Constructors Modifier Constructor Description ScoreboardCriterion(String name)
protected
ScoreboardCriterion(String name, boolean readOnly, ScoreboardCriterion.RenderType defaultRenderType)
-
Method Summary
Modifier and Type Method Description ScoreboardCriterion.RenderType
getDefaultRenderType()
String
getName()
static Optional<ScoreboardCriterion>
getOrCreateStatCriterion(String name)
private static <T> Optional<ScoreboardCriterion>
getOrCreateStatCriterion(StatType<T> statType, Identifier id)
boolean
isReadOnly()
-
Field Details
-
CRITERIA
A map of all scoreboard criteria by their names. Updated automatically in the constructor. -
DUMMY
-
TRIGGER
-
DEATH_COUNT
-
PLAYER_KILL_COUNT
-
TOTAL_KILL_COUNT
-
HEALTH
-
FOOD
-
AIR
-
ARMOR
-
XP
-
LEVEL
-
TEAM_KILLS
-
KILLED_BY_TEAMS
-
name
-
readOnly
private final boolean readOnly -
defaultRenderType
-
-
Constructor Details
-
ScoreboardCriterion
-
ScoreboardCriterion
protected ScoreboardCriterion(String name, boolean readOnly, ScoreboardCriterion.RenderType defaultRenderType)
-
-
Method Details
-
getOrCreateStatCriterion
-
getOrCreateStatCriterion
private static <T> Optional<ScoreboardCriterion> getOrCreateStatCriterion(StatType<T> statType, Identifier id) -
getName
-
isReadOnly
public boolean isReadOnly() -
getDefaultRenderType
-