Class WorldVfx

java.lang.Object
net.ixdarklord.coolcatcanvas.api.client.vfx.WorldVfx

public final class WorldVfx extends Object
World effects: glowing shapes drawn in the world, after everything else in it and before the player's hand. They are lit by nothing, blend over or add to the scene (VfxBlend), hide behind solid things and fade softly where they meet them (VfxMaterial.softness()).

Three ways in:

Effects started by the server go through VfxEffects.
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    beam(VfxMaterial material, net.minecraft.world.phys.Vec3 from, net.minecraft.world.phys.Vec3 to, float width, int argb, int ticks)
    A beam that appears at once and fades away over some ticks, narrowing as it goes.
    static void
    flash(VfxMaterial material, net.minecraft.world.phys.Vec3 position, Curve size, int argb, int ticks)
    A camera-facing shape that swells and fades over some ticks: a flash, or with VfxMaterial.RING a shockwave.
    static void
    groundFlash(VfxMaterial material, net.minecraft.world.phys.Vec3 position, Curve size, int argb, int ticks)
    Like flash(VfxMaterial, Vec3, Curve, int, int), lying flat on the ground instead of facing the camera.
    static void
    register(net.minecraft.resources.Identifier id, VfxRenderer renderer)
    Calls a renderer every frame a world is drawn, until it's unregistered.
    static void
    unregister(net.minecraft.resources.Identifier id)
     

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • register

      public static void register(net.minecraft.resources.Identifier id, VfxRenderer renderer)
      Calls a renderer every frame a world is drawn, until it's unregistered. Registering an id again replaces it.
    • unregister

      public static void unregister(net.minecraft.resources.Identifier id)
    • beam

      public static void beam(VfxMaterial material, net.minecraft.world.phys.Vec3 from, net.minecraft.world.phys.Vec3 to, float width, int argb, int ticks)
      A beam that appears at once and fades away over some ticks, narrowing as it goes.
      Parameters:
      width - its full width at the start, in blocks
    • flash

      public static void flash(VfxMaterial material, net.minecraft.world.phys.Vec3 position, Curve size, int argb, int ticks)
      A camera-facing shape that swells and fades over some ticks: a flash, or with VfxMaterial.RING a shockwave.
      Parameters:
      size - half its width over its life, in blocks
    • groundFlash

      public static void groundFlash(VfxMaterial material, net.minecraft.world.phys.Vec3 position, Curve size, int argb, int ticks)
      Like flash(VfxMaterial, Vec3, Curve, int, int), lying flat on the ground instead of facing the camera.