MCPcopy Create free account
hub / github.com/GregTech6/gregtech6 / receiveRenderEvent

Method receiveRenderEvent

src/main/java/gregtech/GT_Client.java:130–151  ·  view source on GitHub ↗
(RenderBlockOverlayEvent aEvent)

Source from the content-addressed store, hash-verified

128 private ResourceLocation WATER_OVERLAY = new ResourceLocation("textures/misc/underwater.png");
129
130 @SubscribeEvent
131 public void receiveRenderEvent(RenderBlockOverlayEvent aEvent) {
132 if (aEvent.blockForOverlay == BlocksGT.Swamp) {
133 EntityPlayer aPlayer = GT_API.api_proxy.getThePlayer();
134 Minecraft.getMinecraft().getTextureManager().bindTexture(WATER_OVERLAY);
135 Tessellator tessellator = Tessellator.instance;
136 GL11.glColor4f(0, aPlayer.getBrightness(aEvent.renderPartialTicks)/2, 0, 0.75F);
137 GL11.glEnable(GL11.GL_BLEND);
138 OpenGlHelper.glBlendFunc(770, 771, 1, 0);
139 GL11.glPushMatrix();
140 tessellator.startDrawingQuads();
141 tessellator.addVertexWithUV(-1, -1, -0.5F, 4-aPlayer.rotationYaw/64, 4+aPlayer.rotationPitch/64);
142 tessellator.addVertexWithUV( 1, -1, -0.5F, -aPlayer.rotationYaw/64, 4+aPlayer.rotationPitch/64);
143 tessellator.addVertexWithUV( 1, 1, -0.5F, -aPlayer.rotationYaw/64, aPlayer.rotationPitch/64);
144 tessellator.addVertexWithUV(-1, 1, -0.5F, 4-aPlayer.rotationYaw/64, aPlayer.rotationPitch/64);
145 tessellator.draw();
146 GL11.glPopMatrix();
147 GL11.glColor4f(1, 1, 1, 1);
148 GL11.glDisable(GL11.GL_BLEND);
149 aEvent.setCanceled(T);
150 }
151 }
152
153 @SubscribeEvent
154 public void receiveRenderEvent(RenderPlayerEvent.Pre aEvent) {

Callers

nothing calls this directly

Calls 1

getThePlayerMethod · 0.45

Tested by

no test coverage detected