feat: super crude and clearly original Chams impl
This commit is contained in:
parent
e102e85f9b
commit
589ccc715f
1 changed files with 32 additions and 0 deletions
32
src/main/java/ftbsc/bscv/modules/vision/Chams.java
Normal file
32
src/main/java/ftbsc/bscv/modules/vision/Chams.java
Normal file
|
@ -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();
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue