Record Class GuidePayloads.ReadingAt
java.lang.Object
java.lang.Record
net.ixdarklord.folios.internal.GuidePayloads.ReadingAt
- All Implemented Interfaces:
net.minecraft.network.protocol.common.custom.CustomPacketPayload
- Enclosing class:
GuidePayloads
public static record GuidePayloads.ReadingAt(boolean open, net.minecraft.resources.Identifier book, String chapter, int page, boolean shut)
extends Record
implements net.minecraft.network.protocol.common.custom.CustomPacketPayload
A client saying which spread of the handheld book its player has open, or that none is (
open false);
shut while it is held up shut, about to be opened.-
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, GuidePayloads.ReadingAt> static final net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<GuidePayloads.ReadingAt> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.resources.Identifierbook()Returns the value of thebookrecord component.chapter()Returns the value of thechapterrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanopen()Returns the value of theopenrecord component.intpage()Returns the value of thepagerecord component.booleanshut()Returns the value of theshutrecord component.final StringtoString()Returns a string representation of this record class.net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<GuidePayloads.ReadingAt> type()
-
Field Details
-
TYPE
public static final net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<GuidePayloads.ReadingAt> TYPE -
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, GuidePayloads.ReadingAt> STREAM_CODEC
-
-
Constructor Details
-
ReadingAt
public ReadingAt(boolean open, net.minecraft.resources.Identifier book, String chapter, int page, boolean shut) Creates an instance of aReadingAtrecord class.- Parameters:
open- the value for theopenrecord componentbook- the value for thebookrecord componentchapter- the value for thechapterrecord componentpage- the value for thepagerecord componentshut- the value for theshutrecord component
-
-
Method Details
-
type
public net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<GuidePayloads.ReadingAt> 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. -
open
public boolean open()Returns the value of theopenrecord component.- Returns:
- the value of the
openrecord component
-
book
public net.minecraft.resources.Identifier book()Returns the value of thebookrecord component.- Returns:
- the value of the
bookrecord component
-
chapter
Returns the value of thechapterrecord component.- Returns:
- the value of the
chapterrecord component
-
page
public int page()Returns the value of thepagerecord component.- Returns:
- the value of the
pagerecord component
-
shut
public boolean shut()Returns the value of theshutrecord component.- Returns:
- the value of the
shutrecord component
-