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 Details

    • register

      public static void register(net.minecraft.resources.ResourceLocation 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.ResourceLocation 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)