Record Class HasModPacket
java.lang.Object
java.lang.Record
me.andreasmelone.glowingeyes.neoforge.common.packets.HasModPacket
- All Implemented Interfaces:
net.minecraft.network.protocol.common.custom.CustomPacketPayload
public record HasModPacket()
extends Record
implements net.minecraft.network.protocol.common.custom.CustomPacketPayload
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.voidhandle(net.neoforged.neoforge.network.handling.PlayPayloadContext ctx) final inthashCode()Returns a hash code value for this object.net.minecraft.resources.ResourceLocationid()static HasModPacketread(net.minecraft.network.FriendlyByteBuf buf) final StringtoString()Returns a string representation of this record class.voidwrite(net.minecraft.network.FriendlyByteBuf buf)
-
Field Details
-
ID
public static final net.minecraft.resources.ResourceLocation ID
-
-
Constructor Details
-
HasModPacket
public HasModPacket()Creates an instance of aHasModPacketrecord class.
-
-
Method Details
-
read
-
write
public void write(net.minecraft.network.FriendlyByteBuf buf) - Specified by:
writein interfacenet.minecraft.network.protocol.common.custom.CustomPacketPayload
-
id
public net.minecraft.resources.ResourceLocation id()- Specified by:
idin interfacenet.minecraft.network.protocol.common.custom.CustomPacketPayload
-
handle
public void handle(net.neoforged.neoforge.network.handling.PlayPayloadContext ctx) -
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.
-