Prep for moving to vanilla particle system

This commit is contained in:
Vincent Lee committed 2019-09-14 18:16:13 -05:00
1 parent 4cd4b220d3
commit f0993c20a4
60 files changed
+452 -353

No files matched your search

@@ -16,8 +16,14 @@ import com.mojang.blaze3d.platform.GlStateManager;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.profiler.IProfiler;
import net.minecraft.profiler.Profiler;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.client.event.ParticleFactoryRegisterEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod;
import org.lwjgl.opengl.GL11;
import vazkii.botania.common.lib.LibMisc;
@Mod.EventBusSubscriber(modid = LibMisc.MOD_ID, value = Dist.CLIENT, bus = Mod.EventBusSubscriber.Bus.MOD)
public final class ParticleRenderDispatcher {
public static int wispFxCount = 0;
@@ -26,6 +32,12 @@ public final class ParticleRenderDispatcher {
public static int fakeSparkleFxCount = 0;
public static int lightningCount = 0;
@SubscribeEvent
public static void registerFactories(ParticleFactoryRegisterEvent evt) {
Minecraft.getInstance().particles.registerFactory(ModParticles.WISP, WispParticleType.FACTORY);
Minecraft.getInstance().particles.registerFactory(ModParticles.SPARKLE, SparkleParticleType.FACTORY);
}
// Called from LightningHandler.onRenderWorldLast since that was
// already registered. /shrug
public static void dispatch() {