More Armor Slots Mod Minecraft
admin 4/11/2022
- More Armor Slots Mod Minecraft
- More Armor Slots Mod Minecraft 1.14.4
- More Armor Slots Mod Minecraft 1.12.2
Introduction
More Armor Slots Mod Minecraft
Armor is basically just items that can be placed in reserved inventory slots. So most of the tips related to items applies to armor. I'll assume you're familiar with how to make items generally, including registering them, creating models and textures, etc.
I recommend the following: BedrockMiner's Custom Armor Tutorial
I recommend the following: BedrockMiner's Custom Armor Tutorial
Key Point: Many of the armor properties such as maxDamage ('durability'), damageReduceAmount, enchantability and toughness are actually set by the armor material. So you will generally want to create a custom material for any custom armor.
Making Armor Better Than Diamond
Thanks to Draco18s for this tip.
In versions prior to 1.10.2 you could not really make armor that was better than diamond without serious re-coding of the attack system. However, 1.10.2 introduced an 'armor toughness' property which allow you to make superior armor. For toughness, diamond armor has a rating of 2 and all other types are 0. The toughness is used in the damage taken calculation like this:
damageTaken = damageDealt*(1-min(20, max(defensePoints/5, defensePoints-damageDealt/(2+toughness/4)))/25)
The toughness is technically a property of a material, which is accessed by the Material.setToughness() and getToughness() methods. So to create a tougher armor you should create a custom armor material and then assign that to your armor when you construct it.
Use The ISpecialArmor Interface For Custom Armor
When creating custom armor, it is advised to make your armor class also implement the ISpecialArmor interface. This interface gives more control over how damage and durability work on the armor. There are three methods provided by the interface: damageArmor(), getArmorDisplay(), and getProperties(). There is Javadoc comments that help explain the use of each method.
With Visible Armor Slots Mod 1.11.2, 1.10.2, 1.9.4 you can access the armor and off-hand slots from several inventories. That means you can enchant, repair, craft or equip your armor without having to open and close the inventory multiple times. Download Minecraft Mods. Adds cosmetic armor slots. Get fashionable! Twitter Reddit News Minecraft Forums Author. Used by the Cosmetic Armor Slots mod. With this mod you can access the armor and off-hand slots from several inventories. That means you can enchant, repair, craft or equip your armor without having to open and close the inventory multiple times. Currently it only work for blocks, but in the future the mod will support entities like villagers, horses and minecarts.
How To Detect If Armor Or Armor Set Is Being Worn By Player
- So this mod well pretty much allow you to wear those 5 extra piece of armor on anything that usually takes all the slots, like the clean dirty suits, they take each body slot but with this mod that wont be happening anymore.
- So as I intend to use it in a modpack, I do not want to create an armor specifically for this, but rather make an item that stands apart in an extra slot of armor, so I can use other armor in addition to this item, using the atackspeed increased, because I do not like the combat system with delay of version 1.12.2, so I thought of something to.
To have continuous checking you can @Override your custom ItemArmor's onArmorTick() method. That method passes the EntityPlayer as a parameter, so you can use that and use the EntityPlayer methods for checking the armor slots.
Prior to 1.10.2, you could check armor with the EntityPlayer#getCurrentArmor() method. With the getCurrentArmor() method you pass in an int parameter that represents the armor slot (0 for boots, 1 for leggings, 2 for chestplate, and 3 for helmet).
In 1.10.2, it changes so you could use the EntityPlayer#getItemStackFromSlot() method and pass the EntityEquipmentSlot enum as parameter. So for example you could check the boots by getItemStackFromSlot(EntityEquipmentSlot.feet).
So with that, you can check if your custom armor is in a given slot. To check if a complete armor set is worn, you'd just logically AND the tests for your armor in each slot.
Prior to 1.10.2, you could check armor with the EntityPlayer#getCurrentArmor() method. With the getCurrentArmor() method you pass in an int parameter that represents the armor slot (0 for boots, 1 for leggings, 2 for chestplate, and 3 for helmet).
In 1.10.2, it changes so you could use the EntityPlayer#getItemStackFromSlot() method and pass the EntityEquipmentSlot enum as parameter. So for example you could check the boots by getItemStackFromSlot(EntityEquipmentSlot.feet).
So with that, you can check if your custom armor is in a given slot. To check if a complete armor set is worn, you'd just logically AND the tests for your armor in each slot.
Adding NBT Data To Armor
NBT data allows you to make an ItemStack unique. For example, it could be used store a special name for the armor, or it could store how much energy the armor has left, etc. Since, armor is just an item, then you can use NBT just like I describe in my tips on items.Setting Up Armor Models And Textures
This topic is already well covered by other tutorials. Check out TheGreyGhost's Item Rendering Tutorial.
For a continuous effect, there is a built-in method called onArmorTickUpdate() which runs every tick for every armor slot, passing the armor in as an Item. You can just check for your item then do desired code.
More Armor Slots Mod Minecraft 1.14.4
Sometimes you'll want armor to do a more 'one time' effect. For example, I've made Boots of Safe Falling that eliminate fall damage. In that case I did not use the armor tick method, but instead just checked for them in a LivingFallEvent handler.
More Armor Slots Mod Minecraft 1.12.2
If you need to check whether armor is equipped you can use the EntityPlayer's getCurrentArmor(slotNum).getItem() method. For this method, the slot numbering is 0 for boots, 1 for leggings, 2 for chestplate, 3 for helmet.