Record Class FoliosPayloads.SharedReading
java.lang.Object
java.lang.Record
net.ixdarklord.folios.internal.FoliosPayloads.SharedReading
- All Implemented Interfaces:
net.minecraft.network.protocol.common.custom.CustomPacketPayload
- Enclosing class:
FoliosPayloads
public static record FoliosPayloads.SharedReading(int reader, FoliosPayloads.ReadingAt at)
extends Record
implements net.minecraft.network.protocol.common.custom.CustomPacketPayload
The server telling a player which spread someone near them has open in their hands, to read along.
-
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>, net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<T>, net.minecraft.network.protocol.common.custom.CustomPacketPayload.TypeAndCodec<B,T> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, FoliosPayloads.SharedReading> static final net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<FoliosPayloads.SharedReading> -
Constructor Summary
ConstructorsConstructorDescriptionSharedReading(int reader, FoliosPayloads.ReadingAt at) Creates an instance of aSharedReadingrecord class. -
Method Summary
Modifier and TypeMethodDescriptionat()Returns the value of theatrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intreader()Returns the value of thereaderrecord component.final StringtoString()Returns a string representation of this record class.net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<FoliosPayloads.SharedReading> type()
-
Field Details
-
TYPE
public static final net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<FoliosPayloads.SharedReading> TYPE -
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, FoliosPayloads.SharedReading> STREAM_CODEC
-
-
Constructor Details
-
SharedReading
Creates an instance of aSharedReadingrecord class.- Parameters:
reader- the value for thereaderrecord componentat- the value for theatrecord component
-
-
Method Details
-
type
public net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<FoliosPayloads.SharedReading> type()- Specified by:
typein interfacenet.minecraft.network.protocol.common.custom.CustomPacketPayload
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
reader
public int reader()Returns the value of thereaderrecord component.- Returns:
- the value of the
readerrecord component
-
at
Returns the value of theatrecord component.- Returns:
- the value of the
atrecord component
-