Jump to content

How do I make a Custom Armor Model for 1.16?


Skullblade

Recommended Posts

44 minutes ago, aritod said:

Ok. I was doing something wrong. Sorry. What you actually need to do is the following (PS: Delete the .json file):

1. Create a custom armor class for each piece of armor that extends ArmorItem 


public class ArgentumHelmet extends ArmorItem

2. Override getArmorModel and getArmorTexture


    @Nullable
    @Override
    public <A extends BipedModel<?>> A getArmorModel(LivingEntity entityLiving, ItemStack itemStack, EquipmentSlotType armorSlot, A _default) {
        return null;
    }

    @Nullable
    @Override
    public String getArmorTexture(ItemStack stack, Entity entity, EquipmentSlotType slot, String type) {
        return null;
    }

3. Export your armor model as a Java class and put it in your project

4. Return an instance of your Model Class to getArmorModel()


                YourModelObject model = new YourModelObject();
                model.bipedHeadwear.showModel = armorSlot == EquipmentSlotType.HEAD;

                model.isChild = _default.isChild;
                model.isSneak = _default.isSneak;
                model.isSitting = _default.isSitting;
                model.rightArmPose = _default.rightArmPose;
                model.leftArmPose = _default.leftArmPose;

                return (A) model;

5. Return texture in getArmorTexture()


return "modid:textures/models/armor/texture.png";

6. Instantiate your custom model class instead of ArmorItem when creating your armor piece


...new ArmorItem(...);

To

...new ArgentumHelmet(...);

Repeat for all other pieces

 

Got this from this thread:

If this doesn't work then I suggest doing your own research.

Part of the problem is that the thread you looked at is outdated. Minecraft swapped the names of a majority of their methods in 1.16, which is why I specified the specific update in this thread's title. All of the steps worked except for #4, and I believe that's because the methods are mcp, and not Mojang. The Linkie bot in the Linkie server couldn't even translate the methods.

Attached is the broken part of ArgentumChestplate's code.

image.thumb.png.cc5398c85225975581d2ed81cbb1d41f.png

 

Link to comment
Share on other sites

1 minute ago, Skullblade said:

Part of the problem is that the thread you looked at is outdated. Minecraft swapped the names of a majority of their methods in 1.16, which is why I specified the specific update in this thread's title. All of the steps worked except for #4, and I believe that's because the methods are mcp, and not Mojang. The Linkie bot in the Linkie server couldn't even translate the methods.

Attached is the broken part of ArgentumChestplate's code.

image.thumb.png.cc5398c85225975581d2ed81cbb1d41f.png

 

This might be the case but you are instantiating the ArgentumChestplate class, instead of ArgentumChestplateModel class.

Link to comment
Share on other sites

3 minutes ago, Skullblade said:

It won't even let me import the ArgentumChestplateModel class.

Uhh I'm not exactly sure what you are doing. Did you export your model as a java class and put in under src/main/java/...? Is the name of your model class ArgentumChestplateModel? You are supposed to instantiate your model class.

Edited by aritod
Link to comment
Share on other sites

Just now, aritod said:

Uhh I'm not exactly sure what you are doing. Did you export your model as a java class and put in under src/main/java/...? Is the name of your model class ArgentumChestplateModel?

The model class is named ArgentumChestplateModel.java, and it's located in src/main/java/com/skullblade/planeswalkermod/common/models.

Link to comment
Share on other sites

1 minute ago, Skullblade said:

The model class is named ArgentumChestplateModel.java, and it's located in src/main/java/com/skullblade/planeswalkermod/common/models.

Then I'm not sure why you wouldn't be able to import it. Can you show the class?

Link to comment
Share on other sites

4 minutes ago, Skullblade said:

Missing package statement: 'com.skullblade.planeswalkermod.common.models'

Put 

package com.skullblade.planeswalkermod.common.models;

at the start of your class

Edited by aritod
Link to comment
Share on other sites

11 minutes ago, Skullblade said:

