Record Class AnimationBundler
java.lang.Object
java.lang.Record
kr.toxicity.model.api.nms.AnimationBundler
- Record Components:
standard- the packet bundler for standard Minecraft clientsmod- the packet bundler for clients with the specific mod enabled
public record AnimationBundler(@NotNull PacketBundler standard, @NotNull ModAnimationBundler mod)
extends Record
A record that bundles animation packets for both standard clients and modded clients.
- Since:
- 2.2.1
-
Constructor Summary
ConstructorsConstructorDescriptionAnimationBundler(@NotNull PacketBundler standard, @NotNull ModAnimationBundler mod) Creates an instance of aAnimationBundlerrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanChecks if there are any animation packets to be sent.@NotNull ModAnimationBundlermod()Returns the value of themodrecord component.voidsend(@NotNull PlayerChannelHandler handler) Sends the appropriate animation packets to the player based on their client type.@NotNull PacketBundlerstandard()Returns the value of thestandardrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
AnimationBundler
public AnimationBundler(@NotNull @NotNull PacketBundler standard, @NotNull @NotNull ModAnimationBundler mod) Creates an instance of aAnimationBundlerrecord class.
-
-
Method Details
-
isNotEmpty
public boolean isNotEmpty()Checks if there are any animation packets to be sent.- Returns:
- true if the standard packet bundler is not empty
- Since:
- 2.2.1
-
send
Sends the appropriate animation packets to the player based on their client type.- Parameters:
handler- the player's channel handler used to determine mod status and send packets- Since:
- 2.2.1
-
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). -
standard
-
mod
-