public class PlayerAdvancements
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static com.google.gson.Gson |
GSON |
private boolean |
isFirstPacket |
private Advancement |
lastSelectedTab |
private static org.apache.logging.log4j.Logger |
LOGGER |
private static com.google.gson.reflect.TypeToken<java.util.Map<ResourceLocation,AdvancementProgress>> |
MAP_TOKEN |
private ServerPlayerEntity |
player |
private java.util.Map<Advancement,AdvancementProgress> |
progress |
private java.util.Set<Advancement> |
progressChanged |
private java.io.File |
progressFile |
private MinecraftServer |
server |
private java.util.Set<Advancement> |
visibilityChanged |
private java.util.Set<Advancement> |
visible |
Constructor and Description |
---|
PlayerAdvancements(MinecraftServer server,
java.io.File progressFileIn,
ServerPlayerEntity player) |
Modifier and Type | Method and Description |
---|---|
private void |
checkForAutomaticTriggers() |
void |
dispose() |
private void |
ensureAllVisible() |
private void |
ensureVisibility(Advancement p_192742_1_) |
void |
flushDirty(ServerPlayerEntity p_192741_1_) |
AdvancementProgress |
getProgress(Advancement advancementIn) |
boolean |
grantCriterion(Advancement advancementIn,
java.lang.String criterionKey) |
private boolean |
hasCompletedChildrenOrSelf(Advancement p_192746_1_) |
private void |
load() |
private void |
registerListeners() |
private void |
registerListeners(Advancement advancementIn) |
void |
reload() |
boolean |
revokeCriterion(Advancement advancementIn,
java.lang.String criterionKey) |
void |
save() |
void |
setPlayer(ServerPlayerEntity player) |
void |
setSelectedTab(Advancement p_194220_1_) |
private boolean |
shouldBeVisible(Advancement p_192738_1_) |
private void |
startProgress(Advancement advancementIn,
AdvancementProgress p_192743_2_) |
private void |
unregisterListeners(Advancement advancementIn) |
private static final org.apache.logging.log4j.Logger LOGGER
private static final com.google.gson.Gson GSON
private static final com.google.gson.reflect.TypeToken<java.util.Map<ResourceLocation,AdvancementProgress>> MAP_TOKEN
private final MinecraftServer server
private final java.io.File progressFile
private final java.util.Map<Advancement,AdvancementProgress> progress
private final java.util.Set<Advancement> visible
private final java.util.Set<Advancement> visibilityChanged
private final java.util.Set<Advancement> progressChanged
private ServerPlayerEntity player
@Nullable private Advancement lastSelectedTab
private boolean isFirstPacket
public PlayerAdvancements(MinecraftServer server, java.io.File progressFileIn, ServerPlayerEntity player)
public void setPlayer(ServerPlayerEntity player)
public void dispose()
public void reload()
private void registerListeners()
private void ensureAllVisible()
private void checkForAutomaticTriggers()
private void load()
public void save()
public boolean grantCriterion(Advancement advancementIn, java.lang.String criterionKey)
public boolean revokeCriterion(Advancement advancementIn, java.lang.String criterionKey)
private void registerListeners(Advancement advancementIn)
private void unregisterListeners(Advancement advancementIn)
public void flushDirty(ServerPlayerEntity p_192741_1_)
public void setSelectedTab(@Nullable Advancement p_194220_1_)
public AdvancementProgress getProgress(Advancement advancementIn)
private void startProgress(Advancement advancementIn, AdvancementProgress p_192743_2_)
private void ensureVisibility(Advancement p_192742_1_)
private boolean shouldBeVisible(Advancement p_192738_1_)
private boolean hasCompletedChildrenOrSelf(Advancement p_192746_1_)