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
ConstructorDescriptionSoundPlaybackData
(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 aSoundPlaybackData
record class. -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the value of theattenuationDistance
record component.float
Returns the value of theconeAngleA
record component.float
Returns the value of theconeAngleB
record component.float
Returns the value of theconeOuterGain
record component.net.minecraft.world.phys.Vec3
Returns the value of thedirection
record component.float
doppler()
Returns the value of thedoppler
record component.final boolean
Indicates whether some other object is "equal to" this one.static SoundPlaybackData
fromNbt
(net.minecraft.nbt.CompoundTag nbt) final int
hashCode()
Returns a hash code value for this object.boolean
paused()
Returns the value of thepaused
record component.float
pitch()
Returns the value of thepitch
record component.int
Returns the value of theplaybackPositionTicks
record component.net.minecraft.world.phys.Vec3
position()
Returns the value of theposition
record component.net.minecraft.nbt.CompoundTag
toNbt()
final String
toString()
Returns a string representation of this record class.net.minecraft.world.phys.Vec3
velocity()
Returns the value of thevelocity
record component.float
volume()
Returns the value of thevolume
record component.
-
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 aSoundPlaybackData
record class.- Parameters:
volume
- the value for thevolume
record componentpitch
- the value for thepitch
record componentattenuationDistance
- the value for theattenuationDistance
record componentposition
- the value for theposition
record componentdirection
- the value for thedirection
record componentvelocity
- the value for thevelocity
record componentdoppler
- the value for thedoppler
record componentconeAngleA
- the value for theconeAngleA
record componentconeAngleB
- the value for theconeAngleB
record componentconeOuterGain
- the value for theconeOuterGain
record componentpaused
- the value for thepaused
record componentplaybackPositionTicks
- the value for theplaybackPositionTicks
record component
-
-
Method Details
-
toNbt
public net.minecraft.nbt.CompoundTag toNbt() -
fromNbt
-
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. -
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. -
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 '=='. -
volume
public float volume()Returns the value of thevolume
record component.- Returns:
- the value of the
volume
record component
-
pitch
public float pitch()Returns the value of thepitch
record component.- Returns:
- the value of the
pitch
record component
-
attenuationDistance
public int attenuationDistance()Returns the value of theattenuationDistance
record component.- Returns:
- the value of the
attenuationDistance
record component
-
position
public net.minecraft.world.phys.Vec3 position()Returns the value of theposition
record component.- Returns:
- the value of the
position
record component
-
direction
public net.minecraft.world.phys.Vec3 direction()Returns the value of thedirection
record component.- Returns:
- the value of the
direction
record component
-
velocity
public net.minecraft.world.phys.Vec3 velocity()Returns the value of thevelocity
record component.- Returns:
- the value of the
velocity
record component
-
doppler
public float doppler()Returns the value of thedoppler
record component.- Returns:
- the value of the
doppler
record component
-
coneAngleA
public float coneAngleA()Returns the value of theconeAngleA
record component.- Returns:
- the value of the
coneAngleA
record component
-
coneAngleB
public float coneAngleB()Returns the value of theconeAngleB
record component.- Returns:
- the value of the
coneAngleB
record component
-
coneOuterGain
public float coneOuterGain()Returns the value of theconeOuterGain
record component.- Returns:
- the value of the
coneOuterGain
record component
-
paused
public boolean paused()Returns the value of thepaused
record component.- Returns:
- the value of the
paused
record component
-
playbackPositionTicks
public int playbackPositionTicks()Returns the value of theplaybackPositionTicks
record component.- Returns:
- the value of the
playbackPositionTicks
record component
-