Ragnar Posted October 12, 2018 Share Posted October 12, 2018 (edited) How to Create Custom Template Armor Without Programs Edited October 13, 2018 by Ragnar Quote Link to comment Share on other sites More sharing options...
Animefan8888 Posted October 12, 2018 Share Posted October 12, 2018 1 hour ago, Ragnar said: How to Create Custom Template Armor Without Programs I have no idea what you are trying to say. Quote VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator. Link to comment Share on other sites More sharing options...
TSEngineer Posted October 12, 2018 Share Posted October 12, 2018 Make a custom armor without any programs? Impossible. Quote Link to comment Share on other sites More sharing options...
Animefan8888 Posted October 12, 2018 Share Posted October 12, 2018 26 minutes ago, TSEngineer said: Make a custom armor without any programs? Impossible. You can not make a custom set of armor without programming it. Quote VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator. Link to comment Share on other sites More sharing options...
Ragnar Posted October 12, 2018 Author Share Posted October 12, 2018 I just found a tutorial that uses a program called Techne, which after you create the armature it gives you a .java file which is a ready class. And no tutorial that teaches you to do without the program, just writing in class Quote Link to comment Share on other sites More sharing options...
Ragnar Posted October 12, 2018 Author Share Posted October 12, 2018 3 minutes ago, Animefan8888 said: You can not make a custom set of armor without programming it. I do not mean without programming, I expressed myself poorly, I mean using only eclipse without other programs like the Techne Quote Link to comment Share on other sites More sharing options...
jabelar Posted October 12, 2018 Share Posted October 12, 2018 1 minute ago, Ragnar said: I do not mean without programming, I expressed myself poorly, I mean using only eclipse without other programs like the Techne Okay, in that case you just need to make your own layer model then intercept the vanilla layers with the rendering events. For making your own layer model, look at how LayerBipedArmor works and see if you can copy/modify that to your needs. Quote Check out my tutorials here: http://jabelarminecraft.blogspot.com/ Link to comment Share on other sites More sharing options...
Ragnar Posted October 12, 2018 Author Share Posted October 12, 2018 still unclear Quote Link to comment Share on other sites More sharing options...
jabelar Posted October 12, 2018 Share Posted October 12, 2018 Vanilla armor is done by LayerBipedArmor and related model classes. This is a render layer of the player (and other biped mobs that wear armor). For your custom armor you should copy those classes and modify the way you want for your own layer, then use events to add the layer during rendering. How "crazy" is your custom armor? Are you just modifying it a bit, or really different from vanilla? In any case, most Minecraft models are simply made up of "block" like shapes. So you don't really need a program like Techne. You can just draw it on a piece of paper and put in all the coordinates of the blocks directly into your code. And if you're just modifying the vanilla armor you already have that code to reference so should give you a great starting point. Quote Check out my tutorials here: http://jabelarminecraft.blogspot.com/ Link to comment Share on other sites More sharing options...
Ragnar Posted October 12, 2018 Author Share Posted October 12, 2018 my armor is not crazy, it's just blocks together Quote Link to comment Share on other sites More sharing options...
Ragnar Posted October 12, 2018 Author Share Posted October 12, 2018 Can you give me a sample code for a modified armor model? just to have a base please Quote Link to comment Share on other sites More sharing options...
Ragnar Posted October 13, 2018 Author Share Posted October 13, 2018 Can anyone help me with this? Quote Link to comment Share on other sites More sharing options...
jabelar Posted October 13, 2018 Share Posted October 13, 2018 We already told you where the sample code is. It is in the LayerBipedArmor class, that extends LayerArmorBase which also has code that might be useful for you. Quote Check out my tutorials here: http://jabelarminecraft.blogspot.com/ Link to comment Share on other sites More sharing options...
V0idWa1k3r Posted October 13, 2018 Share Posted October 13, 2018 Item already has a method that allows you to give your armor a custom model public net.minecraft.client.model.ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, EntityEquipmentSlot armorSlot, net.minecraft.client.model.ModelBiped _default) Just return your custom model there and it will be rendered instead of the default one. Quote Link to comment Share on other sites More sharing options...
Ragnar Posted October 14, 2018 Author Share Posted October 14, 2018 On 13/10/2018 at 02:33, jabelar said: Nós já lhe dissemos onde está o código de exemplo. Ele está na classe LayerBipedArmor, que estende o LayerArmorBase, que também possui código que pode ser útil para você. public class LayerBipedArmor extends LayerArmorBase<ModelBiped> { public LayerBipedArmor(RenderLivingBase<?> rendererIn) { super(rendererIn); } protected void initArmor() { this.modelLeggings = new ModelBiped(0.5F); this.modelArmor = new ModelBiped(1.0F); } @SuppressWarnings("incomplete-switch") protected void setModelSlotVisible(ModelBiped p_188359_1_, EntityEquipmentSlot slotIn) { this.setModelVisible(p_188359_1_); switch (slotIn) { case HEAD: p_188359_1_.bipedHead.showModel = true; p_188359_1_.bipedHeadwear.showModel = true; break; case CHEST: p_188359_1_.bipedBody.showModel = true; p_188359_1_.bipedRightArm.showModel = true; p_188359_1_.bipedLeftArm.showModel = true; break; case LEGS: p_188359_1_.bipedBody.showModel = true; p_188359_1_.bipedRightLeg.showModel = true; p_188359_1_.bipedLeftLeg.showModel = true; break; case FEET: p_188359_1_.bipedRightLeg.showModel = true; p_188359_1_.bipedLeftLeg.showModel = true; } } protected void setModelVisible(ModelBiped model) { model.setVisible(false); } @Override protected ModelBiped getArmorModelHook(net.minecraft.entity.EntityLivingBase entity, net.minecraft.item.ItemStack itemStack, EntityEquipmentSlot slot, ModelBiped model) { return net.minecraftforge.client.ForgeHooksClient.getArmorModel(entity, itemStack, slot, model); } } I do not see anything that does the model of the armor here Quote Link to comment Share on other sites More sharing options...
jabelar Posted October 14, 2018 Share Posted October 14, 2018 2 minutes ago, Ragnar said: I do not see anything that does the model of the armor here You need to follow the code from there. There is obviously a method there that gets the model and is even called getArmorModelHook(). That method returns a ModelBiped so you could just override to return your own custom model right there, but more correct to continue as VoidWalker mentions -- this method ends up calling the Item#getArmorModel() method. It is all related. There is a layer in the player model for armor. Assuming you want to replace the normal armor (instead of adding to it) you need the armor layer to find your model. The class code you are already looking at shows you where it gets that model from. So follow it from there. Quote Check out my tutorials here: http://jabelarminecraft.blogspot.com/ Link to comment Share on other sites More sharing options...
Ragnar Posted October 14, 2018 Author Share Posted October 14, 2018 For you, it's easy, you know how to program, you know how to speak English ... Quote Link to comment Share on other sites More sharing options...
jabelar Posted October 14, 2018 Share Posted October 14, 2018 Yes, it is a lot easier if you already know how to program because then the code "explains itself". Anyway, what you're asking probably has many tutorials. Custom armor is a common thing to do so I think there should be good tutorials already available. Possibly even in your own language. Did you Google search for tutorials on "custom armor". Quote Check out my tutorials here: http://jabelarminecraft.blogspot.com/ Link to comment Share on other sites More sharing options...
Ragnar Posted October 14, 2018 Author Share Posted October 14, 2018 is this right? @SideOnly(Side.CLIENT) public class ModelElectricBoots extends ModelBiped{ ModelRenderer rightLeg; ModelRenderer leftLeg; public ModelElectricBoots() { textureWidth = 64; textureHeight = 64; rightLeg = new ModelRenderer(this, 0, 32); rightLeg.addBox(10F, 1F, 10F, 6, 8, 8); setRotation(rightLeg, 1F, 2F, -1F); rightLeg.setTextureSize(64, 64); rightLeg.mirror = true; rightLeg.setRotationPoint(-1F, -2F, 1F); leftLeg = new ModelRenderer(this, 0, 32); leftLeg.addBox(10F, 1F, 10F, 6, 8, 8); setRotation(rightLeg, 1F, 2F, -1F); leftLeg.setTextureSize(64, 64); leftLeg.mirror = true; leftLeg.setRotationPoint(-1F, -2F, 1F); bipedRightLeg.addChild(rightLeg); bipedRightLeg.addChild(leftLeg); } public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scale) { super.render(entity, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scale); setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scale, entity); } public void setRotation(ModelRenderer model, float x, float y, float z) { model.rotateAngleX = x; model.rotateAngleY = y; model.rotateAngleZ = z; } } in armor class @SideOnly(Side.CLIENT) public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, EntityEquipmentSlot armorSlot, ModelBiped _default) { ModelElectricBoots electricBoots = new ModelElectricBoots(); return electricBoots; } Quote Link to comment Share on other sites More sharing options...
Animefan8888 Posted October 14, 2018 Share Posted October 14, 2018 8 minutes ago, Ragnar said: is this right? Does it work? Quote VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator. Link to comment Share on other sites More sharing options...
Ragnar Posted October 14, 2018 Author Share Posted October 14, 2018 the model does not appear, I do not know if it has to put in init, pre init or do something else Quote Link to comment Share on other sites More sharing options...
Ragnar Posted October 15, 2018 Author Share Posted October 15, 2018 Someone knows how to tell me Quote Link to comment Share on other sites More sharing options...
jabelar Posted October 15, 2018 Share Posted October 15, 2018 Okay, that looks like it might work (I didn't check the exact code, but the general idea looks like it should work.) So your "armor class" is your own class that extends ItemArmor? And you've registered that item (using the RegistryEvent<Item>)? Quote Check out my tutorials here: http://jabelarminecraft.blogspot.com/ Link to comment Share on other sites More sharing options...
Ragnar Posted October 15, 2018 Author Share Posted October 15, 2018 my class does not extend ItemArmor, how can I render the armor if it does not extend to ItemArmor? Quote Link to comment Share on other sites More sharing options...
Animefan8888 Posted October 15, 2018 Share Posted October 15, 2018 49 minutes ago, Ragnar said: my class does not extend ItemArmor, how can I render the armor As far as the game is concerned your item is not an armor piece. You will need a Layer Model like Jabelar said in his first post. Quote VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator. Link to comment Share on other sites More sharing options...
Recommended Posts
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.