mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-22 13:09:42 +00:00
Step 1: File Standardization
This commit is contained in:
1 parent
69c287f828
commit
3f6fa103dc
1177 files changed
+2
-2
No files matched your search
@@ -0,0 +1,56 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the Botania Mod. Get the Source Code in github:
|
||||
* https://github.com/Vazkii/Botania
|
||||
*
|
||||
* Botania is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* File Created @ [Jul 2, 2014, 12:12:45 AM (GMT)]
|
||||
*/
|
||||
package vazkii.botania.client.fx;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.profiler.Profiler;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
public final class ParticleRenderDispatcher {
|
||||
|
||||
public static int wispFxCount = 0;
|
||||
public static int depthIgnoringWispFxCount = 0;
|
||||
public static int sparkleFxCount = 0;
|
||||
public static int fakeSparkleFxCount = 0;
|
||||
public static int lightningCount = 0;
|
||||
|
||||
// Called from LightningHandler.onRenderWorldLast since that was
|
||||
// already registered. /shrug
|
||||
public static void dispatch() {
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
|
||||
boolean isLightingEnabled = GL11.glGetBoolean(GL11.GL_LIGHTING);
|
||||
Profiler profiler = Minecraft.getMinecraft().mcProfiler;
|
||||
|
||||
GL11.glDepthMask(false);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE);
|
||||
GL11.glAlphaFunc(GL11.GL_GREATER, 0.003921569F);
|
||||
if(isLightingEnabled)
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
|
||||
profiler.startSection("sparkle");
|
||||
FXSparkle.dispatchQueuedRenders(tessellator);
|
||||
profiler.endStartSection("wisp");
|
||||
FXWisp.dispatchQueuedRenders(tessellator);
|
||||
profiler.endSection();
|
||||
|
||||
if(isLightingEnabled)
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glAlphaFunc(GL11.GL_GREATER, 0.1F);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glDepthMask(true);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user