Well, the class name ArgentumChestplateModel is no longer underlined in red, but everything else is brighter than a fire engine.

I think you exported the model as an entity from blockbench, as your model class should extend BipedModel. Pick Block/Item this time.

Link to comment
Share on other sites

1 hour ago, Skullblade said:

That just makes it a .json again.

Oh. Then extend BipedModel in your Model class and replace setTextureOffset() with texOffs(), textureWidth with texWidth, textureHeight with texHeight. Not sure about body.setRotationPoint() though.

Link to comment
Share on other sites

6 minutes ago, aritod said:

Oh. Then extend BipedModel in your Model class and replace setTextureOffset() with texOffs(), textureWidth with texWidth, textureHeight with texHeight. Not sure about body.setRotationPoint() though.

I took a guess and it's .setPos for .setRotationPoint. The only issue left is this error from public ArgentumChestplateModel();

There is no default constructor available in 'net.minecraft.client.renderer.entity.model.BipedModel'

Link to comment
Share on other sites

8 minutes ago, Skullblade said:

I took a guess and it's .setPos for .setRotationPoint. The only issue left is this error from public ArgentumChestplateModel();

There is no default constructor available in 'net.minecraft.client.renderer.entity.model.BipedModel'

 

    public ExampleConstructor(float i) {
        super(i);
	/.../
}

Your model constructor needs a float

Link to comment
Share on other sites

1 minute ago, aritod said:

 


    public ExampleConstructor(float i) {
        super(i);
	/.../
}

Your model constructor needs a float

Sweet, now that's all fixed. In ArgentumChestplate.java, I'm able to replace ArgentumChestplate with ArgentumChestplateModel, but there's still a problem with the model.blank stuff. Each one except for model.rightArmPose and model.leftArmPose says 'can't resolve symbol'.

Link to comment
Share on other sites

33 minutes ago, Skullblade said:

Sweet, now that's all fixed. In ArgentumChestplate.java, I'm able to replace ArgentumChestplate with ArgentumChestplateModel, but there's still a problem with the model.blank stuff. Each one except for model.rightArmPose and model.leftArmPose says 'can't resolve symbol'.

Hmm. I've been trying to look for a replacement for those but I'm not sure. Seems like there was a big change from 1.15 to 1.16. Try doing your own research maybe. Also, just curious. What exactly happens if you remove all the lines that have that error? Does the armor model partially work? Is there an error?

Link to comment
Share on other sites

11 minutes ago, aritod said:

Hmm. I've been trying to look for a replacement for those but I'm not sure. Seems like there was a big change from 1.15 to 1.16. Try doing your own research maybe. Also, just curious. What exactly happens if you remove all the lines that have that error? Does the armor model partially work? Is there an error?

Deleting parts that are errored leads to more errors in other parts.

Link to comment
Share on other sites

3 minutes ago, aritod said:

Delete line 23 to 27. When instantiating your ArgentumChestplateModel class, give it 1.0F as a parameter.

