Interface VfxDraw
public interface VfxDraw
Draws shapes of one
VfxMaterial into the world for the current frame, from a VfxRenderer. Positions
are world coordinates; colours are 0xAARRGGBB. Nothing here lasts: draw again every frame.-
Method Summary
Modifier and TypeMethodDescriptionbeam(net.minecraft.world.phys.Vec3 from, net.minecraft.world.phys.Vec3 to, float width, int argb) A ribbon from one point to another, turned to face the camera: a beam, a bolt, a tether.beam(net.minecraft.world.phys.Vec3 from, net.minecraft.world.phys.Vec3 to, float width, int fromArgb, int toArgb) A beam whose colour changes along it.billboard(double x, double y, double z, float halfSize, float roll, int argb) A square facing the camera.default VfxDrawbillboard(net.minecraft.world.phys.Vec3 position, float halfSize, int argb) flat(double x, double y, double z, float halfSize, float yaw, int argb) A square lying flat, facing up: a circle on the ground.quad(net.minecraft.world.phys.Vec3 a, net.minecraft.world.phys.Vec3 b, net.minecraft.world.phys.Vec3 c, net.minecraft.world.phys.Vec3 d, float u0, float v0, float u1, float v1, int argb) A flat quad with UVs of the caller's choosing, for materials with a shader: the shader sees(u0, v0)ataand(u1, v1)atc.quad(net.minecraft.world.phys.Vec3 a, net.minecraft.world.phys.Vec3 b, net.minecraft.world.phys.Vec3 c, net.minecraft.world.phys.Vec3 d, int argb) A flat quad through four corners, seen from both sides: a rune on the ground, a wall of light.The ribbon aTrailleaves, turned to face the camera, from its newest point to its oldest.
-
Method Details
-
billboard
A square facing the camera.- Parameters:
halfSize- half its width, in blocksroll- its turn around the line of sight, in radians
-
billboard
-
beam
VfxDraw beam(net.minecraft.world.phys.Vec3 from, net.minecraft.world.phys.Vec3 to, float width, int argb) A ribbon from one point to another, turned to face the camera: a beam, a bolt, a tether. The texture runs along it, its left edge atfrom.- Parameters:
width- the ribbon's full width, in blocks
-
beam
VfxDraw beam(net.minecraft.world.phys.Vec3 from, net.minecraft.world.phys.Vec3 to, float width, int fromArgb, int toArgb) A beam whose colour changes along it. -
quad
VfxDraw quad(net.minecraft.world.phys.Vec3 a, net.minecraft.world.phys.Vec3 b, net.minecraft.world.phys.Vec3 c, net.minecraft.world.phys.Vec3 d, int argb) A flat quad through four corners, seen from both sides: a rune on the ground, a wall of light. The texture's corners go to the points in the order top-left, bottom-left, bottom-right, top-right. -
quad
VfxDraw quad(net.minecraft.world.phys.Vec3 a, net.minecraft.world.phys.Vec3 b, net.minecraft.world.phys.Vec3 c, net.minecraft.world.phys.Vec3 d, float u0, float v0, float u1, float v1, int argb) A flat quad with UVs of the caller's choosing, for materials with a shader: the shader sees(u0, v0)ataand(u1, v1)atc. UVs may run past 0 to 1. -
flat
A square lying flat, facing up: a circle on the ground.- Parameters:
halfSize- half its width, in blocksyaw- its turn around the vertical, in radians
-
trail
The ribbon aTrailleaves, turned to face the camera, from its newest point to its oldest.- Parameters:
width- the ribbon's full width in blocks along its length: the curve's start is at the newest pointheadArgb- the colour at the newest pointtailArgb- the colour at the oldest point
-