Hey guys, I am currently having issues with modding custom 3d armor models in my game for 1.12.2. the current issues I am having are:
- The shoulderplates are duplicated and floating above the original shoulderplates – even when on a stand (see below)
- The legplates are just absolutely screwed somehow – the legs themselves appear below my characters feet, and then it also drags in a model of the chestplate and shoulders – all untextured (see below)
- And if that wasn’t enough I have 0 idea how I am supposed to add boots to this whole mess.
I will paste the code that I built to do all of this and hopefully you can point out what’s going on, I am still teaching myself how to properly code so if you could be blunt about where to fix what I would appreciate it!
Here is what I would try as a first step: In the method getArmorModel() in the DragonArmorBase class, try changing the showModel statements to use your custom ModelRenderers (such as LeftShoulderSpike etc) instead of the inherited ModelRenderers from ModelBiped.
Here is what I would try as a first step: In the method getArmorModel() in the DragonArmorBase class, try changing the showModel statements to use your custom ModelRenderers (such as LeftShoulderSpike etc) instead of the inherited ModelRenderers from ModelBiped.
Alright - done that (had to convert the private finals to public finals in DragonGear) and I had a bit of a dig around regarding the feet armor and added the armorslots for those too - code here: https://pastebin.com/egMwG4sP . The change to the code below DragonGear = new DragonGear() ; has sadly not changed the weird floating shoulders/shoulder spikes.
the shoulder spikes that are floating animate with the swing of my characters arm which is great, but the shoulders that are stuck to my characters arm have no movement at all.
also the leg armor is just textured black - with the leg armor itself being below the legs and outwards a bit and actually including the boots in its model - with the spikes showing up floating by themselves underneath.
After taking another look, I see now that in your model class you add the RightShoulder and LeftShoulder as children both to Chainmail and the bipedArms. This means that they are renderer twice. Remove these two lines:
Chainmail.addChild(RightShoulder);
Chainmail.addChild(LeftShoulder);
Now you should be left with the floating shoulders that animate correctly. You will have to reposition them by tweaking these lines:
You're an absolute champion - it's almost working like a treat now! couple more things if I could pick your brain - do you know what's going on with this weird 1 face texture in the eye slit? it appears to be reusing my texture map for layer 1 and is also projecting said texture on the interior of the helmet - also the armor has life animation like a person has it equipped even though it is on the armor stand - how do I stop that?
After taking another look, I see now that in your model class you add the RightShoulder and LeftShoulder as children both to Chainmail and the bipedArms. This means that they are renderer twice. Remove these two lines:
Chainmail.addChild(RightShoulder);
Chainmail.addChild(LeftShoulder);
Now you should be left with the floating shoulders that animate correctly. You will have to reposition them by tweaking these lines:
You're an absolute champion - it's almost working like a treat now! couple more things if I could pick your brain - do you know what's going on with this weird 1 face texture in the eye slit? it appears to be reusing my texture map for layer 1 and is also projecting said texture on the interior of the helmet - also the armor has life animation like a person has it equipped even though it is on the armor stand - how do I stop that?
When I say it is projecting the layer 1 texture - it is actually projecting its proper interior helmet texture as it should - but ALSO projecting a weird version of layer ones texture as well, the eye slit out of place texture for example is using the chest texture for some odd reason.
Regarding the armor stand problem - perhaps you could override the setLivingAnimations() and setRotationAngles() methods in the model class and check if the supplied entity is not an armor stand before calling the super method?
As for your texture problem, I am not sure I fully understand the problem, perhaps you could clarify it even more?
Regarding the armor stand problem - perhaps you could override the setLivingAnimations() and setRotationAngles() methods in the model class and check if the supplied entity is not an armor stand before calling the super method?
As for your texture problem, I am not sure I fully understand the problem, perhaps you could clarify it even more?
I feel like a bit thick for asking - but just to confirm, when you say override, code wise what would I write and where would that go in the model class exactly? as for the texture problem - see the below photos, 1 is the image in BlockBase, other is in-game. the in game one has the texture circled that is creeping 1 pixel over the eye slit I made. also if you look at the blockbase image, there is just plain red for the interior of the helmet but in game there is what appears to be the layer one texture (chestplate texture specifically) overlaid on top of the regular texture - causing them both to clip each other when you make even the slightest movement.
Top 2 circles show the texture going over the eye slits, bottom circle show the same weird texture that is affecting the eyelids clashing and clipping with the regular red texture on the interior of the helmet.
Here is a second example of it with a different 3D helm - the only piece of armor getting this issue is the helmets of my armor sets - I am unsure of what is going on because there isn't even a block for those textures to sit on - they are seemingly just being told to go there without a block face to sit on.
Regarding the override, I was thinking something like this:
@Override
public void setRotationAngles(parameters here) {
if (!(supplied_entity instanceof ArmorStand)) {
super.setRotationAngles(parameters here);
}
}
You would have to check the source code of ModelBiped to see the exact method name and parameter list.
As for the texture problem, I think I know that the problem is. There is actually a block for the texture to sit on, namely the original bipedHead. You would have to leave the top left 64x64 pixels in the texture empty, otherwise the original ModelBiped cubes screw things up. If this is not the source of the problem, then I am afraid I am out of suggestions.
Damn - it looks like Blockbench paints over the top left 64x64 pixels area - I will try and figure out how I can correct this and I reckon that would be right, I really appreciate your help my man.
Regarding the override, I was thinking something like this:
@Override
public void setRotationAngles(parameters here) {
if (!(supplied_entity instanceof ArmorStand)) {
super.setRotationAngles(parameters here);
}
}
You would have to check the source code of ModelBiped to see the exact method name and parameter list.
As for the texture problem, I think I know that the problem is. There is actually a block for the texture to sit on, namely the original bipedHead. You would have to leave the top left 64x64 pixels in the texture empty, otherwise the original ModelBiped cubes screw things up. If this is not the source of the problem, then I am afraid I am out of suggestions.
I just shifted the texture map from the top right to the bottom left which has now fixed the whole head issue - but it has spread to the body and arms now, somehow my texture map is rendering on the original model biped when I went as far as to shift the entire texture map from one extreme to the other - any ideas? I have posted an image of what the chest looks like in-game and have also included the texture map before and after photos. the textures on the armor model itself looks fine - it just seems to want to paint over modelbiped still somehow.
I have played with different texture map sizes, sectioned them by colors to see what is being affected but by the looks of it the entire texture map is being sucked in by modelBiped, is there a way I can constrict modelBiped to just look for textures in a specific 64 x 32 area that has no textures in it instead of the entire texture map?
I have played with different texture map sizes, sectioned them by colors to see what is being affected but by the looks of it the entire texture map is being sucked in by modelBiped, is there a way I can constrict modelBiped to just look for textures in a specific 64 x 32 area that has no textures in it instead of the entire texture map?
I am honestly not sure what the best approach is. You could perhaps try and go through every ModelRenderer that is inherited from ModelBiped (so bipedHead, bipedBody, etc) and empty their cubeList, to hopefully avoid rendering the ModelBiped completely. Then you should be able to put your texture anywhere in the 128x128 area.
That's great to hear man - and good-ish news! we got progress, I had a quick look through your code - I rewrote the lines in entity class to match yours because I saw a couple of differences in the code we wrote, and hey presto it rendered the stone sword! but now for the second issue, the sword isn't actually moving with the hand - it looks normal when my entity is not moving, but any hand motion and the sword doesn't move. got any ideas on what's going on there?
I am honestly not sure what the best approach is. You could perhaps try and go through every ModelRenderer that is inherited from ModelBiped (so bipedHead, bipedBody, etc) and empty their cubeList, to hopefully avoid rendering the ModelBiped completely. Then you should be able to put your texture anywhere in the 128x128 area.
I have the problem with the 128x128 texture. I'll explain
a few days ago (precisely yesterday) I started studying how to create custom armor models, and following the Harrytalks tutorial (done in 2018, and the only one in the world apparently).
I made the helmet first and it went well, then in the same file where I made the helmet I made the chestplate; and the helmet decided that its texture was all over the file
attached a very nice helmet that has decided to be a texture (the other problems you notice maybe I have solved them)
I have the problem with the 128x128 texture. I'll explain
a few days ago (precisely yesterday) I started studying how to create custom armor models, and following the Harrytalks tutorial (done in 2018, and the only one in the world apparently).
I made the helmet first and it went well, then in the same file where I made the helmet I made the chestplate; and the helmet decided that its texture was all over the file
attached a very nice helmet that has decided to be a texture (the other problems you notice maybe I have solved them)
Hey guys, I am currently having issues with modding custom 3d armor models in my game for 1.12.2. the current issues I am having are:
- The shoulderplates are duplicated and floating above the original shoulderplates – even when on a stand (see below)
- The legplates are just absolutely screwed somehow – the legs themselves appear below my characters feet, and then it also drags in a model of the chestplate and shoulders – all untextured (see below)
- And if that wasn’t enough I have 0 idea how I am supposed to add boots to this whole mess.
I will paste the code that I built to do all of this and hopefully you can point out what’s going on, I am still teaching myself how to properly code so if you could be blunt about where to fix what I would appreciate it!
Item class - https://pastebin.com/WS6GGwfF
Client proxy - https://pastebin.com/B0RRY3RP
Common proxy - https://pastebin.com/Xb5VE0bF
actual 3d armor model class - https://pastebin.com/AJq2Ly83
armor rendering class - https://pastebin.com/rDGsn4h5
Here is what I would try as a first step: In the method getArmorModel() in the DragonArmorBase class, try changing the showModel statements to use your custom ModelRenderers (such as LeftShoulderSpike etc) instead of the inherited ModelRenderers from ModelBiped.
Alright - done that (had to convert the private finals to public finals in DragonGear) and I had a bit of a dig around regarding the feet armor and added the armorslots for those too - code here: https://pastebin.com/egMwG4sP . The change to the code below DragonGear = new DragonGear() ; has sadly not changed the weird floating shoulders/shoulder spikes.
the shoulder spikes that are floating animate with the swing of my characters arm which is great, but the shoulders that are stuck to my characters arm have no movement at all.
also the leg armor is just textured black - with the leg armor itself being below the legs and outwards a bit and actually including the boots in its model - with the spikes showing up floating by themselves underneath.
any further pointers to help get this sorted?
After taking another look, I see now that in your model class you add the RightShoulder and LeftShoulder as children both to Chainmail and the bipedArms. This means that they are renderer twice. Remove these two lines:
Chainmail.addChild(RightShoulder);
Chainmail.addChild(LeftShoulder);
Now you should be left with the floating shoulders that animate correctly. You will have to reposition them by tweaking these lines:
LeftShoulder.setRotationPoint(4.0F, -9.0F, -1.0F);
Chainmail.setRotationPoint(4.0F, 12.0F, 2.0F);
You're an absolute champion - it's almost working like a treat now! couple more things if I could pick your brain - do you know what's going on with this weird 1 face texture in the eye slit? it appears to be reusing my texture map for layer 1 and is also projecting said texture on the interior of the helmet - also the armor has life animation like a person has it equipped even though it is on the armor stand - how do I stop that?
When I say it is projecting the layer 1 texture - it is actually projecting its proper interior helmet texture as it should - but ALSO projecting a weird version of layer ones texture as well, the eye slit out of place texture for example is using the chest texture for some odd reason.
Regarding the armor stand problem - perhaps you could override the setLivingAnimations() and setRotationAngles() methods in the model class and check if the supplied entity is not an armor stand before calling the super method?
As for your texture problem, I am not sure I fully understand the problem, perhaps you could clarify it even more?
I feel like a bit thick for asking - but just to confirm, when you say override, code wise what would I write and where would that go in the model class exactly? as for the texture problem - see the below photos, 1 is the image in BlockBase, other is in-game. the in game one has the texture circled that is creeping 1 pixel over the eye slit I made. also if you look at the blockbase image, there is just plain red for the interior of the helmet but in game there is what appears to be the layer one texture (chestplate texture specifically) overlaid on top of the regular texture - causing them both to clip each other when you make even the slightest movement.
Top 2 circles show the texture going over the eye slits, bottom circle show the same weird texture that is affecting the eyelids clashing and clipping with the regular red texture on the interior of the helmet.
Here is a second example of it with a different 3D helm - the only piece of armor getting this issue is the helmets of my armor sets - I am unsure of what is going on because there isn't even a block for those textures to sit on - they are seemingly just being told to go there without a block face to sit on.
Regarding the override, I was thinking something like this:
@Override
public void setRotationAngles(parameters here) {
if (!(supplied_entity instanceof ArmorStand)) {
super.setRotationAngles(parameters here);
}
}
You would have to check the source code of ModelBiped to see the exact method name and parameter list.
As for the texture problem, I think I know that the problem is. There is actually a block for the texture to sit on, namely the original bipedHead. You would have to leave the top left 64x64 pixels in the texture empty, otherwise the original ModelBiped cubes screw things up. If this is not the source of the problem, then I am afraid I am out of suggestions.
Damn - it looks like Blockbench paints over the top left 64x64 pixels area - I will try and figure out how I can correct this and I reckon that would be right, I really appreciate your help my man.
I just shifted the texture map from the top right to the bottom left which has now fixed the whole head issue - but it has spread to the body and arms now, somehow my texture map is rendering on the original model biped when I went as far as to shift the entire texture map from one extreme to the other - any ideas? I have posted an image of what the chest looks like in-game and have also included the texture map before and after photos. the textures on the armor model itself looks fine - it just seems to want to paint over modelbiped still somehow.
I have played with different texture map sizes, sectioned them by colors to see what is being affected but by the looks of it the entire texture map is being sucked in by modelBiped, is there a way I can constrict modelBiped to just look for textures in a specific 64 x 32 area that has no textures in it instead of the entire texture map?
I am honestly not sure what the best approach is. You could perhaps try and go through every ModelRenderer that is inherited from ModelBiped (so bipedHead, bipedBody, etc) and empty their cubeList, to hopefully avoid rendering the ModelBiped completely. Then you should be able to put your texture anywhere in the 128x128 area.
That's great to hear man - and good-ish news! we got progress, I had a quick look through your code - I rewrote the lines in entity class to match yours because I saw a couple of differences in the code we wrote, and hey presto it rendered the stone sword! but now for the second issue, the sword isn't actually moving with the hand - it looks normal when my entity is not moving, but any hand motion and the sword doesn't move. got any ideas on what's going on there?
I have the problem with the 128x128 texture. I'll explain
a few days ago (precisely yesterday) I started studying how to create custom armor models, and following the Harrytalks tutorial (done in 2018, and the only one in the world apparently).
I made the helmet first and it went well, then in the same file where I made the helmet I made the chestplate; and the helmet decided that its texture was all over the file
attached a very nice helmet that has decided to be a texture (the other problems you notice maybe I have solved them)
pastebin of the model: https://pastebin.com/xLPMYED7
pastebin of the method that takes care of showing the model https://pastebin.com/n0Hgtm5G