The armor works! I think I may have screwed up the model in blockbench, but now that I know how this stuff works, it'll be an easy fix. Thank you so much!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Let me try and help you with love spells, traditional healing, native healing, fortune telling, witchcraft, psychic readings, black magic, voodoo, herbalist healing, or any other service your may desire within the realm of african native healing, the spirits and the ancestors. I am a sangoma and healer. I could help you to connect with the ancestors , interpret dreams, diagnose illness through divination with bones, and help you heal both physical and spiritual illness. We facilitate the deepening of your relationship to the spirit world and the ancestors. Working in partnership with one\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\’s ancestors is a gift representing a close link with the spirit realm as a mediator between the worlds.*   Witchdoctors, or sorcerers, are often purveyors of mutis and charms that cause harm to people. we believe that we are here for only one purpose, to heal through love and compassion.*   African people share a common understanding of the importance of ancestors in daily life. When they have lost touch with their ancestors, illness may result or bad luck. Then a traditional healer, or sangoma, is sought out who may prescribe herbs, changes in lifestyle, a career change, or changes in relationships. The client may also be told to perform a ceremony or purification ritual to appease the ancestors.*   Let us solve your problems using powerful African traditional methods. We believe that our ancestors and spirits give us enlightenment, wisdom, divine guidance, enabling us to overcome obstacles holding your life back. Our knowledge has been passed down through centuries, being refined along the way from generation to generation. We believe in the occult, the paranormal, the spirit world, the mystic world.*   The services here are based on the African Tradition Value system/religion,where we believe the ancestors and spirits play a very important role in society. The ancestors and spirits give guidance and counsel in society. They could enable us to see into the future and give solutions to the problems affecting us. We use rituals, divination, spells, chants and prayers to enable us tackle the task before us.*   I have experience in helping and guiding many people from all over the world. My psychic abilities may help you answer and resolve many unanswered questions
    • Let me try and help you with love spells, traditional healing, native healing, fortune telling, witchcraft, psychic readings, black magic, voodoo, herbalist healing, or any other service your may desire within the realm of african native healing, the spirits and the ancestors. I am a sangoma and healer. I could help you to connect with the ancestors , interpret dreams, diagnose illness through divination with bones, and help you heal both physical and spiritual illness. We facilitate the deepening of your relationship to the spirit world and the ancestors. Working in partnership with one\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\’s ancestors is a gift representing a close link with the spirit realm as a mediator between the worlds.*   Witchdoctors, or sorcerers, are often purveyors of mutis and charms that cause harm to people. we believe that we are here for only one purpose, to heal through love and compassion.*   African people share a common understanding of the importance of ancestors in daily life. When they have lost touch with their ancestors, illness may result or bad luck. Then a traditional healer, or sangoma, is sought out who may prescribe herbs, changes in lifestyle, a career change, or changes in relationships. The client may also be told to perform a ceremony or purification ritual to appease the ancestors.*   Let us solve your problems using powerful African traditional methods. We believe that our ancestors and spirits give us enlightenment, wisdom, divine guidance, enabling us to overcome obstacles holding your life back. Our knowledge has been passed down through centuries, being refined along the way from generation to generation. We believe in the occult, the paranormal, the spirit world, the mystic world.*   The services here are based on the African Tradition Value system/religion,where we believe the ancestors and spirits play a very important role in society. The ancestors and spirits give guidance and counsel in society. They could enable us to see into the future and give solutions to the problems affecting us. We use rituals, divination, spells, chants and prayers to enable us tackle the task before us.*   I have experience in helping and guiding many people from all over the world. My psychic abilities may help you answer and resolve many unanswered questions
    • Let me try and help you with love spells, traditional healing, native healing, fortune telling, witchcraft, psychic readings, black magic, voodoo, herbalist healing, or any other service your may desire within the realm of african native healing, the spirits and the ancestors. I am a sangoma and healer. I could help you to connect with the ancestors , interpret dreams, diagnose illness through divination with bones, and help you heal both physical and spiritual illness. We facilitate the deepening of your relationship to the spirit world and the ancestors. Working in partnership with one\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\’s ancestors is a gift representing a close link with the spirit realm as a mediator between the worlds.*   Witchdoctors, or sorcerers, are often purveyors of mutis and charms that cause harm to people. we believe that we are here for only one purpose, to heal through love and compassion.*   African people share a common understanding of the importance of ancestors in daily life. When they have lost touch with their ancestors, illness may result or bad luck. Then a traditional healer, or sangoma, is sought out who may prescribe herbs, changes in lifestyle, a career change, or changes in relationships. The client may also be told to perform a ceremony or purification ritual to appease the ancestors.*   Let us solve your problems using powerful African traditional methods. We believe that our ancestors and spirits give us enlightenment, wisdom, divine guidance, enabling us to overcome obstacles holding your life back. Our knowledge has been passed down through centuries, being refined along the way from generation to generation. We believe in the occult, the paranormal, the spirit world, the mystic world.*   The services here are based on the African Tradition Value system/religion,where we believe the ancestors and spirits play a very important role in society. The ancestors and spirits give guidance and counsel in society. They could enable us to see into the future and give solutions to the problems affecting us. We use rituals, divination, spells, chants and prayers to enable us tackle the task before us.*   I have experience in helping and guiding many people from all over the world. My psychic abilities may help you answer and resolve many unanswered questions
    • Let me try and help you with love spells, traditional healing, native healing, fortune telling, witchcraft, psychic readings, black magic, voodoo, herbalist healing, or any other service your may desire within the realm of african native healing, the spirits and the ancestors. I am a sangoma and healer. I could help you to connect with the ancestors , interpret dreams, diagnose illness through divination with bones, and help you heal both physical and spiritual illness. We facilitate the deepening of your relationship to the spirit world and the ancestors. Working in partnership with one\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\’s ancestors is a gift representing a close link with the spirit realm as a mediator between the worlds.*   Witchdoctors, or sorcerers, are often purveyors of mutis and charms that cause harm to people. we believe that we are here for only one purpose, to heal through love and compassion.*   African people share a common understanding of the importance of ancestors in daily life. When they have lost touch with their ancestors, illness may result or bad luck. Then a traditional healer, or sangoma, is sought out who may prescribe herbs, changes in lifestyle, a career change, or changes in relationships. The client may also be told to perform a ceremony or purification ritual to appease the ancestors.*   Let us solve your problems using powerful African traditional methods. We believe that our ancestors and spirits give us enlightenment, wisdom, divine guidance, enabling us to overcome obstacles holding your life back. Our knowledge has been passed down through centuries, being refined along the way from generation to generation. We believe in the occult, the paranormal, the spirit world, the mystic world.*   The services here are based on the African Tradition Value system/religion,where we believe the ancestors and spirits play a very important role in society. The ancestors and spirits give guidance and counsel in society. They could enable us to see into the future and give solutions to the problems affecting us. We use rituals, divination, spells, chants and prayers to enable us tackle the task before us.*   I have experience in helping and guiding many people from all over the world. My psychic abilities may help you answer and resolve many unanswered questions
    • Let me try and help you with love spells, traditional healing, native healing, fortune telling, witchcraft, psychic readings, black magic, voodoo, herbalist healing, or any other service your may desire within the realm of african native healing, the spirits and the ancestors. I am a sangoma and healer. I could help you to connect with the ancestors , interpret dreams, diagnose illness through divination with bones, and help you heal both physical and spiritual illness. We facilitate the deepening of your relationship to the spirit world and the ancestors. Working in partnership with one\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\’s ancestors is a gift representing a close link with the spirit realm as a mediator between the worlds.*   Witchdoctors, or sorcerers, are often purveyors of mutis and charms that cause harm to people. we believe that we are here for only one purpose, to heal through love and compassion.*   African people share a common understanding of the importance of ancestors in daily life. When they have lost touch with their ancestors, illness may result or bad luck. Then a traditional healer, or sangoma, is sought out who may prescribe herbs, changes in lifestyle, a career change, or changes in relationships. The client may also be told to perform a ceremony or purification ritual to appease the ancestors.*   Let us solve your problems using powerful African traditional methods. We believe that our ancestors and spirits give us enlightenment, wisdom, divine guidance, enabling us to overcome obstacles holding your life back. Our knowledge has been passed down through centuries, being refined along the way from generation to generation. We believe in the occult, the paranormal, the spirit world, the mystic world.*   The services here are based on the African Tradition Value system/religion,where we believe the ancestors and spirits play a very important role in society. The ancestors and spirits give guidance and counsel in society. They could enable us to see into the future and give solutions to the problems affecting us. We use rituals, divination, spells, chants and prayers to enable us tackle the task before us.*   I have experience in helping and guiding many people from all over the world. My psychic abilities may help you answer and resolve many unanswered questions
  • Topics

×
×
  • Create New...

Important Information

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