Package net.minecraft.advancements
Class PlayerAdvancements
- java.lang.Object
-
- net.minecraft.advancements.PlayerAdvancements
-
public class PlayerAdvancements extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<Advancement,AdvancementProgress>
advancements
private com.mojang.datafixers.DataFixer
dataFixer
private java.io.File
file
private static com.google.gson.Gson
GSON
private boolean
isFirstPacket
private Advancement
lastSelectedTab
private static org.apache.logging.log4j.Logger
LOGGER
private ServerPlayerEntity
player
private PlayerList
playerList
private java.util.Set<Advancement>
progressChanged
private static com.google.gson.reflect.TypeToken<java.util.Map<ResourceLocation,AdvancementProgress>>
TYPE_TOKEN
private java.util.Set<Advancement>
visibilityChanged
private java.util.Set<Advancement>
visible
-
Constructor Summary
Constructors Constructor Description PlayerAdvancements(com.mojang.datafixers.DataFixer p_i232594_1_, PlayerList p_i232594_2_, AdvancementManager p_i232594_3_, java.io.File p_i232594_4_, ServerPlayerEntity p_i232594_5_)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
award(Advancement p_192750_1_, java.lang.String p_192750_2_)
private void
checkForAutomaticTriggers(AdvancementManager p_240920_1_)
private void
ensureAllVisible()
private void
ensureVisibility(Advancement p_192742_1_)
void
flushDirty(ServerPlayerEntity p_192741_1_)
AdvancementProgress
getOrStartProgress(Advancement p_192747_1_)
private boolean
hasCompletedChildrenOrSelf(Advancement p_192746_1_)
private void
load(AdvancementManager p_240921_1_)
private void
registerListeners(Advancement p_193764_1_)
private void
registerListeners(AdvancementManager p_240919_1_)
void
reload(AdvancementManager p_240918_1_)
boolean
revoke(Advancement p_192744_1_, java.lang.String p_192744_2_)
void
save()
void
setPlayer(ServerPlayerEntity p_192739_1_)
void
setSelectedTab(Advancement p_194220_1_)
private boolean
shouldBeVisible(Advancement p_192738_1_)
private void
startProgress(Advancement p_192743_1_, AdvancementProgress p_192743_2_)
void
stopListening()
private void
unregisterListeners(Advancement p_193765_1_)
-
-
-
Field Detail
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER
-
GSON
private static final com.google.gson.Gson GSON
-
TYPE_TOKEN
private static final com.google.gson.reflect.TypeToken<java.util.Map<ResourceLocation,AdvancementProgress>> TYPE_TOKEN
-
dataFixer
private final com.mojang.datafixers.DataFixer dataFixer
-
playerList
private final PlayerList playerList
-
file
private final java.io.File file
-
advancements
private final java.util.Map<Advancement,AdvancementProgress> advancements
-
visible
private final java.util.Set<Advancement> visible
-
visibilityChanged
private final java.util.Set<Advancement> visibilityChanged
-
progressChanged
private final java.util.Set<Advancement> progressChanged
-
player
private ServerPlayerEntity player
-
lastSelectedTab
@Nullable private Advancement lastSelectedTab
-
isFirstPacket
private boolean isFirstPacket
-
-
Constructor Detail
-
PlayerAdvancements
public PlayerAdvancements(com.mojang.datafixers.DataFixer p_i232594_1_, PlayerList p_i232594_2_, AdvancementManager p_i232594_3_, java.io.File p_i232594_4_, ServerPlayerEntity p_i232594_5_)
-
-
Method Detail
-
setPlayer
public void setPlayer(ServerPlayerEntity p_192739_1_)
-
stopListening
public void stopListening()
-
reload
public void reload(AdvancementManager p_240918_1_)
-
registerListeners
private void registerListeners(AdvancementManager p_240919_1_)
-
ensureAllVisible
private void ensureAllVisible()
-
checkForAutomaticTriggers
private void checkForAutomaticTriggers(AdvancementManager p_240920_1_)
-
load
private void load(AdvancementManager p_240921_1_)
-
save
public void save()
-
award
public boolean award(Advancement p_192750_1_, java.lang.String p_192750_2_)
-
revoke
public boolean revoke(Advancement p_192744_1_, java.lang.String p_192744_2_)
-
registerListeners
private void registerListeners(Advancement p_193764_1_)
-
unregisterListeners
private void unregisterListeners(Advancement p_193765_1_)
-
flushDirty
public void flushDirty(ServerPlayerEntity p_192741_1_)
-
setSelectedTab
public void setSelectedTab(@Nullable Advancement p_194220_1_)
-
getOrStartProgress
public AdvancementProgress getOrStartProgress(Advancement p_192747_1_)
-
startProgress
private void startProgress(Advancement p_192743_1_, AdvancementProgress p_192743_2_)
-
ensureVisibility
private void ensureVisibility(Advancement p_192742_1_)
-
shouldBeVisible
private boolean shouldBeVisible(Advancement p_192738_1_)
-
hasCompletedChildrenOrSelf
private boolean hasCompletedChildrenOrSelf(Advancement p_192746_1_)
-
-