Record Class CutscenePacket
java.lang.Object
java.lang.Record
de.luckymcdev.foundryengine.common.network.packets.editor.CutscenePacket
- All Implemented Interfaces:
AbstractPacket<CutscenePacket>, net.minecraft.network.protocol.common.custom.CustomPacketPayload
public record CutscenePacket(net.minecraft.nbt.CompoundTag nbt)
extends Record
implements AbstractPacket<CutscenePacket>
-
Nested Class Summary
Nested classes/interfaces inherited from interface AbstractPacket
AbstractPacket.Definition<T>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
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCutscenePacket(net.minecraft.nbt.CompoundTag nbt) Creates an instance of aCutscenePacketrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic CutscenePacketstatic CutscenePacketcancelAction(String targetPlayer) final booleanIndicates whether some other object is "equal to" this one.net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, CutscenePacket> getCodec()net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<CutscenePacket> getType()voidhandleClient(net.neoforged.neoforge.network.handling.IPayloadContext ctx) voidhandleServer(net.neoforged.neoforge.network.handling.IPayloadContext ctx) final inthashCode()Returns a hash code value for this object.net.minecraft.nbt.CompoundTagnbt()Returns the value of thenbtrecord component.static CutscenePacketplayAction(String targetPlayer, String name, int length, String lerpType, int holdStart, int holdEnd) static CutscenePacketremoveAction(String name) static CutscenePacketfinal StringtoString()Returns a string representation of this record class.Methods inherited from interface AbstractPacket
typeMethods inherited from interface net.minecraft.network.protocol.common.custom.CustomPacketPayload
toVanillaClientbound, toVanillaServerbound
-
Field Details
-
DEFINITION
-
-
Constructor Details
-
CutscenePacket
public CutscenePacket(net.minecraft.nbt.CompoundTag nbt) Creates an instance of aCutscenePacketrecord class.- Parameters:
nbt- the value for thenbtrecord component
-
-
Method Details
-
addAction
-
removeAction
-
playAction
public static CutscenePacket playAction(String targetPlayer, String name, int length, String lerpType, int holdStart, int holdEnd) -
cancelAction
-
requestSync
-
getType
public net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<CutscenePacket> getType()- Specified by:
getTypein interfaceAbstractPacket<CutscenePacket>
-
getBoundTo
- Specified by:
getBoundToin interfaceAbstractPacket<CutscenePacket>
-
getCodec
public net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, CutscenePacket> getCodec()- Specified by:
getCodecin interfaceAbstractPacket<CutscenePacket>
-
handleClient
public void handleClient(net.neoforged.neoforge.network.handling.IPayloadContext ctx) - Specified by:
handleClientin interfaceAbstractPacket<CutscenePacket>
-
handleServer
public void handleServer(net.neoforged.neoforge.network.handling.IPayloadContext ctx) - Specified by:
handleServerin interfaceAbstractPacket<CutscenePacket>
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
nbt
public net.minecraft.nbt.CompoundTag nbt()Returns the value of thenbtrecord component.- Returns:
- the value of the
nbtrecord component
-