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.Identifier 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>, 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.Progress> static final net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<GuidePayloads.Progress> -
Constructor Summary
ConstructorsConstructorDescriptionProgress(net.minecraft.resources.Identifier book, int hand, GuideRecord record) Creates an instance of aProgressrecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.resources.Identifierbook()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
-
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. -
book
public net.minecraft.resources.Identifier 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
-