GiantNuker
Members-
Posts
139 -
Joined
Everything posted by GiantNuker
-
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.
-
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:
-
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.
-
1.12.2)Creating a coremod to replace a vanilla class
GiantNuker replied to GiantNuker's topic in Modder Support
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? -
1.12.2)Creating a coremod to replace a vanilla class
GiantNuker replied to GiantNuker's topic in Modder Support
Thanks -
1.12.2)Creating a coremod to replace a vanilla class
GiantNuker replied to GiantNuker's topic in Modder Support
Is there any other way? -
I want to replace net.minecraft.util.ChatAllowedCharacters to make it possible (with checks) to enter the § symbol. How can i do this?
-
[1.12.2]Custom armor item not taking damage
GiantNuker replied to GiantNuker's topic in Modder Support
What is ItemSpeccialArmor? ItemBasicArmor extends ItemArmor. -
[1.12.2]Custom armor item not taking damage
GiantNuker replied to GiantNuker's topic in Modder Support
I do not know where that is. I ave been using attribute modifiers. -
[1.12.2]Custom armor item not taking damage
GiantNuker replied to GiantNuker's topic in Modder Support
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. -
[1.12.2]Custom armor item not taking damage
GiantNuker replied to GiantNuker's topic in Modder Support
INFO GATHERED: Even if it is predamaged, it still cannot take damage. Changing maxStackSize does nothing. returning true in isDamageable() does nothing.