Package at.petrak.paucal.common.msg
Record Class MsgHeadpatSoundS2C
java.lang.Object
java.lang.Record
at.petrak.paucal.common.msg.MsgHeadpatSoundS2C
- All Implemented Interfaces:
PaucalMessage
public record MsgHeadpatSoundS2C(String soundName, boolean isGithub, double x, double y, double z, float pitch, @Nullable UUID patter)
extends Record
implements PaucalMessage
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMsgHeadpatSoundS2C(String soundName, boolean isGithub, double x, double y, double z, float pitch, @Nullable UUID patter) Creates an instance of aMsgHeadpatSoundS2Crecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic MsgHeadpatSoundS2Cdeserialize(net.minecraft.network.FriendlyByteBuf buf) final booleanIndicates whether some other object is "equal to" this one.net.minecraft.resources.ResourceLocationForge auto-assigns incrementing integers, Fabric requires us to declare an ID These are sent using vanilla's custom plugin channel system and thus are written to every single packet.static voidhandle(MsgHeadpatSoundS2C self) final inthashCode()Returns a hash code value for this object.booleanisGithub()Returns the value of theisGithubrecord component.@Nullable UUIDpatter()Returns the value of thepatterrecord component.floatpitch()Returns the value of thepitchrecord component.voidserialize(net.minecraft.network.FriendlyByteBuf buf) Returns the value of thesoundNamerecord component.final StringtoString()Returns a string representation of this record class.doublex()Returns the value of thexrecord component.doubley()Returns the value of theyrecord component.doublez()Returns the value of thezrecord component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface at.petrak.paucal.api.msg.PaucalMessage
toBuf
-
Field Details
-
ID
public static final net.minecraft.resources.ResourceLocation ID
-
-
Constructor Details
-
MsgHeadpatSoundS2C
public MsgHeadpatSoundS2C(String soundName, boolean isGithub, double x, double y, double z, float pitch, @Nullable @Nullable UUID patter) Creates an instance of aMsgHeadpatSoundS2Crecord class.- Parameters:
soundName- the value for thesoundNamerecord componentisGithub- the value for theisGithubrecord componentx- the value for thexrecord componenty- the value for theyrecord componentz- the value for thezrecord componentpitch- the value for thepitchrecord componentpatter- the value for thepatterrecord component
-
-
Method Details
-
getFabricId
public net.minecraft.resources.ResourceLocation getFabricId()Description copied from interface:PaucalMessageForge auto-assigns incrementing integers, Fabric requires us to declare an ID These are sent using vanilla's custom plugin channel system and thus are written to every single packet. So this ID tends to be more terse.- Specified by:
getFabricIdin interfacePaucalMessage
-
serialize
public void serialize(net.minecraft.network.FriendlyByteBuf buf) - Specified by:
serializein interfacePaucalMessage
-
deserialize
-
handle
-
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 '=='. -
soundName
Returns the value of thesoundNamerecord component.- Returns:
- the value of the
soundNamerecord component
-
isGithub
public boolean isGithub()Returns the value of theisGithubrecord component.- Returns:
- the value of the
isGithubrecord component
-
x
public double x()Returns the value of thexrecord component.- Returns:
- the value of the
xrecord component
-
y
public double y()Returns the value of theyrecord component.- Returns:
- the value of the
yrecord component
-
z
public double z()Returns the value of thezrecord component.- Returns:
- the value of the
zrecord component
-
pitch
public float pitch()Returns the value of thepitchrecord component.- Returns:
- the value of the
pitchrecord component
-
patter
Returns the value of thepatterrecord component.- Returns:
- the value of the
patterrecord component
-