Class WorldVfx
java.lang.Object
net.ixdarklord.coolcatcanvas.api.client.vfx.WorldVfx
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:
WorldParticles: particles that live on their own once spawned.register(Identifier, VfxRenderer): aVfxRenderercalled every frame, to draw beams, trails and shapes that follow something.beam(VfxMaterial, Vec3, Vec3, float, int, int)andflash(VfxMaterial, Vec3, Curve, int, int): one-line effects that draw themselves and fade.
VfxEffects.-
Method Summary
Modifier and TypeMethodDescriptionstatic voidbeam(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 voidflash(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 withVfxMaterial.RINGa shockwave.static voidgroundFlash(VfxMaterial material, net.minecraft.world.phys.Vec3 position, Curve size, int argb, int ticks) Likeflash(VfxMaterial, Vec3, Curve, int, int), lying flat on the ground instead of facing the camera.static voidregister(net.minecraft.resources.Identifier id, VfxRenderer renderer) Calls a renderer every frame a world is drawn, until it's unregistered.static voidunregister(net.minecraft.resources.Identifier id)
-
Method Details
-
register
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 withVfxMaterial.RINGa 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) Likeflash(VfxMaterial, Vec3, Curve, int, int), lying flat on the ground instead of facing the camera.
-