diff options
-rw-r--r-- | src/main/java/ftbsc/bscv/modules/vision/Chams.java | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/main/java/ftbsc/bscv/modules/vision/Chams.java b/src/main/java/ftbsc/bscv/modules/vision/Chams.java new file mode 100644 index 0000000..81902f6 --- /dev/null +++ b/src/main/java/ftbsc/bscv/modules/vision/Chams.java @@ -0,0 +1,32 @@ +package ftbsc.bscv.modules.vision; + +import org.lwjgl.opengl.GL11; + +import com.google.auto.service.AutoService; +import com.mojang.blaze3d.platform.GlStateManager; + +import ftbsc.bscv.ICommons; +import ftbsc.bscv.api.ILoadable; +import ftbsc.bscv.modules.QuickModule; +import net.minecraftforge.client.event.RenderLivingEvent; +import net.minecraftforge.eventbus.api.SubscribeEvent; + +@AutoService(ILoadable.class) +public class Chams extends QuickModule implements ICommons { + + protected int getDefaultKey() { return UNBOUND; } + + @SubscribeEvent + public void onRenderLivingPre(RenderLivingEvent.Pre<?, ?> event) { + GL11.glEnable(GL11.GL_POLYGON_OFFSET_FILL); + GlStateManager._enablePolygonOffset(); + GlStateManager._polygonOffset(1.f, -1000000); + } + + @SubscribeEvent + public void onRenderLivingPre(RenderLivingEvent.Post<?, ?> event) { + GL11.glDisable(GL11.GL_POLYGON_OFFSET_FILL); + GlStateManager._polygonOffset(1.0F, 1000000); + GlStateManager._disablePolygonOffset(); + } +} |