Package net.ixdarklord.folios.internal
Record Class GuidePayloads.ReadingAt
java.lang.Object
java.lang.Record
net.ixdarklord.folios.internal.GuidePayloads.ReadingAt
- All Implemented Interfaces:
net.ixdarklord.coolcatcore.api.network.CustomPacketPayload
- Enclosing class:
- GuidePayloads
public static record GuidePayloads.ReadingAt(boolean open, net.minecraft.resources.ResourceLocation book, String chapter, int page, boolean shut)
extends Record
implements net.ixdarklord.coolcatcore.api.network.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.ixdarklord.coolcatcore.api.network.CustomPacketPayload
net.ixdarklord.coolcatcore.api.network.CustomPacketPayload.Type<T extends net.ixdarklord.coolcatcore.api.network.CustomPacketPayload>, net.ixdarklord.coolcatcore.api.network.CustomPacketPayload.TypeAndCodec<B extends io.netty.buffer.ByteBuf,T extends net.ixdarklord.coolcatcore.api.network.CustomPacketPayload> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.ixdarklord.coolcatcore.api.network.codec.StreamCodec<io.netty.buffer.ByteBuf,GuidePayloads.ReadingAt> static final net.ixdarklord.coolcatcore.api.network.CustomPacketPayload.Type<GuidePayloads.ReadingAt> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.resources.ResourceLocationbook()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.ixdarklord.coolcatcore.api.network.CustomPacketPayload.Type<GuidePayloads.ReadingAt>type()
-
Field Details
-
TYPE
public static final net.ixdarklord.coolcatcore.api.network.CustomPacketPayload.Type<GuidePayloads.ReadingAt> TYPE -
STREAM_CODEC
public static final net.ixdarklord.coolcatcore.api.network.codec.StreamCodec<io.netty.buffer.ByteBuf,GuidePayloads.ReadingAt> STREAM_CODEC
-
-
Constructor Details
-
ReadingAt
public ReadingAt(boolean open, net.minecraft.resources.ResourceLocation 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.ixdarklord.coolcatcore.api.network.CustomPacketPayload.Type<GuidePayloads.ReadingAt> type()- Specified by:
typein interfacenet.ixdarklord.coolcatcore.api.network.CustomPacketPayload
-
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 '=='. -
open
public boolean open()Returns the value of theopenrecord component.- Returns:
- the value of the
openrecord component
-
book
public net.minecraft.resources.ResourceLocation 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
-