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(net.minecraft.resources.ResourceLocation, net.ixdarklord.coolcatcanvas.api.client.vfx.VfxRenderer): aVfxRenderercalled every frame, to draw beams, trails and shapes that follow something.beam(net.ixdarklord.coolcatcanvas.api.client.vfx.VfxMaterial, net.minecraft.world.phys.Vec3, net.minecraft.world.phys.Vec3, float, int, int)andflash(net.ixdarklord.coolcatcanvas.api.client.vfx.VfxMaterial, net.minecraft.world.phys.Vec3, net.ixdarklord.coolcatcanvas.api.client.vfx.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(net.ixdarklord.coolcatcanvas.api.client.vfx.VfxMaterial, net.minecraft.world.phys.Vec3, net.ixdarklord.coolcatcanvas.api.client.vfx.Curve, int, int), lying flat on the ground instead of facing the camera.static voidregister(net.minecraft.resources.ResourceLocation id, VfxRenderer renderer) Calls a renderer every frame a world is drawn, until it's unregistered.static voidunregister(net.minecraft.resources.ResourceLocation 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.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 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(net.ixdarklord.coolcatcanvas.api.client.vfx.VfxMaterial, net.minecraft.world.phys.Vec3, net.ixdarklord.coolcatcanvas.api.client.vfx.Curve, int, int), lying flat on the ground instead of facing the camera.
-