Jump to content

Talonos

Members
  • Posts

    13
  • Joined

  • Last visited

Everything posted by Talonos

  1. Any word on this? I needed to do some custom rendering as well, and Reika's method described above (assuming it works) might be just the thing. If Reika, or anybody else, figured out how to solve the issue, I'd love to know.
  2. User error involving misnamed graphics. My mistake.
  3. I was hoping to have a double-res armor texture in my mod, but it doesn't seem to be working. I think instead it's using just the top-left corner. Based on some of the other source code I had looked through, I thought that if I loaded in a resource at a different resolution than standard, it would scale it appropriately. That doesn't seem to be the case for armor. (Perhaps that only works with icons?) Is there some way to scale the texture of the armor appropriately? Perhaps I'm missing an MCMeta file or something? Thanks.
  4. You misunderstand me. All items, when in the inventory, are rendered as icons, and I know how to overlay icons using renderpasses. But armor, when equipped, uses a texture, not an icon. I'm looking specifically at getArmorTexture(ItemStack stack, Entity entity, int slot, String type). The fact that the old getArmorTexture(ItemStack stack, Entity entity, int slot, int layer) was deprecated implies that using a string is more powerful than using an integer. Why? Can you use more than just null and "overlay"? If so, what order do they get drawn in? Or will I have to override getArmorModel (which I am loathe to do)
  5. I want the texture of a piece of armor to be the sum of several different textures. I know you can do something like this with Icons, by adjusting the number of render passes and using getIcon's renderpass sensitive overload. I found a good example of how to do it in Tinker's Construct open source toolCore.java. But how does one do it with armors? Is it possible? If so, can anybody point me to a good example that I can learn from? Thanks. PS: If this is a double-post, I apologize. The server timed out last time I tried to post it, and I'm not sure if it went through.
  6. Done. Bearded Octo Nemesis worked wonders, then I decompiled with JDGui and dumped it in the SRC directory in eclipse. It had lots of parsing errors (JDGui doesn't seem to know how to add diamond operators) but I didn't care; all I needed was the one altered class file, so I stubbed out any method throwing fits until I could get it to compile. Then, I compiled and reobfuscated it with MCP, then took the single class file I wanted altered from the deobfuscated folder and put it in the mod's jar folder, overwriting its class. It works beautifully. Seems like a long process for such a simple task. I wish there were some way to edit a single class file without having to go through the whole deobfuscate/reobfuscate process, but oh well. At least I know how to do it now. Thanks all around! (And I mean this mechanically. I'm going around hitting the thanks button.)
  7. Um... wow. Bearded Octo-nemesis. That's a deceptively off-topic title for such an on-topic utility. Thanks a ton. I'll look into that. First, though, back to Draco: (And yes, that was a huge DERP moment on my part.) I tried putting the mod into the JAR file, and the output was full of errors, so I tried putting both the mod and forge in the JAR file, and things were better. Still hundreds of errors, but much better. After that, I made the edits to the one source file I wish to modify, fixing any errors relating to missing methods by inserting method stubs into their appropriate classes. I can't compile it with MCP, because it complains about all the broken code, but after compiling it with Eclipse, I now have my one magic class file that does what I want it to. Problem is, it is still in deobfuscated form. I've tried to coax MCP into re-obfuscating just my one class file, but I cannot seem to get it to work. I'm only one step away from having my modded class file, now! You've been of wonderful help so far; do you have any advice on this last issue? Edit: This Bearded Octo Nemesis thing is great stuff. I'm going to try a fresh install of forge and run BOC on the mod and see what happens.
  8. Ahah! There it is! (That's what I get for doing a search for minecraft instead of 1.6.4) Giving this a try now...
  9. Again, I understand your point. Given that MCP is a way to decompile minecraft that provides a mapping between obfuscated and de-obfuscated names, it shouldn't matter whether the tutorial was specific for modloader or not. By "Forge uses MCP as its base," I mean that forge uses the MCP derived mappings instead of coming up their their own mappings of obfuscated to human-readable names. Anything I decompile with MCP will have the same mappings that Forge uses. And I understood your second question as well. By "Working with" 1.6.4, I mean that both the mod I wish to modify and my targeted minecraft release for the modified mod are both 1.6.4. I apologize for being ambiguous.
  10. Noted, but both Forge and Modloader use MCP as their base, correct? I was simply trying to use that page as a basis for "Decompiling using MCP with mods installed." I figured the difference between decompiling with Modloader installed and forge/my mod installed was negligible. Was I incorrect in that assumption? I'm working with 1.6.4.
  11. My apologies, but I have run into a roadblock, and I haven't been able to get past in the two hours I've worked on it. You might know offhand. I was expecting the MCP directory to have a minecraft client jar somewhere within it, but I couldn't find it. Instead, from what I've been able to tell, it just decompiles the minecraft jar from your .minecraft directory in %appdata%. Is this true? If so, it's an inconvenience. I've got 1.7 on my computer right now, but my mod (obviously) targets 1.6.4. I'd rather not mess with my vanilla install, but instead have the decompilation target a minecraft jar of my choosing. Is there any way to do it? Command line parameters, perhaps? (I looked in the decompile.py script, but my python-fu is too weak to derive the correct command line parameters myself) Thanks again.
  12. So, if I understand correctly, I would take the mod and move all it's class files into the appropriate folders in the mine-craft client jar file, then use the MCP to decompile and deobfuscate from there? Hmm... didn't realize I could do that. I'll give that a try and report back. If Anybody else has any additional insight, please let me know. Otherwise, I'll be back after I've tried it.
  13. Long story short: Can anybody tell me how to either recompile obfuscated code or deobfuscate decompiled code? Short short long: I would like to alter the world-gen in one of my favorite (closed source) mods to make it compatible with some other mods. After decompiling the code with JD-GUI, it seems that the code could easily be made compatible by inserting a single, simple if statement in a single class. The problem is that JD-GUI decompiles the code into an obfuscated form. I really don't care, because I can easily tell what the code is doing, but it means I can't just drop the decompiled mod into my eclipse source tree like I would with an open source mod I'd edit. I either need to find some way to compile obfuscated code, or I need to de-obfuscate the whole mod so I can recompile it normally using forge. Here is one idea, but before I spend the time to try it, I'd like to run it by the experts first: If I were to make a new project with nothing in it, put the obfuscated, decompiled class in (with my changes), generate stubs of all the obfuscated classes and methods referenced in the (single) class I'm editing, then compile the project, then drop the compiled class into the original mod's jar (replacing the original version) would everything "hook up" right? It seems like it might, but despite having programmed in java for years, the "guts" of the JVM are still kind of arcane to me. Thanks for the help.
×
×
  • Create New...

Important Information

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