June 7, 20214 yr Author 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.
June 7, 20214 yr 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. This might be the case but you are instantiating the ArgentumChestplate class, instead of ArgentumChestplateModel class.
June 7, 20214 yr Author 2 minutes ago, aritod said: This might be the case but you are instantiating the ArgentumChestplate class, instead of ArgentumChestplateModel class. It won't even let me import the ArgentumChestplateModel class.
June 7, 20214 yr 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 June 7, 20214 yr by aritod
June 7, 20214 yr Author 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.
June 7, 20214 yr 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?
June 7, 20214 yr Author 1 minute ago, aritod said: Then I'm not sure why you wouldn't be able to import it. Can you show the class? Sure. I'm not sure why, but ArgentumChestplateModel is riddled with errors.
June 7, 20214 yr 8 minutes ago, Skullblade said: Sure. I'm not sure why, but ArgentumChestplateModel is riddled with errors. And what does it say when you hover over the class name which is underlined red...
June 7, 20214 yr Author 2 minutes ago, aritod said: And what does it say when you hover over the class name which is underlined red... Missing package statement: 'com.skullblade.planeswalkermod.common.models'
June 7, 20214 yr 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 June 7, 20214 yr by aritod
June 7, 20214 yr Author 1 minute ago, aritod said: Put package com.skullblade.planeswalkermod.common.models; at the start of your class Well, the class name ArgentumChestplateModel is no longer underlined in red, but everything else is brighter than a fire engine.
June 7, 20214 yr 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.
June 7, 20214 yr Author 1 minute ago, aritod said: I think you exported the model as an entity from blockbench, as your model class should extend BipedModel. Pick Block/Item this time. That just makes it a .json again.
June 7, 20214 yr 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.
June 7, 20214 yr Author 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'
June 7, 20214 yr 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
June 7, 20214 yr Author 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'.
June 8, 20214 yr 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?
June 8, 20214 yr Author 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.
June 8, 20214 yr 24 minutes ago, Skullblade said: Deleting parts that are errored leads to more errors in other parts. What exactly is errored?
June 8, 20214 yr 16 minutes ago, Skullblade said: Delete line 23 to 27. When instantiating your ArgentumChestplateModel class, give it 1.0F as a parameter.
June 8, 20214 yr Author 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!
June 8, 20214 yr 10 hours ago, Skullblade said: 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! No problem
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.