Record Class SoundFilterPayload
java.lang.Object
java.lang.Record
net.ixdarklord.coolcatcanvas.internal.sound.SoundFilterPayload
- All Implemented Interfaces:
net.minecraft.network.protocol.common.custom.CustomPacketPayload
public record SoundFilterPayload(net.minecraft.resources.ResourceLocation id, boolean clear, float gain, float gainHF, float distortion, float reverb, int fadeTicks)
extends Record
implements net.minecraft.network.protocol.common.custom.CustomPacketPayload
The server setting a named sound filter on a client (gain, highs, distortion, reverb), or clearing it (
clear,
the filter's parts then unused), over fadeTicks.-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.network.protocol.common.custom.CustomPacketPayload
net.minecraft.network.protocol.common.custom.CustomPacketPayload.FallbackProvider<B extends net.minecraft.network.FriendlyByteBuf>, net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<T extends net.minecraft.network.protocol.common.custom.CustomPacketPayload>, net.minecraft.network.protocol.common.custom.CustomPacketPayload.TypeAndCodec<B extends net.minecraft.network.FriendlyByteBuf,T extends net.minecraft.network.protocol.common.custom.CustomPacketPayload> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, SoundFilterPayload> static final net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<SoundFilterPayload> -
Constructor Summary
ConstructorsConstructorDescriptionSoundFilterPayload(net.minecraft.resources.ResourceLocation id, boolean clear, float gain, float gainHF, float distortion, float reverb, int fadeTicks) Creates an instance of aSoundFilterPayloadrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanclear()Returns the value of theclearrecord component.floatReturns the value of thedistortionrecord component.final booleanIndicates whether some other object is "equal to" this one.intReturns the value of thefadeTicksrecord component.floatgain()Returns the value of thegainrecord component.floatgainHF()Returns the value of thegainHFrecord component.final inthashCode()Returns a hash code value for this object.net.minecraft.resources.ResourceLocationid()Returns the value of theidrecord component.floatreverb()Returns the value of thereverbrecord component.final StringtoString()Returns a string representation of this record class.net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<? extends net.minecraft.network.protocol.common.custom.CustomPacketPayload> type()
-
Field Details
-
TYPE
public static final net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<SoundFilterPayload> TYPE -
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf,SoundFilterPayload> STREAM_CODEC
-
-
Constructor Details
-
SoundFilterPayload
public SoundFilterPayload(net.minecraft.resources.ResourceLocation id, boolean clear, float gain, float gainHF, float distortion, float reverb, int fadeTicks) Creates an instance of aSoundFilterPayloadrecord class.- Parameters:
id- the value for theidrecord componentclear- the value for theclearrecord componentgain- the value for thegainrecord componentgainHF- the value for thegainHFrecord componentdistortion- the value for thedistortionrecord componentreverb- the value for thereverbrecord componentfadeTicks- the value for thefadeTicksrecord component
-
-
Method Details
-
type
public net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<? extends net.minecraft.network.protocol.common.custom.CustomPacketPayload> type()- Specified by:
typein interfacenet.minecraft.network.protocol.common.custom.CustomPacketPayload
-
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 '=='. -
id
public net.minecraft.resources.ResourceLocation id()Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
clear
public boolean clear()Returns the value of theclearrecord component.- Returns:
- the value of the
clearrecord component
-
gain
public float gain()Returns the value of thegainrecord component.- Returns:
- the value of the
gainrecord component
-
gainHF
public float gainHF()Returns the value of thegainHFrecord component.- Returns:
- the value of the
gainHFrecord component
-
distortion
public float distortion()Returns the value of thedistortionrecord component.- Returns:
- the value of the
distortionrecord component
-
reverb
public float reverb()Returns the value of thereverbrecord component.- Returns:
- the value of the
reverbrecord component
-
fadeTicks
public int fadeTicks()Returns the value of thefadeTicksrecord component.- Returns:
- the value of the
fadeTicksrecord component
-