Record Class ArmatureEvent
java.lang.Object
java.lang.Record
net.ixdarklord.coolcatcanvas.api.client.armature.ArmatureEvent
- Record Components:
effect- the sound or particle name, or the instruction's textlocator- the point a particle comes out of; null for the model's origintime- when in the clip it happened, in seconds
public record ArmatureEvent(ArmatureEvent.Kind kind, String layer, String clip, String effect, @Nullable String locator, float time, ArmatureContext context)
extends Record
Something a clip did at a keyframe: a Blockbench sound, particle or timeline keyframe, or a Bedrock
sound_effects, particle_effects or timeline entry.
Sounds whose effect names a sound event ("minecraft:entity.wolf.growl") and particles whose effect names
a simple particle type ("minecraft:flame") are played by CoolCatLib without any code; listeners get them as
well, to do something else or more. An instruction's Molang (for example v.step = v.step + 1;) has already
run when listeners get it.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic interface -
Constructor Summary
ConstructorsConstructorDescriptionArmatureEvent(ArmatureEvent.Kind kind, String layer, String clip, String effect, @Nullable String locator, float time, ArmatureContext context) Creates an instance of aArmatureEventrecord class. -
Method Summary
Modifier and TypeMethodDescriptionclip()Returns the value of thecliprecord component.context()Returns the value of thecontextrecord component.effect()Returns the value of theeffectrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.kind()Returns the value of thekindrecord component.layer()Returns the value of thelayerrecord component.@Nullable Stringlocator()Returns the value of thelocatorrecord component.floattime()Returns the value of thetimerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ArmatureEvent
public ArmatureEvent(ArmatureEvent.Kind kind, String layer, String clip, String effect, @Nullable @Nullable String locator, float time, ArmatureContext context) Creates an instance of aArmatureEventrecord class.- Parameters:
kind- the value for thekindrecord componentlayer- the value for thelayerrecord componentclip- the value for thecliprecord componenteffect- the value for theeffectrecord componentlocator- the value for thelocatorrecord componenttime- the value for thetimerecord componentcontext- the value for thecontextrecord component
-
-
Method Details
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
kind
Returns the value of thekindrecord component.- Returns:
- the value of the
kindrecord component
-
layer
Returns the value of thelayerrecord component.- Returns:
- the value of the
layerrecord component
-
clip
Returns the value of thecliprecord component.- Returns:
- the value of the
cliprecord component
-
effect
-
locator
-
time
-
context
Returns the value of thecontextrecord component.- Returns:
- the value of the
contextrecord component
-