-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
45 additions
and
0 deletions.
There are no files selected for viewing
45 changes: 45 additions & 0 deletions
45
src/main/java/me/crimp/claudius/mod/modules/render/AcidMode.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
package me.crimp.claudius.mod.modules.render; | ||
|
||
import me.crimp.claudius.mod.modules.Module; | ||
import net.minecraft.client.Minecraft; | ||
import net.minecraft.client.renderer.OpenGlHelper; | ||
import net.minecraft.util.ResourceLocation; | ||
import net.minecraftforge.client.event.RenderGameOverlayEvent; | ||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; | ||
|
||
public class AcidMode extends Module { | ||
|
||
public AcidMode() { | ||
super("Pill In ibiza", "", Category.MISC , true ,false, false); | ||
} | ||
|
||
public static boolean firstRun = true; | ||
|
||
@SubscribeEvent | ||
public void onRenderGameOverlay(RenderGameOverlayEvent event) { | ||
|
||
if (Minecraft.getMinecraft().world == null || Minecraft.getMinecraft().player == null || Minecraft.getMinecraft().player.getUniqueID() == null) | ||
return; | ||
|
||
if (OpenGlHelper.shadersSupported) { | ||
if (Minecraft.getMinecraft().currentScreen != null) { | ||
firstRun = true; | ||
} | ||
if (Minecraft.getMinecraft().currentScreen == null && firstRun) { | ||
Minecraft.getMinecraft().entityRenderer.loadShader(new ResourceLocation("shaders/post/wobble.json")); | ||
firstRun = false; | ||
} | ||
} | ||
} | ||
|
||
@Override | ||
public void onDisable() { | ||
if (mc.player == null || mc.world == null) return; | ||
if (Minecraft.getMinecraft().entityRenderer.getShaderGroup() != null) { | ||
Minecraft.getMinecraft().entityRenderer.getShaderGroup().deleteShaderGroup(); | ||
} | ||
firstRun = true; | ||
super.onDisable(); | ||
} | ||
|
||
} |