Skip to content

Commit

Permalink
kekw
Browse files Browse the repository at this point in the history
  • Loading branch information
Crimply committed Sep 24, 2022
1 parent 11fe1c1 commit 3279b76
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions src/main/java/me/crimp/claudius/mod/modules/render/AcidMode.java
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();
}

}

0 comments on commit 3279b76

Please sign in to comment.