Mirage - constellation-mc/dark-matter GitHub Wiki
This page covers the Mirage module of Dark Matter.
This module requires
minecraft
Mirage
Mirage is a class with two public fields: FAKE_WORLD and ALWAYS_BRIGHT_LTM.
getFakeWorld()
FAKE_WORLD is an empty instance of ClientWorld. Most arguments passed to the constructor are not null, they are just fake. It's only meant to be used for rendering.
The class is bootstrapped right after the client finishes loading.
An example from Glitter's VanillaParticle of FAKE_WORLD being used to create particles without a proper world.
public static <T extends ParticleEffect> Particle createScreenParticle(T parameters, double x, double y, double velocityX, double velocityY, double velocityZ) {
ParticleFactory<T> particleFactory = (ParticleFactory<T>) MinecraftClient.getInstance().particleManager.factories.get(Registry.PARTICLE_TYPE.getRawId(parameters.getType()));
return particleFactory == null ? null : particleFactory.createParticle(parameters, FakeWorld.getFakeWorld(), x/24, (MinecraftClient.getInstance().getWindow().getScaledHeight() - y) / 24, 0, velocityX, velocityY, velocityZ);
}
getAlwaysBrightLTM()
ALWAYS_BRIGHT_LTM is an instance of LightmapTextureManager with updates completely disabled.