Jump to content

Poulpinou

Members
  • Posts

    3
  • Joined

  • Last visited

Poulpinou's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Hello, I face the same problem. What's the current solution to animate armors with custom Model (without using GeckoLib) ?
  2. Thank you for your help! It works perfectly ? EDIT : I corrected following your advice. @Override public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadyaw, float headPitch, float scaleFactor) { this.setVisible(false); switch (this.slot) { case HEAD: bipedHead.showModel = true; if(entity instanceof EntityLivingBase) { EntityLivingBase playerCheck = (EntityLivingBase) entity; if(playerCheck.getItemStackFromSlot(EntityEquipmentSlot.CHEST).getItem().equals(MillenaireItems.raijin_chestplate) && playerCheck.getItemStackFromSlot(EntityEquipmentSlot.LEGS).getItem().equals(MillenaireItems.raijin_leggings) && playerCheck.getItemStackFromSlot(EntityEquipmentSlot.FEET).getItem().equals(MillenaireItems.raijin_boots)) { bipedBody.showModel = true; } } break; default: break; } super.render(entity, limbSwing, limbSwingAmount, ageInTicks, netHeadyaw, headPitch, scaleFactor); }
  3. I'm currently creating an armor with a custom model. Everything work fine, but I would like to make a part of the armor appear sonly if the player wears the full set. How can I do that? public class ItemCustomArmor extends ItemArmor { ... @Override @SideOnly(Side.CLIENT) public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, EntityEquipmentSlot armorSlot, ModelBiped _default) { if(!itemStack.isEmpty()) { if(itemStack.getItem() instanceof ItemArmor) { ModelBiped armorModel = getCustomArmorModel(0.0F, armorSlot, entityLiving); armorModel.setModelAttributes(_default); return armorModel; } } return null; } ... } public class ItemRaijinArmor extends ItemCustomArmor{ ... @Override public ModelBiped getCustomArmorModel(float scale, EntityEquipmentSlot slot, EntityLivingBase entityLiving) { return (ModelBiped)new ModelRaijinArmor(scale, slot); } ... } public class ModelRaijinArmor extends ModelBiped { private final EntityEquipmentSlot slot; private boolean fullSet = true; public ModelRenderer chestNecklace; public ModelRenderer flyA; public ModelRaijinArmor(float scale, EntityEquipmentSlot slot) { super(scale, 0, 64, 64); this.slot = slot; this.fullSet = ???????; switch (slot) { case CHEST: this.chestNecklace = new ModelRenderer(this, 0, 7); this.chestNecklace.setRotationPoint(0.0F, 0.0F, 0.0F); this.chestNecklace.addBox(-4.0F, 0.0F, -2.0F, 8, 5, 4, 0.1F); this.bipedBody = chestNecklace; if(this.fullSet) { this.flyA = new ModelRenderer(this, 45, 0); this.flyA.setRotationPoint(9.0F, 2.0F, 3.0F); this.flyA.addBox(-1.5F, -1.5F, 0.0F, 3, 3, 2, 0.0F); this.bipedBody.addChild(this.flyA); } default: break; } } @Override public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadyaw, float headPitch, float scaleFactor) { this.setVisible(false); switch (this.slot) { case CHEST: bipedBody.showModel = true; break; default: break; } super.render(entity, limbSwing, limbSwingAmount, ageInTicks, netHeadyaw, headPitch, scaleFactor); } } As you can see, I created a boolean fullSet that will take the value (isFullSet), but I don't know how to get this value... I would be glad to get some help!
×
×
  • Create New...

Important Information

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