Record Class CutscenePayload
java.lang.Object
java.lang.Record
net.ixdarklord.coolcatcanvas.internal.cutscene.CutscenePayload
- Record Components:
id- the cutscene to play (the name the client reports back when it ends), or empty to stopcutscene- the cutscene itself, when the client isn't expected to have it registeredorigin- where its positions are measured from, in place of its own anchoryaw- with an origin: the turn of its space around the vertical
- All Implemented Interfaces:
net.minecraft.network.protocol.common.custom.CustomPacketPayload
public record CutscenePayload(Optional<net.minecraft.resources.Identifier> id, Optional<Cutscene> cutscene, Optional<net.minecraft.world.phys.Vec3> origin, float yaw)
extends Record
implements net.minecraft.network.protocol.common.custom.CustomPacketPayload
The server telling a client to play a cutscene, or to stop the one playing.
-
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, CutscenePayload> static final net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<CutscenePayload> -
Constructor Summary
ConstructorsConstructorDescriptionCutscenePayload(Optional<net.minecraft.resources.Identifier> id, Optional<Cutscene> cutscene, Optional<net.minecraft.world.phys.Vec3> origin, float yaw) Creates an instance of aCutscenePayloadrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncutscene()Returns the value of thecutscenerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Optional<net.minecraft.resources.Identifier> id()Returns the value of theidrecord component.Optional<net.minecraft.world.phys.Vec3> origin()Returns the value of theoriginrecord component.static CutscenePayloadstop()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()floatyaw()Returns the value of theyawrecord component.
-
Field Details
-
TYPE
public static final net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<CutscenePayload> TYPE -
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, CutscenePayload> STREAM_CODEC
-
-
Constructor Details
-
CutscenePayload
-
-
Method Details
-
stop
-
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
-
cutscene
-
origin
-
yaw
-