Class VfxEffects
java.lang.Object
net.ixdarklord.coolcatcanvas.api.client.vfx.VfxEffects
World effects by name, so the server can start them with
VfxControl.play. Register from a
ClientModConstructor:
VfxEffects.register(MyMod.id("impact"), (level, params) -> {
WorldParticles.burst(EMBER, params.position(), Math.round(20 * params.scale()), 0.1, 0.15);
WorldVfx.flash(VfxMaterial.additive(VfxMaterial.GLOW), params.position(), Curve.of(0.2F, 1.2F), 0xFF000000 | params.color(), 6);
});
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanPlays a registered effect on this client alone.static voidRegisters an effect under an id; registering it again replaces it.static voidunregister(net.minecraft.resources.ResourceLocation id)
-
Method Details
-
register
Registers an effect under an id; registering it again replaces it. -
unregister
public static void unregister(net.minecraft.resources.ResourceLocation id) -
play
Plays a registered effect on this client alone. Returns false if nothing is registered under the id.
-