Record Class CameraShake.Shake
java.lang.Object
java.lang.Record
net.ixdarklord.coolcatcanvas.api.client.camera.CameraShake.Shake
- Record Components:
intensity- how far the camera turns, in degrees, over the shake's life (its start, middle and end)ticks- how long it lastsfrequency- how fast it rattles; 1 is a sharp impact, lower is a rumbleorigin- where it comes from, or null for one felt the same everywhereradius- with an origin: the distance at which nothing is felt any more
- Enclosing class:
CameraShake
public static record CameraShake.Shake(Curve intensity, int ticks, float frequency, @Nullable net.minecraft.world.phys.Vec3 origin, float radius)
extends Record
One shake.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.floatReturns the value of thefrequencyrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of theintensityrecord component.@Nullable 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.
-
Constructor Details
-
Shake
public Shake(Curve intensity, int ticks, float frequency, @Nullable @Nullable net.minecraft.world.phys.Vec3 origin, float radius) Creates an instance of aShakerecord class.
-
-
Method Details
-
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 '=='. -
intensity
Returns the value of theintensityrecord component.- Returns:
- the value of the
intensityrecord component
-
ticks
public int ticks()Returns the value of theticksrecord component.- Returns:
- the value of the
ticksrecord component
-
frequency
public float frequency()Returns the value of thefrequencyrecord component.- Returns:
- the value of the
frequencyrecord component
-
origin
@Nullable public @Nullable 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
-