Record Class ShakePayload
java.lang.Object
java.lang.Record
net.ixdarklord.coolcatcanvas.internal.vfx.ShakePayload
- All Implemented Interfaces:
net.minecraft.network.protocol.common.custom.CustomPacketPayload
public record ShakePayload(net.minecraft.world.phys.Vec3 origin, float radius, float degrees, int ticks)
extends Record
implements net.minecraft.network.protocol.common.custom.CustomPacketPayload
The server shaking a client's camera. A radius of 0 means the shake has no place: it is felt in full.
-
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, ShakePayload> static final net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<ShakePayload> -
Constructor Summary
ConstructorsConstructorDescriptionShakePayload(net.minecraft.world.phys.Vec3 origin, float radius, float degrees, int ticks) Creates an instance of aShakePayloadrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfloatdegrees()Returns the value of thedegreesrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.net.minecraft.world.phys.Vec3origin()Returns the value of theoriginrecord component.floatradius()Returns the value of theradiusrecord component.intticks()Returns the value of theticksrecord 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()
-
Field Details
-
TYPE
public static final net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<ShakePayload> TYPE -
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, ShakePayload> STREAM_CODEC
-
-
Constructor Details
-
ShakePayload
public ShakePayload(net.minecraft.world.phys.Vec3 origin, float radius, float degrees, int ticks) Creates an instance of aShakePayloadrecord class.- Parameters:
origin- the value for theoriginrecord componentradius- the value for theradiusrecord componentdegrees- the value for thedegreesrecord componentticks- the value for theticksrecord component
-
-
Method Details
-
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. -
origin
public net.minecraft.world.phys.Vec3 origin()Returns the value of theoriginrecord component.- Returns:
- the value of the
originrecord component
-
radius
public float radius()Returns the value of theradiusrecord component.- Returns:
- the value of the
radiusrecord component
-
degrees
public float degrees()Returns the value of thedegreesrecord component.- Returns:
- the value of the
degreesrecord component
-
ticks
public int ticks()Returns the value of theticksrecord component.- Returns:
- the value of the
ticksrecord component
-