Record Class StartCutscenePacket
java.lang.Object
java.lang.Record
net.thewinnt.cutscenes.networking.packets.StartCutscenePacket
- All Implemented Interfaces:
net.minecraft.network.protocol.common.custom.CustomPacketPayload,AbstractPacket
public record StartCutscenePacket(net.minecraft.resources.ResourceLocation cutscene, net.minecraft.world.phys.Vec3 startPos, float cameraYaw, float cameraPitch, float cameraRoll, float pathYaw, float pathPitch, float pathRoll)
extends Record
implements AbstractPacket
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.thewinnt.cutscenes.platform.AbstractPacket
AbstractPacket.PacketReader<T extends AbstractPacket>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
Fields -
Constructor Summary
ConstructorsConstructorDescriptionStartCutscenePacket(net.minecraft.resources.ResourceLocation cutscene, net.minecraft.world.phys.Vec3 startPos, float cameraYaw, float cameraPitch, float cameraRoll, float pathYaw, float pathPitch, float pathRoll) Creates an instance of aStartCutscenePacketrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfloatReturns the value of thecameraPitchrecord component.floatReturns the value of thecameraRollrecord component.floatReturns the value of thecameraYawrecord component.net.minecraft.resources.ResourceLocationcutscene()Returns the value of thecutscenerecord component.final booleanIndicates whether some other object is "equal to" this one.voidexecute()final inthashCode()Returns a hash code value for this object.floatReturns the value of thepathPitchrecord component.floatpathRoll()Returns the value of thepathRollrecord component.floatpathYaw()Returns the value of thepathYawrecord component.static StartCutscenePacketread(net.minecraft.network.FriendlyByteBuf buf) net.minecraft.world.phys.Vec3startPos()Returns the value of thestartPosrecord component.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()voidwrite(net.minecraft.network.FriendlyByteBuf buf)
-
Field Details
-
ID
- See Also:
-
-
Constructor Details
-
StartCutscenePacket
public StartCutscenePacket(net.minecraft.resources.ResourceLocation cutscene, net.minecraft.world.phys.Vec3 startPos, float cameraYaw, float cameraPitch, float cameraRoll, float pathYaw, float pathPitch, float pathRoll) Creates an instance of aStartCutscenePacketrecord class.- Parameters:
cutscene- the value for thecutscenerecord componentstartPos- the value for thestartPosrecord componentcameraYaw- the value for thecameraYawrecord componentcameraPitch- the value for thecameraPitchrecord componentcameraRoll- the value for thecameraRollrecord componentpathYaw- the value for thepathYawrecord componentpathPitch- the value for thepathPitchrecord componentpathRoll- the value for thepathRollrecord component
-
-
Method Details
-
read
-
write
public void write(net.minecraft.network.FriendlyByteBuf buf) - Specified by:
writein interfaceAbstractPacket
-
execute
public void execute()- Specified by:
executein interfaceAbstractPacket
-
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
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 '=='. -
cutscene
public net.minecraft.resources.ResourceLocation cutscene()Returns the value of thecutscenerecord component.- Returns:
- the value of the
cutscenerecord component
-
startPos
public net.minecraft.world.phys.Vec3 startPos()Returns the value of thestartPosrecord component.- Returns:
- the value of the
startPosrecord component
-
cameraYaw
public float cameraYaw()Returns the value of thecameraYawrecord component.- Returns:
- the value of the
cameraYawrecord component
-
cameraPitch
public float cameraPitch()Returns the value of thecameraPitchrecord component.- Returns:
- the value of the
cameraPitchrecord component
-
cameraRoll
public float cameraRoll()Returns the value of thecameraRollrecord component.- Returns:
- the value of the
cameraRollrecord component
-
pathYaw
public float pathYaw()Returns the value of thepathYawrecord component.- Returns:
- the value of the
pathYawrecord component
-
pathPitch
public float pathPitch()Returns the value of thepathPitchrecord component.- Returns:
- the value of the
pathPitchrecord component
-
pathRoll
public float pathRoll()Returns the value of thepathRollrecord component.- Returns:
- the value of the
pathRollrecord component
-