(RenderBlockOverlayEvent aEvent)
| 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) { |
nothing calls this directly
no test coverage detected