Jump to content

Taji34

Forge Modder
  • Posts

    147
  • Joined

  • Last visited

Everything posted by Taji34

  1. I was just wondering if anyone adds anything to the .gitignore when using Intellij IDEA. I've already added the .idea folder, but are there any other things that are safe to add to the .gitignore?
  2. Thank you! This did not come up in my google search!
  3. I want to build a mod using an external library. I was wondering if there is a way to have it packaged inside my mod upon building it, or do I have to distribute the library as a separate jar with my mod? For ease of distribution, if there was a way to have it packaged into the same jar as my mod, I would want to do that. Thank you!
  4. Can you? I don't use the vanilla launcher, so I had no idea.
  5. The stuff I need to add to is in minecraft.java, which I'm assuming is off limits as far as changes go, and yes, I do want more. I want to be able to play "Fullscreen" and be able to alt-tab away, or go to a second monitor and not have minecraft freak out. Well it's actually relatively simple. Just add System.setProperty("org.lwjgl.opengl.Window.undecorated","true"); and change the window to not be re-sizable (the re-sizable part is mainly just for windows, as from research it seems the first part does the trick on Mac and Linux, while windows leaves a border since it is still re-sizable). The default resolution Default Window Size (See explaination at bottom) is the solution to the making the window not re-sizable. I would also, in this mode, need to center the minecraft window to the center of the screen, rather than the upper right corner. Then of course I would add menu options or a config file to change all of these things. I would not be removing anything from the file or modifying existing code, just adding two or three lines to the minecraft.java file, and the rest would be through forge. Is this not advisable? If not, thank you for the help. EDIT: Explaination: I realized that Defaut Resolution was not the best wording. I would not be changing how minecraft rendered anything, what I meant to get across was a default window size, so that you could specify how big you wanted the window to be, since it would not be re-sizable. This is so I can make the window fill my screen if I want, or I can make it a 800x500 window on my screen if I want. Hopefully that makes sense.
  6. I am creating a mod that would give users more functionality with how the minecraft window is handled (Borderless Window, Default resolution, etc.) which would require me to change some base minecraft code, could someone point me toward a tutorial on how to do this with forge?
  7. Any one? I can think of a work around using events, but I'd like to use the interface given to me. I found that if I either use 0 (nothing blocked) or 1 (everything blocked), it works and I can even use conditionals to switch between the two Absorb Ratios. The second I seem to use decimal numbers or more than one conditional check, it just defaults to leather mode. I don't think it's a sync issue with the server and client NBT data because it's printing out the correct mode from the server. Any ideas on anything it could be? Even if my code looks fine?
  8. So I'm creating a custom set of armor using ISpecialArmor. I've made it so that it should change what the AbsorbRatio is based on an NBT tag, However it's not working. Here's one of the classes: EnerginiumArmorHelmet.java That's just one piece of the armor, but they all follow the same method of calculating the AbsorbRatio. The problem is that the armor only blocks the amount of damage that it should when in leather mode, even if it's been changed to diamond mode. What makes me even more confused is that the println I have before it returns the ArmorProperties prints out the correct ratio for the mode, it just doesn't seem to use it. Any ideas?
  9. I'm having some issues tracking down where my code is going wrong and I would like to change the value of DEBUG in ArmorProperties to true to try and track it down. It says right in the code that it was left in so that modders could use it, but I can't change it. Anyone know how?
  10. I forgot to tell it that it should use my renderer for first person rendering. And I don't think it's rendering multiple times. I'll take a look at that, but I've decided to not do the transparency, it doesn't look right at the moment and I have more important parts of my mod to work on. Thanks for all your help though!
  11. So, it wasn't working in first person because of something I forgot, but it is staying opaque in the inventory, which it shouldn't be, here is way your debugger prints out: GL_VERTEX_ARRAY:false[20:57:00] [Client thread/INFO] [sTDOUT]: [com.taji34.troncraft.OpenGLdebugging:dumpAllIsEnabled:294]: (Vertex array enable) GL_NORMAL_ARRAY:false[20:57:00] [Client thread/INFO] [sTDOUT]: [com.taji34.troncraft.OpenGLdebugging:dumpAllIsEnabled:294]: (Normal array enable) GL_COLOR_ARRAY:false[20:57:00] [Client thread/INFO] [sTDOUT]: [com.taji34.troncraft.OpenGLdebugging:dumpAllIsEnabled:294]: (RGBA color array enable) GL_INDEX_ARRAY:false[20:57:00] [Client thread/INFO] [sTDOUT]: [com.taji34.troncraft.OpenGLdebugging:dumpAllIsEnabled:294]: (Color-index array enable) GL_TEXTURE_COORD_ARRAY:false[20:57:00] [Client thread/INFO] [sTDOUT]: [com.taji34.troncraft.OpenGLdebugging:dumpAllIsEnabled:294]: (Texture coordinate array enable) GL_EDGE_FLAG_ARRAY:false[20:57:00] [Client thread/INFO] [sTDOUT]: [com.taji34.troncraft.OpenGLdebugging:dumpAllIsEnabled:294]: (Edge flag array enable) GL_NORMALIZE:false[20:57:00] [Client thread/INFO] [sTDOUT]: [com.taji34.troncraft.OpenGLdebugging:dumpAllIsEnabled:294]: (Current normal normalization on/off) GL_FOG:false[20:57:00] [Client thread/INFO] [sTDOUT]: [com.taji34.troncraft.OpenGLdebugging:dumpAllIsEnabled:294]: (True if fog enabled) GL_LIGHTING:false[20:57:00] [Client thread/INFO] [sTDOUT]: [com.taji34.troncraft.OpenGLdebugging:dumpAllIsEnabled:294]: (True if lighting is enabled) GL_COLOR_MATERIAL:true[20:57:00] [Client thread/INFO] [sTDOUT]: [com.taji34.troncraft.OpenGLdebugging:dumpAllIsEnabled:294]: (True if color tracking is enabled) GL_LIGHT0:true[20:57:00] [Client thread/INFO] [sTDOUT]: [com.taji34.troncraft.OpenGLdebugging:dumpAllIsEnabled:294]: (True if light 0 enabled) GL_LIGHT1:true[20:57:00] [Client thread/INFO] [sTDOUT]: [com.taji34.troncraft.OpenGLdebugging:dumpAllIsEnabled:294]: (True if light 1 enabled) GL_LIGHT2:false[20:57:00] [Client thread/INFO] [sTDOUT]: [com.taji34.troncraft.OpenGLdebugging:dumpAllIsEnabled:294]: (True if light 2 enabled) GL_LIGHT3:false[20:57:00] [Client thread/INFO] [sTDOUT]: [com.taji34.troncraft.OpenGLdebugging:dumpAllIsEnabled:294]: (True if light 3 enabled) GL_LIGHT4:false[20:57:00] [Client thread/INFO] [sTDOUT]: [com.taji34.troncraft.OpenGLdebugging:dumpAllIsEnabled:294]: (True if light 4 enabled) GL_LIGHT5:false[20:57:00] [Client thread/INFO] [sTDOUT]: [com.taji34.troncraft.OpenGLdebugging:dumpAllIsEnabled:294]: (True if light 5 enabled) GL_LIGHT6:false[20:57:00] [Client thread/INFO] [sTDOUT]: [com.taji34.troncraft.OpenGLdebugging:dumpAllIsEnabled:294]: (True if light 6 enabled) GL_LIGHT7:false[20:57:00] [Client thread/INFO] [sTDOUT]: [com.taji34.troncraft.OpenGLdebugging:dumpAllIsEnabled:294]: (True if light 7 enabled) GL_POINT_SMOOTH:false[20:57:00] [Client thread/INFO] [sTDOUT]: [com.taji34.troncraft.OpenGLdebugging:dumpAllIsEnabled:294]: (Point antialiasing on) GL_LINE_SMOOTH:false[20:57:00] [Client thread/INFO] [sTDOUT]: [com.taji34.troncraft.OpenGLdebugging:dumpAllIsEnabled:294]: (Line antialiasing on) GL_LINE_STIPPLE:false[20:57:00] [Client thread/INFO] [sTDOUT]: [com.taji34.troncraft.OpenGLdebugging:dumpAllIsEnabled:294]: (Line stipple enable) GL_CULL_FACE:true[20:57:00] [Client thread/INFO] [sTDOUT]: [com.taji34.troncraft.OpenGLdebugging:dumpAllIsEnabled:294]: (Polygon culling enabled) GL_POLYGON_SMOOTH:false[20:57:00] [Client thread/INFO] [sTDOUT]: [com.taji34.troncraft.OpenGLdebugging:dumpAllIsEnabled:294]: (Polygon antialiasing on) GL_POLYGON_OFFSET_POINT:false[20:57:00] [Client thread/INFO] [sTDOUT]: [com.taji34.troncraft.OpenGLdebugging:dumpAllIsEnabled:294]: (Polygon offset enable for GL_POINT mode rasterization) GL_POLYGON_OFFSET_LINE:false[20:57:00] [Client thread/INFO] [sTDOUT]: [com.taji34.troncraft.OpenGLdebugging:dumpAllIsEnabled:294]: (Polygon offset enable for GL_LINE mode rasterization) GL_POLYGON_OFFSET_FILL:false[20:57:00] [Client thread/INFO] [sTDOUT]: [com.taji34.troncraft.OpenGLdebugging:dumpAllIsEnabled:294]: (Polygon offset enable for GL_FILL mode rasterization) GL_POLYGON_STIPPLE:false[20:57:00] [Client thread/INFO] [sTDOUT]: [com.taji34.troncraft.OpenGLdebugging:dumpAllIsEnabled:294]: (Polygon stipple enable) GL_TEXTURE_1D:false[20:57:00] [Client thread/INFO] [sTDOUT]: [com.taji34.troncraft.OpenGLdebugging:dumpAllIsEnabled:294]: (True if 1-D texturing enabled ) GL_TEXTURE_2D:true[20:57:00] [Client thread/INFO] [sTDOUT]: [com.taji34.troncraft.OpenGLdebugging:dumpAllIsEnabled:294]: (True if 2-D texturing enabled ) GL_TEXTURE_GEN_S:false[20:57:00] [Client thread/INFO] [sTDOUT]: [com.taji34.troncraft.OpenGLdebugging:dumpAllIsEnabled:294]: (Texgen enabled (x is S, T, R, or Q)) GL_TEXTURE_GEN_T:false[20:57:00] [Client thread/INFO] [sTDOUT]: [com.taji34.troncraft.OpenGLdebugging:dumpAllIsEnabled:294]: (Texgen enabled (x is S, T, R, or Q)) GL_TEXTURE_GEN_R:false[20:57:00] [Client thread/INFO] [sTDOUT]: [com.taji34.troncraft.OpenGLdebugging:dumpAllIsEnabled:294]: (Texgen enabled (x is S, T, R, or Q)) GL_TEXTURE_GEN_Q:false[20:57:00] [Client thread/INFO] [sTDOUT]: [com.taji34.troncraft.OpenGLdebugging:dumpAllIsEnabled:294]: (Texgen enabled (x is S, T, R, or Q)) GL_SCISSOR_TEST:false[20:57:00] [Client thread/INFO] [sTDOUT]: [com.taji34.troncraft.OpenGLdebugging:dumpAllIsEnabled:294]: (Scissoring enabled) GL_ALPHA_TEST:true[20:57:00] [Client thread/INFO] [sTDOUT]: [com.taji34.troncraft.OpenGLdebugging:dumpAllIsEnabled:294]: (Alpha test enabled) GL_STENCIL_TEST:false[20:57:00] [Client thread/INFO] [sTDOUT]: [com.taji34.troncraft.OpenGLdebugging:dumpAllIsEnabled:294]: (Stenciling enabled) GL_DEPTH_TEST:true[20:57:00] [Client thread/INFO] [sTDOUT]: [com.taji34.troncraft.OpenGLdebugging:dumpAllIsEnabled:294]: (Depth buffer enabled) GL_BLEND:true[20:57:00] [Client thread/INFO] [sTDOUT]: [com.taji34.troncraft.OpenGLdebugging:dumpAllIsEnabled:294]: (Blending enabled) GL_DITHER:true[20:57:00] [Client thread/INFO] [sTDOUT]: [com.taji34.troncraft.OpenGLdebugging:dumpAllIsEnabled:294]: (Dithering enabled) GL_INDEX_LOGIC_OP:false[20:57:00] [Client thread/INFO] [sTDOUT]: [com.taji34.troncraft.OpenGLdebugging:dumpAllIsEnabled:294]: (Color index logical operation enabled) GL_COLOR_LOGIC_OP:false[20:57:00] [Client thread/INFO] [sTDOUT]: [com.taji34.troncraft.OpenGLdebugging:dumpAllIsEnabled:294]: (RGBA color logical operation enabled) GL_AUTO_NORMAL:false[20:57:00] [Client thread/INFO] [sTDOUT]: [com.taji34.troncraft.OpenGLdebugging:dumpAllIsEnabled:294]: (True if automatic normal generation enabled) It stays opaque even with a texture that has an alpha channel of .5, any ideas?
  12. Didn't work, everything stayed opaque. What could be going wrong?
  13. Well, I'm trying multiple renderPasses, here's my full code for rendering one side of the item: tess.setNormal(0, 0, 1); for (int i = 0; i < iconParts; ++i) { tess.startDrawingQuads(); if (i == 0) { tess.setColorOpaque_I(color[i]); } else { GL11.glEnable(GL11.GL_BLEND); GL11.glDepthMask(false); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); if (item.stackTagCompound != null) { double usesLeft = item.stackTagCompound.getInteger("Uses Left"); double totalUses = item.stackTagCompound.getInteger("Total Uses"); double percentageLeft = usesLeft/totalUses; int alphaLevel = (int) Math.round(255*percentageLeft); tess.setColorRGBA_I(color[i], alphaLevel); } } tess.addVertexWithUV(0, 0, 0, xMax[i], yMax[i]); tess.addVertexWithUV(1, 0, 0, xMin[i], yMax[i]); tess.addVertexWithUV(1, 1, 0, xMin[i], yMin[i]); tess.addVertexWithUV(0, 1, 0, xMax[i], yMin[i]); tess.draw(); } I don't think it's getting set back to opaque.....
  14. I'm trying to have an Item where part of it renders with transparency, but it continues to render opaque no matter what. This is the snippet of code I'm using to set the color: if (i == 0) { tess.setColorOpaque_I(color[i]); } else { GL11.glEnable(GL11.GL_BLEND); GL11.glDepthMask(false); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); if (item.stackTagCompound != null) { double usesLeft = item.stackTagCompound.getInteger("Uses Left"); double totalUses = item.stackTagCompound.getInteger("Total Uses"); double percentageLeft = usesLeft/totalUses; int alphaLevel = (int) Math.round(255*percentageLeft); tess.setColorRGBA_I(color[i], alphaLevel); } } Am I missing some OpenGL flags or is something not in the right order?
  15. I figured it out. So, for getArmorTexture() to get called, the armor must extend ItemArmor, not just Item. I was using Item because I didn't want to use an armor material, but in the end I just made a dummy material for the armor and now it's displaying!
  16. Hey, I'm making custom armor for my mod and I can't get my armor to render on the player. Here is my code: EnerginiumArmorHelmet.java: energinium_layer_1.png is in src/main/resources/assets/troncraft/textures/armor Any ideas?
  17. Thanks, That all makes sense, I'll make sure I keep an eye out for stuff like that. Wow, why did I never think of that...anyway thanks for the tip! Stuff already exploded so I've got fixing to do. Thank you guys for all the help, I really appreciate being able to talk to more experienced modders to help me understand forge more.
  18. Alright, so now I'm a bit more confused...is there any easy way to tell what needs to go in each proxy without testing and seeing if a dedicated server doesn't like my code?
  19. Alright, I guess I'll learn exactly what things need to go in each proxy as I go.
  20. Alright, so just so I understand correctly, I should only be registering things with sound and visuals on the client?
  21. Alright, so what types of things need to be run on the client but not a dedicated server? Is there anything that needs to be run only on a dedicated server and not the client? Sorry, I'm still fairly new to this stuff.
  22. So I understand why we make the proxies, to differentiate between an integrated server and dedicated server, but in what cases would I want to do something different based on that fact? I guess my mod is too basic to need them, but I'd like to know when to use them in the future. Thanks!
  23. So I have an entity which has a saved itemstack as a value. I want to save it between world unload and load event but it doesn't seem to be working. Currently this is what my writeEntityToNBT and readEntityFromNBT are: writeEntityToNBT: public void writeEntityToNBT(NBTTagCompound tag){ super.writeEntityToNBT(tag); System.out.println("Written to NBT"); drop.writeToNBT(tag); System.out.println(tag); } readEntityFromNBT: public void readEntityFromNBT(NBTTagCompound tag){ super.readEntityFromNBT(tag); System.out.println("Read from NBT"); } when the write method is called, everything works. However when the read method seems to never be called once i add the "drop.writetoNBT(tag)" line to the write method. I noticed the console prints [16:02:08] [server thread/WARN]: Skipping Entity with id 4097s which is the id of the itemstack that was saved in the write method. Any ideas why this happens?
×
×
  • Create New...

Important Information

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