Package net.minecraft.server
Class PlayerAdvancements
java.lang.Object
net.minecraft.server.PlayerAdvancements
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprivate final com.mojang.serialization.Codec<PlayerAdvancements.Data>
private static final com.google.gson.Gson
private boolean
private AdvancementHolder
private static final org.slf4j.Logger
private ServerPlayer
private final PlayerList
private final Path
private final Map<AdvancementHolder,
AdvancementProgress> private final Set<AdvancementHolder>
private final Set<AdvancementNode>
private AdvancementTree
private final Set<AdvancementHolder>
-
Constructor Summary
ConstructorDescriptionPlayerAdvancements
(com.mojang.datafixers.DataFixer p_265655_, PlayerList p_265703_, ServerAdvancementManager p_265166_, Path p_265268_, ServerPlayer p_265673_) -
Method Summary
Modifier and TypeMethodDescriptionprivate void
applyFrom
(ServerAdvancementManager p_299201_, PlayerAdvancements.Data p_300341_) private PlayerAdvancements.Data
asData()
boolean
award
(AdvancementHolder p_298135_, String p_135990_) private void
void
flushDirty
(ServerPlayer p_135993_) getOrStartProgress
(AdvancementHolder p_299379_) private void
load
(ServerAdvancementManager p_136007_) private void
markForVisibilityUpdate
(AdvancementHolder p_298258_) private <T extends CriterionTriggerInstance>
voidregisterListener
(AdvancementHolder p_297859_, String p_300029_, Criterion<T> p_298869_) private void
registerListeners
(AdvancementHolder p_299071_) private void
registerListeners
(ServerAdvancementManager p_135995_) void
reload
(ServerAdvancementManager p_135982_) private <T extends CriterionTriggerInstance>
voidremoveListener
(AdvancementHolder p_301071_, String p_298445_, Criterion<T> p_297428_) boolean
revoke
(AdvancementHolder p_297905_, String p_136000_) void
save()
void
setPlayer
(ServerPlayer p_135980_) void
setSelectedTab
(AdvancementHolder p_300452_) private void
startProgress
(AdvancementHolder p_299830_, AdvancementProgress p_135987_) void
private void
unregisterListeners
(AdvancementHolder p_298363_) private void
updateTreeVisibility
(AdvancementNode p_298387_, Set<AdvancementHolder> p_265206_, Set<ResourceLocation> p_265593_)
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
GSON
private static final com.google.gson.Gson GSON -
playerList
-
playerSavePath
-
tree
-
progress
-
visible
-
progressChanged
-
rootsToUpdate
-
player
-
lastSelectedTab
-
isFirstPacket
private boolean isFirstPacket -
codec
-
-
Constructor Details
-
PlayerAdvancements
public PlayerAdvancements(com.mojang.datafixers.DataFixer p_265655_, PlayerList p_265703_, ServerAdvancementManager p_265166_, Path p_265268_, ServerPlayer p_265673_)
-
-
Method Details
-
setPlayer
-
stopListening
public void stopListening() -
reload
-
registerListeners
-
checkForAutomaticTriggers
-
load
-
save
public void save() -
applyFrom
-
asData
-
award
-
revoke
-
markForVisibilityUpdate
-
registerListeners
-
registerListener
private <T extends CriterionTriggerInstance> void registerListener(AdvancementHolder p_297859_, String p_300029_, Criterion<T> p_298869_) -
unregisterListeners
-
removeListener
private <T extends CriterionTriggerInstance> void removeListener(AdvancementHolder p_301071_, String p_298445_, Criterion<T> p_297428_) -
flushDirty
-
setSelectedTab
-
getOrStartProgress
-
startProgress
-
updateTreeVisibility
private void updateTreeVisibility(AdvancementNode p_298387_, Set<AdvancementHolder> p_265206_, Set<ResourceLocation> p_265593_)
-