Contents
Record Class TriggerVolumeContext
java.lang.Object
java.lang.Record
com.hypixel.hytale.builtin.triggervolumes.worldevent.TriggerVolumeContext
- All Implemented Interfaces:
Context
Context written by
TriggerVolumeCreateAction to track the trigger volume it created.
It holds the generated volume ID so a later TriggerVolumeRemoveAction can find and
remove the volume by its VolumeKey.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final RecordCodec<TriggerVolumeContext> static final StringFields inherited from interface Context
TYPE_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionTriggerVolumeContext(String volumeId) Creates an instance of aTriggerVolumeContextrecord class. -
Method Summary
Modifier and TypeMethodDescriptionvoidcleanup(CommandBuffer<EntityStore> buffer, WorldEvent event) Called when the owning event ends, whether by success or failure.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.volumeId()Returns the value of thevolumeIdrecord component.
-
Field Details
-
ID
- See Also:
-
CODEC
-
-
Constructor Details
-
TriggerVolumeContext
Creates an instance of aTriggerVolumeContextrecord class.- Parameters:
volumeId- the value for thevolumeIdrecord 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). -
volumeId
Returns the value of thevolumeIdrecord component.- Returns:
- the value of the
volumeIdrecord component
-