My for some reason my model messes up when I use "defend" with a sword. Here's a picture: http://pbrd.co/1zHQT7V
I don't know why it's doing that. All my code is below.
-----------------------------------------------
Hello, I'm confused to why my armor model doesn't look the way it's supposed to look - I don't see why things are changing from the editor (Techne) to the game.
There's a picture in the attachments, look at the differences side by side - what's happening and how do I fix this?
I know the code doesn't help much but I'm mostly asking for common mistakes to look out for, any tips? Do you see the problem right away?
Thanks for the help guys.
Differences in attachments: - The "rods" are sticking in the wrong directions - The "rods" are sunk deeper into the armor model than they're supposed to be (so like look shorter)
*sigh* I've been trying to figure this out for so long :/
Could someone please take a look? I really don't understand what's wrong, I've checked all the angles - scales. I don't know what to do... I looked at the addBox method ModelRenderer object and there's a version what allows for the input of the scale factor. I tired that but then all the rods look bloated - abnormally larger than the rest of the model.
Please help?
Edit: Also, my arm texture messes up when I "defend" with a sword, how do I fix that? How do I get the arm model to rotate with the biped model arm when I "defend" (RMB with a sword)?
The wrong factor is Techne, I've had problems with that junk ware in the past too. The thing is Techne is made with Microsoft .NET (horrible idea) and then it's converting it to java code. Well the issue is that Techne fails to properly export floats and integers, or that's how I had experienced it back when I was still doing model related stuff in 1.3.2
You can see this issue here: and I had to manually fix it, which was a total b****, so after fixing it I got my desired result of not having weirdly rotated sign looking objects.
I had contacted Zeux several times for consent to turn Techne into a Java application, but the p*** never replies. Tried several places to contact him and nothing. Now the thing is I would definitely just go on without his consent and make it, but the thing is I am a bit to stupidly lazy to actually manage to create interaction with 3d models. I know it's simple and how it can be done. It's a lot of work so I would rather think of creating a team. Though at the moment I'd rather finish some other projects that are my list before continuing.
Moral of my story is that Techne shouldn't be trusted to the fullest. A basic function that Minecraft includes, addChild doesn't seem to be supported and that function is very useful for animating.
Rollback Post to RevisionRollBack
If your thread has been resolved and you're satisfied with your results then go to: Tools > Edit Thread and add [SOLVED] to the title. Also if your results are satisfying or someone greatly helped you, don't forget to give them a like on their post.
The last time I really was working on modding was back in 1.3.2, so I contain much MC coding noobism right now.
Rollback Post to RevisionRollBack
If your thread has been resolved and you're satisfied with your results then go to: Tools > Edit Thread and add [SOLVED] to the title. Also if your results are satisfying or someone greatly helped you, don't forget to give them a like on their post.
And I think the model looks like **** - it looks bad either way fixed or not - but it looks worse not fixed.
So if Techne can't properly calculate angles, how can I do it myself manually? There must be an algorithm to get the correct rotation/size.
I also don't get how mods like Twilight Fortress have armor that looks great and it seems like are doing the exact same thing I'm doing... Look - other users like may get stuff like this when before they had something like this.
I really don't get it, why is it so hard to create a nice armor in minecraft -_-'
Well. I saw the code, and a big problem can be "setRotation" part. Techne have a "Special" form of calculate the rotation. that can't be solved.
the other problem is that you made the calculations in techne. Minecraft Forge often make the model a bit smaller. To fix that, you can make again the sticks, and resize them.
The rotation it's more difficult to fix. But the armor it's very good as it is right now.
I've looked into it and it looks like the problem lies on how the ModelRenderer rotates objects, I've noticed that rotation on the Y is very different from rotation on other axes - sometimes it's not sensed.
"Excessive" rotation is a bit of an exaggeration, in my opinion. If it's not possible to rotate something in more than one axis then it is utterly useless to use Techne. I could just as easily calculate orientation matrices with single axis rotation than use Techne. Sure, Techne has a graphical interface but so does any other 3D software ever, the only reason you'd use it is to export to java and since that is "broken", well, there you have it, it's broken. It's just a little bit frustrating that there's no good way of rotating boxes without rewriting the entire ModelBiped class.
Once again, if I'm doing something wrong - please, please someone say so because right now - I have no clue.
Anyways real question:
How do I make the right click function work with the arms of a model? Could you maybe provide an example of a working product?
I can't see to find any open source projects that have modeled arms working properly (they either don't have modeled arms or the source is private, and "decompiling" sucks because its impossible to read anything with p_312fd_d as variables).
Hey I'm to an extent able to deobfuscate Minecraft code.
Rollback Post to RevisionRollBack
If your thread has been resolved and you're satisfied with your results then go to: Tools > Edit Thread and add [SOLVED] to the title. Also if your results are satisfying or someone greatly helped you, don't forget to give them a like on their post.
Hey I'm to an extent able to deobfuscate Minecraft code.
Oh boy! I was using Java Decompiler to see code, I'm looking at the twilight forest mod. You can find it Link Removed - I just need to see what the Knightly Armor Model and the Yeti Armor Model look like (hopefully).
Sorry for the latency, I'll PM you the code just to avoid issues with the original author of it.
Rollback Post to RevisionRollBack
If your thread has been resolved and you're satisfied with your results then go to: Tools > Edit Thread and add [SOLVED] to the title. Also if your results are satisfying or someone greatly helped you, don't forget to give them a like on their post.
No big deal man, really appreciate it. I learned a few tricks from the code. Hopefully I'll be able to deobfuscate Minecraft (mod) code soon so I can read through code myself!
Anyways, now I have the problem where the model's arms mess up when I right click with a sword: http://pbrd.co/1zHQT7V
Unrelated to the rendering, but why do you need to deobfuscate Minecraft code? If you are running Forge as your post tag claims, you can run 'gradlew setupDecompWorkspace' and the MC source code (the mpc version of it, anyway) will all be available under your 'Referenced Libraries' section, listed as 'forgeSrc-1.7.10-version'. That should make it easier for you to check out how vanilla does it, at least.
Sorry, I meant other Minecraft mods that are written with the Minecraft code/forge code. There are times when I see something really cool in a mod and I'd love to see how it was done but the source is no where to be found and I'm just left guessing what variable names mean when I decompile.
If you catch my drift. Still, with the decompiled vanilla code, it's sometimes hard to tell what things do because the change in variable names and things left undocumented.
If your thread has been resolved and you're satisfied with your results then go to: Tools > Edit Thread and add [SOLVED] to the title. Also if your results are satisfying or someone greatly helped you, don't forget to give them a like on their post.
-----------------------------------------------------------------------
Edit: New problem
My for some reason my model messes up when I use "defend" with a sword. Here's a picture:
http://pbrd.co/1zHQT7V
I don't know why it's doing that. All my code is below.
-----------------------------------------------
Hello, I'm confused to why my armor model doesn't look the way it's supposed to look - I don't see why things are changing from the editor (Techne) to the game.There's a picture in the attachments, look at the differences side by side - what's happening and how do I fix this?Here's my model code:
ArmorCode:
Render code:
Client Code:
I know the code doesn't help much but I'm mostly asking for common mistakes to look out for, any tips? Do you see the problem right away?Thanks for the help guys.Differences in attachments:- The "rods" are sticking in the wrong directions- The "rods" are sunk deeper into the armor model than they're supposed to be (so like look shorter)Could someone please take a look? I really don't understand what's wrong, I've checked all the angles - scales. I don't know what to do... I looked at the addBox method ModelRenderer object and there's a version what allows for the input of the scale factor. I tired that but then all the rods look bloated - abnormally larger than the rest of the model.
Please help?
Edit: Also, my arm texture messes up when I "defend" with a sword, how do I fix that? How do I get the arm model to rotate with the biped model arm when I "defend" (RMB with a sword)?
You can see this issue here: and I had to manually fix it, which was a total b****, so after fixing it I got my desired result of not having weirdly rotated sign looking objects.
I had contacted Zeux several times for consent to turn Techne into a Java application, but the p*** never replies. Tried several places to contact him and nothing. Now the thing is I would definitely just go on without his consent and make it, but the thing is I am a bit to stupidly lazy to actually manage to create interaction with 3d models. I know it's simple and how it can be done. It's a lot of work so I would rather think of creating a team. Though at the moment I'd rather finish some other projects that are my list before continuing.
Moral of my story is that Techne shouldn't be trusted to the fullest. A basic function that Minecraft includes, addChild doesn't seem to be supported and that function is very useful for animating.
I've checked the code over and over - the rotation points, offset and angles seem to be right.
How do I fix this manually? If there's a problem with the exporting of floats and integers - how can I fix it?
(Also do you know how to make it so right clicking when holding a sword doesn't mess up the rotation?)
Thanks for the reply - I really appreciate it.
And I think the model looks like **** - it looks bad either way fixed or not - but it looks worse not fixed.
So if Techne can't properly calculate angles, how can I do it myself manually? There must be an algorithm to get the correct rotation/size.
I also don't get how mods like Twilight Fortress have armor that looks great and it seems like are doing the exact same thing I'm doing... Look - other users like may get stuff like this when before they had something like this.
I really don't get it, why is it so hard to create a nice armor in minecraft -_-'
Edit:
Here's how the model looks like when I right click
http://pbrd.co/1zHQT7V
I've looked into it and it looks like the problem lies on how the ModelRenderer rotates objects, I've noticed that rotation on the Y is very different from rotation on other axes - sometimes it's not sensed.
I put an example in the attachments.
"Excessive" rotation is a bit of an exaggeration, in my opinion. If it's not possible to rotate something in more than one axis then it is utterly useless to use Techne. I could just as easily calculate orientation matrices with single axis rotation than use Techne. Sure, Techne has a graphical interface but so does any other 3D software ever, the only reason you'd use it is to export to java and since that is "broken", well, there you have it, it's broken. It's just a little bit frustrating that there's no good way of rotating boxes without rewriting the entire ModelBiped class.
Once again, if I'm doing something wrong - please, please someone say so because right now - I have no clue.
Anyways real question:
How do I make the right click function work with the arms of a model? Could you maybe provide an example of a working product?
I can't see to find any open source projects that have modeled arms working properly (they either don't have modeled arms or the source is private, and "decompiling" sucks because its impossible to read anything with p_312fd_d as variables).
Oh boy! I was using Java Decompiler to see code, I'm looking at the twilight forest mod. You can find it Link Removed - I just need to see what the Knightly Armor Model and the Yeti Armor Model look like (hopefully).
Anyways, now I have the problem where the model's arms mess up when I right click with a sword:
http://pbrd.co/1zHQT7V
If you catch my drift. Still, with the decompiled vanilla code, it's sometimes hard to tell what things do because the change in variable names and things left undocumented.
Java Advanced Decompiler or a.k.a. JAD or JDGUI are just out date and incompatible. I'd rather recommend procyon which is on bitbukkit.
I made an entire video tutorial series on modelling armor and putting it into Minecraft.
You guys can check it out on this thread:
http://www.minecraftforum.net/forums/mapping-and-modding/mapping-and-modding-tutorials/2175721-1-7-10-adding-custom-armor-models-video-series
And if you have the same problem but know how to do everything else, here's a link to the youtube video + time that I fix the issue: