VoiceActivation

Constructors

Link copied to clipboard
constructor(@NotNull name: @NotNull String, @NotNull translation: @NotNull String, @NotNull icon: @NotNull String, distances: List<Integer>, defaultDistance: Int, proximity: Boolean, stereoSupported: Boolean, transitive: Boolean, @Nullable encoderInfo: @Nullable CodecInfo, weight: Int)

Properties

Link copied to clipboard
Link copied to clipboard
val PROXIMITY_NAME: String = "proximity"

Functions

Link copied to clipboard
open fun calculateAllowedDistance(distance: Int): Int
Calculates allowed distance.
Link copied to clipboard
open fun checkDistance(distance: Int): Boolean
Checks if a specified distance is among the available distances for the activation.
Link copied to clipboard
open fun deserialize(in: ByteArrayDataInput)
Deserialize the object from a byte stream using the provided ByteArrayDataInput.
Link copied to clipboard
open fun generateId(@NotNull name: @NotNull String): UUID
Link copied to clipboard
abstract fun getDefaultDistance(): Int
Gets the default distance for the activation.
Link copied to clipboard
Gets a collection of distances associated with the activation.
Link copied to clipboard
Gets encoder information for the activation.
Link copied to clipboard
@NotNull
abstract fun getIcon(): @NotNull String
Gets the icon of the activation, which can be a Minecraft ResourceLocation or base64-encoded data.
Link copied to clipboard
@NotNull
abstract fun getId(): @NotNull UUID
Gets the unique identifier of the activation.
Link copied to clipboard
open fun getMaxDistance(): Int
Gets the maximum distance from the list of distances.
Link copied to clipboard
open fun getMinDistance(): Int
Gets the minimum distance from the list of distances.
Link copied to clipboard
@NotNull
abstract fun getName(): @NotNull String
Gets the name of the activation.
Link copied to clipboard
@NotNull
abstract fun getTranslation(): @NotNull String
Gets the translation key associated with the activation.
Link copied to clipboard
open fun getWeight(): Int
Gets the weight of the activation.
Link copied to clipboard
abstract fun isProximity(): Boolean
Checks if the activation has proximity output.
Link copied to clipboard
/** Checks if stereo audio is supported by the activation.
Link copied to clipboard
abstract fun isTransitive(): Boolean
Checks if the activation is transitive.
Link copied to clipboard
open fun serialize(out: ByteArrayDataOutput)
Serialize the object to a byte stream using the provided ByteArrayDataOutput.