Package net.ixdarklord.folios.internal
Record Class GuidePayloads.Progress
java.lang.Object
java.lang.Record
net.ixdarklord.folios.internal.GuidePayloads.Progress
- All Implemented Interfaces:
net.minecraft.network.protocol.common.custom.CustomPacketPayload
- Enclosing class:
GuidePayloads
public static record GuidePayloads.Progress(net.minecraft.resources.ResourceLocation book, int hand, GuideRecord record)
extends Record
implements net.minecraft.network.protocol.common.custom.CustomPacketPayload
A client sending what its player has done with a book, to be kept: with the player (
hand -1), or on the
book in that hand, for a book that keeps its own.-
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 extends net.minecraft.network.FriendlyByteBuf>, net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<T extends net.minecraft.network.protocol.common.custom.CustomPacketPayload>, net.minecraft.network.protocol.common.custom.CustomPacketPayload.TypeAndCodec<B extends net.minecraft.network.FriendlyByteBuf,T extends net.minecraft.network.protocol.common.custom.CustomPacketPayload> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, GuidePayloads.Progress> static final net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<GuidePayloads.Progress> -
Constructor Summary
ConstructorsConstructorDescriptionProgress(net.minecraft.resources.ResourceLocation book, int hand, GuideRecord record) Creates an instance of aProgressrecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.resources.ResourceLocationbook()Returns the value of thebookrecord component.final booleanIndicates whether some other object is "equal to" this one.inthand()Returns the value of thehandrecord component.final inthashCode()Returns a hash code value for this object.record()Returns the value of therecordrecord component.final StringtoString()Returns a string representation of this record class.net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<GuidePayloads.Progress> type()
-
Field Details
-
TYPE
public static final net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<GuidePayloads.Progress> TYPE -
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf,GuidePayloads.Progress> STREAM_CODEC
-
-
Constructor Details
-
Progress
Creates an instance of aProgressrecord class.- Parameters:
book- the value for thebookrecord componenthand- the value for thehandrecord componentrecord- the value for therecordrecord component
-
-
Method Details
-
type
public net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<GuidePayloads.Progress> type()- Specified by:
typein interfacenet.minecraft.network.protocol.common.custom.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 '=='. -
book
public net.minecraft.resources.ResourceLocation book()Returns the value of thebookrecord component.- Returns:
- the value of the
bookrecord component
-
hand
public int hand()Returns the value of thehandrecord component.- Returns:
- the value of the
handrecord component
-
record
Returns the value of therecordrecord component.- Returns:
- the value of the
recordrecord component
-