Jump to content

GiantNuker

Members
  • Posts

    139
  • Joined

Everything posted by GiantNuker

  1. 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?
  2. I am sorry, but I just found out the root cause of my problem. I used RenderGameOverlay.Pre instead of Post. With a little bit of tweaking, now it works If you would like to use it: Highlighter[1.0-1.12.2].jar - Download Highlighter[1.0-1.12.2]-source.jar - Sources Thank you @Draco18s @Cadiboo
  3. 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:
  4. How would i turn transparency on and off? Also, i think there might be a difference between whatever version had "doRenderEntity" and 1.12.2 "renderEntity" I'm retty sure ToroCraft just hasnt updated the github repositiory. That is the only difference I can see codewise so far.
  5. I was using the frustum so it takes your FOV into account. Anyway it seems to be working now, not sure what i tweaked
  6. 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!
  7. 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:
  8. I would like to render a rear view perspective in the corner of the screen when a mob is stalking you, so you can see it. Does anyone know how to duplicate the renderer?
  9. 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
  10. I would, but the point is for it to work with other mods.
  11. And how would I do this? I would have to catalog values for each entity, and the whole point is to be compatible with other mods. Is there any way I could catalog these values inside the mod? Mabe I could get the readings from The body part render code? Model: Renderer:
  12. I am trying to build off of iChun's Mob Dismemberment mod, so it can include any mob, and I am running into a few problems. First off, I need to know how big a model box is when rendered, because of sizing problems. For instance, Ghasts models are enlarged a ton and I end up with this when i kill them. The same thing happens to bats, but in reverse: Once i know this, I can resize each body part correctly. I also need to know the size so I can fi the bounding box. Currently, it does this: If its possible to do, please tell me how. It might not be though, which is why iChun disallowed child mobs in the first place. Thanks. I have access to each piece's ModelRenderer, if that helps.
  13. Darn. "Illegal Charaters in chat" I typed "&3hi" Which becomes "§3hi" package mods.giantnuker; import java.util.List; import com.google.common.collect.Lists; import net.minecraftforge.client.event.ClientChatEvent; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.Mod.EventHandler; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; @Mod(modid = ColorChatMod.MODID, version = ColorChatMod.VERSION) public class ColorChatMod { public static final String MODID = "colorchat"; public static final String VERSION = "1.0"; @EventHandler public void init(FMLInitializationEvent event) { MinecraftForge.EVENT_BUS.register(this); } public static final char sect_sign = '§', sect_replace = '&'; public static final List<Character> codes = Lists.newArrayList(new Character[] {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f', 'k', 'l', 'm', 'n', 'o', 'r'}); @SubscribeEvent public void colorChat(ClientChatEvent e) { //if (!e.getMessage().contains(String.valueOf(sect_replace))) return; String msg = e.getMessage(); char[] array = msg.toCharArray(); for (int i = 0; i < array.length; i++) { if (array[i] == sect_replace && i < (array.length - 1) && codes.contains(array[i + 1])) { array[i] = sect_sign; } } e.setMessage(String.valueOf(array)); } } Is there any way around this without resorting to modding the server?
  14. I want to replace net.minecraft.util.ChatAllowedCharacters to make it possible (with checks) to enter the § symbol. How can i do this?
  15. What is ItemSpeccialArmor? ItemBasicArmor extends ItemArmor.
  16. I do not know where that is. I ave been using attribute modifiers.
  17. NEW INFO: I put it on a zombie, and it got damaged! Now any idea? EDIT: one time occurance, the armor was already damaged... Sorry.
  18. INFO GATHERED: Even if it is predamaged, it still cannot take damage. Changing maxStackSize does nothing. returning true in isDamageable() does nothing.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.