Contents
Record Class PrefabRemoveContext
java.lang.Object
java.lang.Record
com.hypixel.hytale.builtin.adventure.worldevents.context.PrefabRemoveContext
- All Implemented Interfaces:
Context
public record PrefabRemoveContext(@Nonnull UUID snapshot, @Nonnull ContextKey contextKey, @Nonnull Path prefab, @Nonnull org.joml.Vector3i origin, @Nonnull PrefabRotation rotation)
extends Record
implements Context
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final RecordCodec<PrefabRemoveContext> static final StringFields inherited from interface Context
TYPE_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionPrefabRemoveContext(UUID snapshot, ContextKey contextKey, Path prefab, org.joml.Vector3i origin, PrefabRotation rotation) Creates an instance of aPrefabRemoveContextrecord class. -
Method Summary
Modifier and TypeMethodDescriptionvoidcleanup(CommandBuffer<EntityStore> buffer, WorldEvent event) Called when the owning event ends, whether by success or failure.Returns the value of thecontextKeyrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.org.joml.Vector3iorigin()Returns the value of theoriginrecord component.prefab()Returns the value of theprefabrecord component.rotation()Returns the value of therotationrecord component.snapshot()Returns the value of thesnapshotrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
ID
- See Also:
-
CODEC
-
-
Constructor Details
-
PrefabRemoveContext
public PrefabRemoveContext(@Nonnull UUID snapshot, @Nonnull ContextKey contextKey, @Nonnull Path prefab, @Nonnull org.joml.Vector3i origin, @Nonnull PrefabRotation rotation) Creates an instance of aPrefabRemoveContextrecord class.- Parameters:
snapshot- the value for thesnapshotrecord componentcontextKey- the value for thecontextKeyrecord componentprefab- the value for theprefabrecord componentorigin- the value for theoriginrecord componentrotation- the value for therotationrecord component
-
-
Method Details
-
cleanup
Description copied from interface:ContextCalled when the owning event ends, whether by success or failure.Override to release resources or trigger compensating actions. Enqueue any ECS mutations through
bufferrather than applying them directly. This method is only called for context entries that are still present in the map when the event ends; entries that were removed viaconsumeearlier in the event's lifetime will not havecleanupinvoked. -
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
snapshot
Returns the value of thesnapshotrecord component.- Returns:
- the value of the
snapshotrecord component
-
contextKey
Returns the value of thecontextKeyrecord component.- Returns:
- the value of the
contextKeyrecord component
-
prefab
Returns the value of theprefabrecord component.- Returns:
- the value of the
prefabrecord component
-
origin
@Nonnull public org.joml.Vector3i origin()Returns the value of theoriginrecord component.- Returns:
- the value of the
originrecord component
-
rotation
Returns the value of therotationrecord component.- Returns:
- the value of the
rotationrecord component
-