From 3279b76fdf32f77e0b5ae9367f92e25872b52fd8 Mon Sep 17 00:00:00 2001 From: CR11MP <103106288+CR11MP@users.noreply.github.com> Date: Sat, 24 Sep 2022 18:37:55 +1200 Subject: [PATCH] kekw --- .../claudius/mod/modules/render/AcidMode.java | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 src/main/java/me/crimp/claudius/mod/modules/render/AcidMode.java diff --git a/src/main/java/me/crimp/claudius/mod/modules/render/AcidMode.java b/src/main/java/me/crimp/claudius/mod/modules/render/AcidMode.java new file mode 100644 index 0000000..b68c720 --- /dev/null +++ b/src/main/java/me/crimp/claudius/mod/modules/render/AcidMode.java @@ -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(); + } + +}