Record Class CutsceneProgressPayload
java.lang.Object
java.lang.Record
net.ixdarklord.coolcatcanvas.internal.cutscene.CutsceneProgressPayload
- Record Components:
keyframe- the keyframe's index, or -1 when this is about a markermarker- the marker's id, when this is about one
- All Implemented Interfaces:
net.minecraft.network.protocol.common.custom.CustomPacketPayload
public record CutsceneProgressPayload(net.minecraft.resources.Identifier id, int keyframe, Optional<net.minecraft.resources.Identifier> marker)
extends Record
implements net.minecraft.network.protocol.common.custom.CustomPacketPayload
A client telling the server how far the cutscene it was asked to play has got: a keyframe reached, or a marker
passed.
-
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, CutsceneProgressPayload> static final net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<CutsceneProgressPayload> -
Constructor Summary
ConstructorsConstructorDescriptionCutsceneProgressPayload(net.minecraft.resources.Identifier id, int keyframe, Optional<net.minecraft.resources.Identifier> marker) Creates an instance of aCutsceneProgressPayloadrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.net.minecraft.resources.Identifierid()Returns the value of theidrecord component.intkeyframe()Returns the value of thekeyframerecord component.static CutsceneProgressPayloadkeyframe(net.minecraft.resources.Identifier id, int index) Optional<net.minecraft.resources.Identifier> marker()Returns the value of themarkerrecord component.static CutsceneProgressPayloadmarker(net.minecraft.resources.Identifier id, net.minecraft.resources.Identifier marker) final StringtoString()Returns a string representation of this record class.net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<? extends net.minecraft.network.protocol.common.custom.CustomPacketPayload> type()
-
Field Details
-
TYPE
public static final net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<CutsceneProgressPayload> TYPE -
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, CutsceneProgressPayload> STREAM_CODEC
-
-
Constructor Details
-
CutsceneProgressPayload
public CutsceneProgressPayload(net.minecraft.resources.Identifier id, int keyframe, Optional<net.minecraft.resources.Identifier> marker) Creates an instance of aCutsceneProgressPayloadrecord class.
-
-
Method Details
-
keyframe
-
marker
public static CutsceneProgressPayload marker(net.minecraft.resources.Identifier id, net.minecraft.resources.Identifier marker) -
type
public net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<? extends net.minecraft.network.protocol.common.custom.CustomPacketPayload> 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. -
id
public net.minecraft.resources.Identifier id()Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
keyframe
-
marker
-