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 Type
    Method
    Description
    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.
    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 VfxDraw
    billboard(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) at a and (u1, v1) at c.
    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.
    trail(Trail trail, Curve width, int headArgb, int tailArgb)
    The ribbon a Trail leaves, turned to face the camera, from its newest point to its oldest.
  • Method Details

    • billboard

      VfxDraw billboard(double x, double y, double z, float halfSize, float roll, int argb)
      A square facing the camera.
      Parameters:
      halfSize - half its width, in blocks
      roll - its turn around the line of sight, in radians
    • billboard

      default VfxDraw billboard(net.minecraft.world.phys.Vec3 position, float halfSize, int argb)
    • 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 at from.
      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) at a and (u1, v1) at c. UVs may run past 0 to 1.
    • flat

      VfxDraw flat(double x, double y, double z, float halfSize, float yaw, int argb)
      A square lying flat, facing up: a circle on the ground.
      Parameters:
      halfSize - half its width, in blocks
      yaw - its turn around the vertical, in radians
    • trail

      VfxDraw trail(Trail trail, Curve width, int headArgb, int tailArgb)
      The ribbon a Trail leaves, 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 point
      headArgb - the colour at the newest point
      tailArgb - the colour at the oldest point