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 classScoreboardCriterion.RenderType -
Field Summary
Fields Modifier and Type Field Description static ScoreboardCriterionAIRstatic ScoreboardCriterionARMORstatic Map<String,ScoreboardCriterion>CRITERIAA map of all scoreboard criteria by their names.static ScoreboardCriterionDEATH_COUNTprivate ScoreboardCriterion.RenderTypedefaultRenderTypestatic ScoreboardCriterionDUMMYstatic ScoreboardCriterionFOODstatic ScoreboardCriterionHEALTHstatic ScoreboardCriterion[]KILLED_BY_TEAMSstatic ScoreboardCriterionLEVELprivate Stringnamestatic ScoreboardCriterionPLAYER_KILL_COUNTprivate booleanreadOnlystatic ScoreboardCriterion[]TEAM_KILLSstatic ScoreboardCriterionTOTAL_KILL_COUNTstatic ScoreboardCriterionTRIGGERstatic ScoreboardCriterionXP -
Constructor Summary
Constructors Modifier Constructor Description ScoreboardCriterion(String name)protectedScoreboardCriterion(String name, boolean readOnly, ScoreboardCriterion.RenderType defaultRenderType) -
Method Summary
Modifier and Type Method Description ScoreboardCriterion.RenderTypegetDefaultRenderType()StringgetName()static Optional<ScoreboardCriterion>getOrCreateStatCriterion(String name)private static <T> Optional<ScoreboardCriterion>getOrCreateStatCriterion(StatType<T> statType, Identifier id)booleanisReadOnly()
-
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
-