Record Class SetSoundDataPayload

java.lang.Object
java.lang.Record
com.mrbysco.soundmimicry.networking.SetSoundDataPayload
All Implemented Interfaces:
net.minecraft.network.protocol.common.custom.CustomPacketPayload

public record SetSoundDataPayload(net.minecraft.core.BlockPos pos, net.minecraft.resources.ResourceLocation dimension, String soundLocation, String soundSource, String offset, String volume, String pitch, String minVolume) extends Record implements net.minecraft.network.protocol.common.custom.CustomPacketPayload
  • 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

    Fields
    Modifier and Type
    Field
    Description
    static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.FriendlyByteBuf,SetSoundDataPayload>
     
    static final net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<SetSoundDataPayload>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    SetSoundDataPayload(net.minecraft.core.BlockPos pos, net.minecraft.resources.ResourceLocation dimension, String soundLocation, String soundSource, String offset, String volume, String pitch, String minVolume)
    Creates an instance of a SetSoundDataPayload record class.
    SetSoundDataPayload(net.minecraft.network.FriendlyByteBuf packetBuffer)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    net.minecraft.resources.ResourceLocation
    Returns the value of the dimension record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    Returns the value of the minVolume record component.
    Returns the value of the offset record component.
    Returns the value of the pitch record component.
    net.minecraft.core.BlockPos
    pos()
    Returns the value of the pos record component.
    Returns the value of the soundLocation record component.
    Returns the value of the soundSource record component.
    final String
    Returns a string representation of this record class.
    net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<? extends net.minecraft.network.protocol.common.custom.CustomPacketPayload>
     
    Returns the value of the volume record component.
    void
    write(net.minecraft.network.FriendlyByteBuf buf)
     

    Methods inherited from class java.lang.Object

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

    • CODEC

      public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.FriendlyByteBuf,SetSoundDataPayload> CODEC
    • ID

      public static final net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<SetSoundDataPayload> ID
  • Constructor Details

    • SetSoundDataPayload

      public SetSoundDataPayload(net.minecraft.network.FriendlyByteBuf packetBuffer)
    • SetSoundDataPayload

      public SetSoundDataPayload(net.minecraft.core.BlockPos pos, net.minecraft.resources.ResourceLocation dimension, String soundLocation, String soundSource, String offset, String volume, String pitch, String minVolume)
      Creates an instance of a SetSoundDataPayload record class.
      Parameters:
      pos - the value for the pos record component
      dimension - the value for the dimension record component
      soundLocation - the value for the soundLocation record component
      soundSource - the value for the soundSource record component
      offset - the value for the offset record component
      volume - the value for the volume record component
      pitch - the value for the pitch record component
      minVolume - the value for the minVolume record component
  • Method Details

    • write

      public void write(net.minecraft.network.FriendlyByteBuf buf)
    • type

      public net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<? extends net.minecraft.network.protocol.common.custom.CustomPacketPayload> type()
      Specified by:
      type in interface net.minecraft.network.protocol.common.custom.CustomPacketPayload
    • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • pos

      public net.minecraft.core.BlockPos pos()
      Returns the value of the pos record component.
      Returns:
      the value of the pos record component
    • dimension

      public net.minecraft.resources.ResourceLocation dimension()
      Returns the value of the dimension record component.
      Returns:
      the value of the dimension record component
    • soundLocation

      public String soundLocation()
      Returns the value of the soundLocation record component.
      Returns:
      the value of the soundLocation record component
    • soundSource

      public String soundSource()
      Returns the value of the soundSource record component.
      Returns:
      the value of the soundSource record component
    • offset

      public String offset()
      Returns the value of the offset record component.
      Returns:
      the value of the offset record component
    • volume

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

      public String pitch()
      Returns the value of the pitch record component.
      Returns:
      the value of the pitch record component
    • minVolume

      public String minVolume()
      Returns the value of the minVolume record component.
      Returns:
      the value of the minVolume record component