Class ServerStatsCounter
java.lang.Object
net.minecraft.stats.StatsCounter
net.minecraft.stats.ServerStatsCounter
Server-side implementation of
StatsCounter; handles counting, serialising, and de-serialising statistics, as well as sending them to connected clients via the award stats packet.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Pathprivate static final Gsonprivate static final org.slf4j.LoggerFields inherited from class StatsCounter
stats -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateTypedStatsCodec(StatType<T> type) getDirty()voidvoidparse(com.mojang.datafixers.DataFixer fixerUpper, JsonElement element) voidsave()voidsendStats(ServerPlayer player) voidprotected JsonElementtoJson()Methods inherited from class StatsCounter
getValue, getValue, increment
-
Field Details
-
GSON
-
LOGGER
private static final org.slf4j.Logger LOGGER -
STATS_CODEC
-
file
-
dirty
-
-
Constructor Details
-
ServerStatsCounter
-
-
Method Details
-
createTypedStatsCodec
-
save
public void save() -
setValue
- Overrides:
setValuein classStatsCounter
-
getDirty
-
parse
-
toJson
-
markAllDirty
public void markAllDirty() -
sendStats
-