
GiantNuker
Members-
Posts
139 -
Joined
GiantNuker's Achievements

Creeper Killer (4/8)
2
Reputation
-
GlStateManager.enableColorMaterial(); GlStateManager.pushMatrix(); GlStateManager.translate(glX, glY, 50.0F); GlStateManager.scale((float) (-scale * scaleM), (float) scale * scaleM, (float) scale * scaleM); GlStateManager.rotate(180.0F, 0.0F, 0.0F, 1.0F); GlStateManager.rotate(135.0F, 0.0F, 1.0F, 0.0F); GlStateManager.rotate(-100.0F, 0.0F, 1.0F, 0.0F); GlStateManager.rotate(0.0f, 1.0F, 0.0F, 0.0F); RenderHelper.enableStandardItemLighting(); GlStateManager.translate(0.0F, 0.0F, 0.0F); RenderManager rendermanager = Minecraft.getMinecraft().getRenderManager(); rendermanager.setPlayerViewY(180.0F); rendermanager.setRenderShadow(false); GlStateManager.pushMatrix(); GlStateManager.disableLighting(); OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 240f, 240f); GlStateManager.popMatrix(); rendermanager.renderEntity(entity, 0.0D, 0.0D, 0.0D, 0.0F, 1.0F, false); GlStateManager.pushMatrix(); GlStateManager.enableLighting(); OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 240f, 240f); GlStateManager.popMatrix(); rendermanager.setRenderShadow(true); GlStateManager.popMatrix(); RenderHelper.disableStandardItemLighting(); GlStateManager.disableRescaleNormal(); GlStateManager.setActiveTexture(OpenGlHelper.lightmapTexUnit); //GlStateManager.disableTexture2D(); GlStateManager.setActiveTexture(OpenGlHelper.defaultTexUnit); Do i still need the calls to OpenGlHelper?
-
Thank you. How do I rebind the previous texture though? Edit: this stops screen blacking, but still dosent render the transparency: GL11.glPushAttrib(GL11.GL_ALL_ATTRIB_BITS); rendermanager.renderEntity(entity, 0.0D, 0.0D, 0.0D, 0.0F, 1.0F, false); GL11.glPopAttrib(); Source: http://www.minecraftforge.net/forum/topic/32488-1710-rendering-semi-transparent-mobs/?do=findComment&comment=171749 Rendering issues with this method:
-
This seems like the best solution
-
[Solved]How do I properly use the Frustum class?
GiantNuker replied to GiantNuker's topic in Modder Support
I was using the frustum so it takes your FOV into account. Anyway it seems to be working now, not sure what i tweaked -
I am making a mod that warns you if mobs are coming up behind you, and to do that properly, I need to know how to correctly use the view Frustum. The code I currently have is extremely unhelpful in that it does absolutely nothing when you face away from the entity and intermittently turns on. There is a creeper direcly behind me in both screenshots: My Frustum checking code: The entire point of this mod was to stop creepers from sneaking up behind me when I'm battleing lots of mobs If you can help, Thanks!
-
I checked ToroHealth and Can't seem to find anything. The mod does render a skin into the background though. It uses: private void drawSkin() { if (ConfigurationHandler.skin.equals("NONE")) { return; } if (ConfigurationHandler.skin.equals("HEAVY")) { mc.getTextureManager().bindTexture(SKIN_HEAVY); }else{ mc.getTextureManager().bindTexture(SKIN_BASIC); } GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); Gui.drawModalRectWithCustomSizedTexture(screenX - 10, screenY - 10, 0.0f, 0.0f, 160, 60, 160, 60); } I am not very good with OpenGL, but I don't think this has anything. The render entity code is exactly the same, I had something else, but now I'm using the same renderer to try to get rid of this. Entity render code:
-
A mod I am working on tries to display mobs that are sneaking up behind you, by showing little versions on the sides of your screen. Here is how it's supposed to work: The display code shown was copied from ToroCraft's ToroHealth (Source On GitHub) ToroHealth seems to have no problem with this, but whenever the display shows a slime(Or any other partially transparent entity i'm guessing) this happens: Any idea why or how to fix it? Thanks. Render Code: Edit: Happens with wither skeletons too
-
I would, but the point is for it to work with other mods.