Class DespawnComponent
java.lang.Object
com.hypixel.hytale.server.core.modules.entity.DespawnComponent
- All Implemented Interfaces:
Component<EntityStore>,Cloneable
-
Field Summary
FieldsFields inherited from interface com.hypixel.hytale.component.Component
EMPTY_ARRAY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()static DespawnComponentdespawnInMilliseconds(TimeResource time, long milliseconds) static DespawnComponentdespawnInSeconds(TimeResource time, float seconds) static DespawnComponentdespawnInSeconds(TimeResource time, int seconds) static ComponentType<EntityStore, DespawnComponent> voidsetDespawn(Instant timeToDespawnAt) voidsetDespawnTo(Instant from, float additionalSeconds) static voidtrySetDespawn(CommandBuffer<EntityStore> commandBuffer, TimeResource timeResource, Ref<EntityStore> ref, DespawnComponent despawnComponent, Float newLifetime) Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.hypixel.hytale.component.Component
cloneSerializable
-
Field Details
-
CODEC
-
timeToDespawnAt
-
-
Constructor Details
-
DespawnComponent
public DespawnComponent() -
DespawnComponent
-
-
Method Details
-
getComponentType
-
setDespawn
-
setDespawnTo
-
getDespawn
-
despawnInSeconds
-
despawnInSeconds
-
despawnInMilliseconds
@Nonnull public static DespawnComponent despawnInMilliseconds(@Nonnull TimeResource time, long milliseconds) -
trySetDespawn
public static void trySetDespawn(@Nonnull CommandBuffer<EntityStore> commandBuffer, @Nonnull TimeResource timeResource, @Nonnull Ref<EntityStore> ref, @Nullable DespawnComponent despawnComponent, @Nullable Float newLifetime) -
clone
- Specified by:
clonein interfaceComponent<EntityStore>- Overrides:
clonein classObject
-