Record Class VfxParams
java.lang.Object
java.lang.Record
net.ixdarklord.coolcatcanvas.api.vfx.VfxParams
- Record Components:
position- where it happenstarget- a second point: where a beam ends, or the direction a burst flies (as a point offset fromposition); equal topositionwhen unusedcolor- its colour, as0xRRGGBBscale- its size or strength, 1 being the effect's normal one
public record VfxParams(net.minecraft.world.phys.Vec3 position, net.minecraft.world.phys.Vec3 target, int color, float scale)
extends Record
What the server tells a client about one playing of a world effect. What each field means is up to the effect; the
usual reading is given here.
-
Constructor Summary
ConstructorsConstructorDescriptionVfxParams(net.minecraft.world.phys.Vec3 position, net.minecraft.world.phys.Vec3 target, int color, float scale) Creates an instance of aVfxParamsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic VfxParamsat(net.minecraft.world.phys.Vec3 position) static VfxParamsat(net.minecraft.world.phys.Vec3 position, int color) static VfxParamsbetween(net.minecraft.world.phys.Vec3 from, net.minecraft.world.phys.Vec3 to, int color) intcolor()Returns the value of thecolorrecord component.net.minecraft.world.phys.Vec3Frompositiontowardstarget; zero when they are the same point.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.Vec3position()Returns the value of thepositionrecord component.floatscale()Returns the value of thescalerecord component.net.minecraft.world.phys.Vec3target()Returns the value of thetargetrecord component.final StringtoString()Returns a string representation of this record class.withColor(int color) withScale(float scale)
-
Constructor Details
-
VfxParams
public VfxParams(net.minecraft.world.phys.Vec3 position, net.minecraft.world.phys.Vec3 target, int color, float scale) Creates an instance of aVfxParamsrecord class.
-
-
Method Details
-
at
-
at
-
between
public static VfxParams between(net.minecraft.world.phys.Vec3 from, net.minecraft.world.phys.Vec3 to, int color) -
withScale
-
withColor
-
direction
public net.minecraft.world.phys.Vec3 direction()Frompositiontowardstarget; zero when they are the same point. -
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 '=='. -
position
public net.minecraft.world.phys.Vec3 position()Returns the value of thepositionrecord component.- Returns:
- the value of the
positionrecord component
-
target
public net.minecraft.world.phys.Vec3 target()Returns the value of thetargetrecord component.- Returns:
- the value of the
targetrecord component
-
color
public int color()Returns the value of thecolorrecord component.- Returns:
- the value of the
colorrecord component
-
scale
public float scale()Returns the value of thescalerecord component.- Returns:
- the value of the
scalerecord component
-