Skip to content
melontini edited this page Mar 29, 2024 · 5 revisions

This page covers the Glitter module of Dark Matter.

This module requires minecraft and mirage*

Glitter allows you to draw particles on screen, including vanilla.

Inspired by the removed gesundheit module of Lib39

ScreenParticleHelper

ScreenParticleHelper is the main way to interact with this API.

Example usage from Andromeda:

Slot slot1 = this.handler.slots.get(index);
ScreenParticleHelper.addScreenParticle(new CustomItemStackParticle(this.x + slot1.x + 8, this.y + slot1.y + 8,
       MathStuff.nextDouble(Utilities.RANDOM, -0.5, 0.5), 0.6, slot1.getStack()));

VanillaParticle

You are required to bundle Mirage if you want to use this class!

The class shouldn't be interacted with directly, as methods in ScreenParticleHelper which accept ParticleEffect allow you to create instances.

Example usage of VanillaParticle from Andromeda:

Slot slot = this.handler.slots.get(0);
ScreenParticleHelper.addScreenParticles(ParticleTypes.END_ROD, this.x + slot.x + 8, this.y + slot.y + 8, 0.5, 0.5, 0.07, 10);
Clone this wiki locally