Record Class ScreenshakeInstance.ScreenshakePositionData
java.lang.Object
java.lang.Record
team.lodestar.lodestone.modules.toolkit.screenshake.ScreenshakeInstance.ScreenshakePositionData
- Enclosing class:
ScreenshakeInstance
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<ScreenshakeInstance.ScreenshakePositionData> static net.minecraft.network.codec.StreamCodec<io.netty.buffer.ByteBuf, ScreenshakeInstance.ScreenshakePositionData> -
Constructor Summary
ConstructorsConstructorDescriptionScreenshakePositionData(net.minecraft.world.phys.Vec3 center, float falloffDistance, Easing falloffCurve) Creates an instance of aScreenshakePositionDatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.phys.Vec3center()Returns the value of thecenterrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thefalloffCurverecord component.floatReturns the value of thefalloffDistancerecord component.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
CODEC
public static final com.mojang.serialization.Codec<ScreenshakeInstance.ScreenshakePositionData> CODEC -
STREAM_CODEC
public static net.minecraft.network.codec.StreamCodec<io.netty.buffer.ByteBuf,ScreenshakeInstance.ScreenshakePositionData> STREAM_CODEC
-
-
Constructor Details
-
ScreenshakePositionData
public ScreenshakePositionData(net.minecraft.world.phys.Vec3 center, float falloffDistance, Easing falloffCurve) Creates an instance of aScreenshakePositionDatarecord class.- Parameters:
center- the value for thecenterrecord componentfalloffDistance- the value for thefalloffDistancerecord componentfalloffCurve- the value for thefalloffCurverecord component
-
-
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 '=='. -
center
public net.minecraft.world.phys.Vec3 center()Returns the value of thecenterrecord component.- Returns:
- the value of the
centerrecord component
-
falloffDistance
public float falloffDistance()Returns the value of thefalloffDistancerecord component.- Returns:
- the value of the
falloffDistancerecord component
-
falloffCurve
Returns the value of thefalloffCurverecord component.- Returns:
- the value of the
falloffCurverecord component
-