Record Class SoundPlaybackData

java.lang.Object
java.lang.Record
de.mrjulsen.dragnsounds.core.data.SoundPlaybackData

public record SoundPlaybackData(float volume, float pitch, int attenuationDistance, net.minecraft.world.phys.Vec3 position, net.minecraft.world.phys.Vec3 direction, net.minecraft.world.phys.Vec3 velocity, float doppler, float coneAngleA, float coneAngleB, float coneOuterGain, boolean paused, int playbackPositionTicks) extends Record
  • Constructor Summary

    Constructors
    Constructor
    Description
    SoundPlaybackData(float volume, float pitch, int attenuationDistance, net.minecraft.world.phys.Vec3 position, net.minecraft.world.phys.Vec3 direction, net.minecraft.world.phys.Vec3 velocity, float doppler, float coneAngleA, float coneAngleB, float coneOuterGain, boolean paused, int playbackPositionTicks)
    Creates an instance of a SoundPlaybackData record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the value of the attenuationDistance record component.
    float
    Returns the value of the coneAngleA record component.
    float
    Returns the value of the coneAngleB record component.
    float
    Returns the value of the coneOuterGain record component.
    net.minecraft.world.phys.Vec3
    Returns the value of the direction record component.
    float
    Returns the value of the doppler record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    fromNbt(net.minecraft.nbt.CompoundTag nbt)
     
    final int
    Returns a hash code value for this object.
    boolean
    Returns the value of the paused record component.
    float
    Returns the value of the pitch record component.
    int
    Returns the value of the playbackPositionTicks record component.
    net.minecraft.world.phys.Vec3
    Returns the value of the position record component.
    net.minecraft.nbt.CompoundTag
     
    final String
    Returns a string representation of this record class.
    net.minecraft.world.phys.Vec3
    Returns the value of the velocity record component.
    float
    Returns the value of the volume record component.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • SoundPlaybackData

      public SoundPlaybackData(float volume, float pitch, int attenuationDistance, net.minecraft.world.phys.Vec3 position, net.minecraft.world.phys.Vec3 direction, net.minecraft.world.phys.Vec3 velocity, float doppler, float coneAngleA, float coneAngleB, float coneOuterGain, boolean paused, int playbackPositionTicks)
      Creates an instance of a SoundPlaybackData record class.
      Parameters:
      volume - the value for the volume record component
      pitch - the value for the pitch record component
      attenuationDistance - the value for the attenuationDistance record component
      position - the value for the position record component
      direction - the value for the direction record component
      velocity - the value for the velocity record component
      doppler - the value for the doppler record component
      coneAngleA - the value for the coneAngleA record component
      coneAngleB - the value for the coneAngleB record component
      coneOuterGain - the value for the coneOuterGain record component
      paused - the value for the paused record component
      playbackPositionTicks - the value for the playbackPositionTicks record component
  • Method Details

    • toNbt

      public net.minecraft.nbt.CompoundTag toNbt()
    • fromNbt

      public static SoundPlaybackData fromNbt(net.minecraft.nbt.CompoundTag nbt)
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • volume

      public float volume()
      Returns the value of the volume record component.
      Returns:
      the value of the volume record component
    • pitch

      public float pitch()
      Returns the value of the pitch record component.
      Returns:
      the value of the pitch record component
    • attenuationDistance

      public int attenuationDistance()
      Returns the value of the attenuationDistance record component.
      Returns:
      the value of the attenuationDistance record component
    • position

      public net.minecraft.world.phys.Vec3 position()
      Returns the value of the position record component.
      Returns:
      the value of the position record component
    • direction

      public net.minecraft.world.phys.Vec3 direction()
      Returns the value of the direction record component.
      Returns:
      the value of the direction record component
    • velocity

      public net.minecraft.world.phys.Vec3 velocity()
      Returns the value of the velocity record component.
      Returns:
      the value of the velocity record component
    • doppler

      public float doppler()
      Returns the value of the doppler record component.
      Returns:
      the value of the doppler record component
    • coneAngleA

      public float coneAngleA()
      Returns the value of the coneAngleA record component.
      Returns:
      the value of the coneAngleA record component
    • coneAngleB

      public float coneAngleB()
      Returns the value of the coneAngleB record component.
      Returns:
      the value of the coneAngleB record component
    • coneOuterGain

      public float coneOuterGain()
      Returns the value of the coneOuterGain record component.
      Returns:
      the value of the coneOuterGain record component
    • paused

      public boolean paused()
      Returns the value of the paused record component.
      Returns:
      the value of the paused record component
    • playbackPositionTicks

      public int playbackPositionTicks()
      Returns the value of the playbackPositionTicks record component.
      Returns:
      the value of the playbackPositionTicks record component