Contents
Class Dirty
java.lang.Object
com.hypixel.hytale.server.core.entity.Dirty
- All Implemented Interfaces:
Component<EntityStore>, Cloneable
-
Field Summary
Fields inherited from interface Component
EMPTY_ARRAY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclearSaving(CompletableFuture<Void> future) Clears the in-flight save marker, but only iffutureis still the tracked one, so a late completion can't clobber a newer save that already replaced it.clone()booleanvoidstatic ComponentType<EntityStore, Dirty> booleanisDirty()booleanisSaving()voidfloatpollCooldown(float dt) Decrements the save cooldown by the given delta time.voidsetSaving(CompletableFuture<Void> future) Records the in-flight save's I/O future.voidsetSection(EntitySection section) Deprecated.Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Component
cloneSerializable
-
Constructor Details
-
Dirty
public Dirty() -
Dirty
-
-
Method Details
-
getComponentType
-
markDirty
public void markDirty() -
forceMarkDirty
public void forceMarkDirty() -
consumeDirty
public boolean consumeDirty() -
isDirty
public boolean isDirty() -
pollCooldown
public float pollCooldown(float dt) Decrements the save cooldown by the given delta time.- Returns:
- the remaining cooldown after decrement; saves should only be issued once this is
<= 0.0f.
-
isSaving
public boolean isSaving() -
setSaving
Records the in-flight save's I/O future.isSaving()then reads non-null, so other savers won't start a second write for this entity and the removal path can chain its delete onfutureviagetSavingFuture(). -
clearSaving
Clears the in-flight save marker, but only iffutureis still the tracked one, so a late completion can't clobber a newer save that already replaced it. -
getSavingFuture
-
setSection
Deprecated. -
clone
- Specified by:
clonein interfaceComponent<EntityStore>- Returns:
- a clone instance of the original component instance.
-