Posted November 12, 20213 yr Greetings! I am totally new to minecraft modding, but I am quite experienced with programming. I have heard that people use a program called BlockBench to create and animate custom models for use within their mod. I have created a model, but I am unsure of what to do in order to integrate it within my mod. I am using forge for Minecraft 1.16.5. I aim to have this model be used as a helmet. Any help would be greatly appreciated.
November 12, 20213 yr Hi! First make a new "Java Block/Item" model in Blockbench. There you can make your helmet (without player). When you are done, go in the up left to "Paint" and paint your Model. Now go to "Display", select Reference Model "Player" and Slot "Head". Now scale your Model how you want it to look in-game and go in the up left corner to File>Export>Export Block/Item Model Sorry if my Posts are weird sometimes, I just try to help and learn as much as I can Also: PLEASE use SPOILERS for logs!
November 13, 20213 yr Author 20 hours ago, OutCraft said: Hi! First make a new "Java Block/Item" model in Blockbench. There you can make your helmet (without player). When you are done, go in the up left to "Paint" and paint your Model. Now go to "Display", select Reference Model "Player" and Slot "Head". Now scale your Model how you want it to look in-game and go in the up left corner to File>Export>Export Block/Item Model Hi there! Unfortunately, that would only work for the model of the item. I have solved most issues, though, and I am getting closer to a working solution. The issue is that there are some extra faces rendering, and I do not know what is causing them to appear. public class ModelTest extends EntityModel<Entity> { private final ModelRenderer Head; public ModelTest() { texWidth = 16; texHeight = 16; Head = new ModelRenderer(this); Head.setPos(0.0F, 0.0F, 0.0F); Head.texOffs(0, 1).addBox(-4.0F, -7.0F, -4.01F, 8.0F, 1.0F, 0.0F, 0.0F, false); Head.texOffs(0, 1).addBox(4.01F, -7.0F, -4.0F, 0.0F, 1.0F, 8.0F, 0.0F, false); Head.texOffs(0, 0).addBox(-4.0F, -7.0F, 4.01F, 8.0F, 1.0F, 0.0F, 0.0F, false); Head.texOffs(0, 0).addBox(-4.01F, -7.0F, -4.0F, 0.0F, 1.0F, 8.0F, 0.0F, false); Head.texOffs(0, 2).addBox(-1.0F, -7.0F, -4.3F, 2.0F, 1.0F, 1.0F, 0.0F, false); } @Override public void setupAnim(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch) { // previously the render function, render code was moved to a method below } @Override public void renderToBuffer(MatrixStack matrixStack, IVertexBuilder buffer, int packedLight, int packedOverlay, float red, float green, float blue, float alpha) { Head.render(matrixStack, buffer, packedLight, packedOverlay); } public void setRotationAngle(ModelRenderer modelRenderer, float x, float y, float z) { modelRenderer.xRot = x; modelRenderer.yRot = y; modelRenderer.zRot = z; } public void setRotationAngles(Entity e, float f, float f1, float f2, float f3, float f4) { this.Head.yRot = f3 / (180F / (float) Math.PI); this.Head.yRot = f4 / (180F / (float) Math.PI); } public ModelRenderer GetHead() { return Head; } } public class ItemTest extends ArmorItem { public ItemTest(IArmorMaterial p_i48534_1_, EquipmentSlotType p_i48534_2_, Properties p_i48534_3_) { super(ArmorMaterial.IRON, EquipmentSlotType.HEAD, new Item.Properties()); } @Override @OnlyIn(Dist.CLIENT) public BipedModel getArmorModel(LivingEntity living, ItemStack stack, EquipmentSlotType slot, BipedModel defaultModel) { BipedModel armorModel = new BipedModel(1); ModelTest modelTest = new ModelTest(); armorModel.head = modelTest.GetHead(); armorModel.crouching = living.isCrouching(); armorModel.riding = defaultModel.riding; //armorModel.isChild = living.isChild(); ?? return armorModel; } @Override public String getArmorTexture(ItemStack stack, Entity entity, EquipmentSlotType slot, String type) { return "modtest:textures/models/armor/tex.png"; } }
November 13, 20213 yr Hi! Do you want to make a custom entity hat looks like this or a helmet that looks like the blue part on top of Steves head? Sorry if my Posts are weird sometimes, I just try to help and learn as much as I can Also: PLEASE use SPOILERS for logs!
November 13, 20213 yr Author 4 hours ago, OutCraft said: Hi! Do you want to make a custom entity hat looks like this or a helmet that looks like the blue part on top of Steves head? The latter. I have been almost successful, but I am getting some artifacts. Deleting part of the texture made them disappear: Do you know what could be causing this?
November 13, 20213 yr Hi again! In Blockbench, go to File>Export>Share and paste the link here, then I can look if there's something wrong with the model Sorry if my Posts are weird sometimes, I just try to help and learn as much as I can Also: PLEASE use SPOILERS for logs!
November 13, 20213 yr Author 1 hour ago, OutCraft said: Hi again! In Blockbench, go to File>Export>Share and paste the link here, then I can look if there's something wrong with the model I lost the model, but I made another one and the issue still persists. Here is the URL you required. Thank you for your assistance!
November 14, 20213 yr How do You want it to look in-game? Take this Model, go in the up right to "Display", select Slot "Head" and scale it until it looks how you want it in-game. Then send the link or a picture of how it should look Sorry if my Posts are weird sometimes, I just try to help and learn as much as I can Also: PLEASE use SPOILERS for logs!
November 14, 20213 yr Author 5 hours ago, OutCraft said: How do You want it to look in-game? Take this Model, go in the up right to "Display", select Slot "Head" and scale it until it looks how you want it in-game. Then send the link or a picture of how it should look Greetings! The model was scaled correctly. This is how it should look like in-game:
November 15, 20213 yr Then you can download the model: File>Export>Export Block/Item model Edited November 15, 20213 yr by OutCraft Spelling Sorry if my Posts are weird sometimes, I just try to help and learn as much as I can Also: PLEASE use SPOILERS for logs!
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.