This site works best with JavaScript enabled. Please enable JavaScript to get the best experience from this site.
I am working on a mod and I have got everything done so far but adding the repair items for the anvil.
I have added a new ore, two ingots, two metal blocks, two suits of armor, two sets of tools and weapons, and two molten metals.
I have set the repair item like so in the armor:
Although in game it does not repair my armor item:
Here is the mod src:
https://www.dropbox.com/s/sll48qp5v9mkpv1/example src 1.12.2.zip?dl=0
If anyone knows how to add repair items for 1.12.2 and can either give me the information as to how to do it or update the src so I know how to do it that would be great.
set the repair item when you register the armor material, by adding
.setRepairItem(new ItemStack(mod_items.ALUMINUM_INGOT));
"You know you're joke is good when you have to explain it to everyone."
Quote from FieryBurningMarshmallows» set the repair item when you register the armor material, by adding .setRepairItem(new ItemStack(mod_items.ALUMINUM_INGOT));
Alright where do I add that to this in order for it to work, that is the part I am confused on:
package aku.example.base_classes; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.SoundEvents; import net.minecraft.inventory.EntityEquipmentSlot; import net.minecraft.item.ItemArmor; import net.minecraft.item.ItemStack; import net.minecraft.world.World; import net.minecraftforge.common.util.EnumHelper; public class armor_base_aluminum extends ItemArmor { public static ItemArmor.ArmorMaterial ALUMINUM_ARMOR_MATERIAL = EnumHelper.addArmorMaterial("aku:aluminum_armor", "aku:aluminum", 4, new int[]{1, 2, 3, 2}, 9, SoundEvents.ITEM_ARMOR_EQUIP_IRON, 0.0F); public armor_base_aluminum(String name, int renderIndexIn, EntityEquipmentSlot equipmentSlotIn) { super(ALUMINUM_ARMOR_MATERIAL, renderIndexIn, equipmentSlotIn); this.setMaxDamage(2432); this.setRegistryName(name); this.setUnlocalizedName(name); } public void onArmorTick(World world, EntityPlayer player, ItemStack item) { } }
I am working on a mod and I have got everything done so far but adding the repair items for the anvil.
I have added a new ore, two ingots, two metal blocks, two suits of armor, two sets of tools and weapons, and two molten metals.
I have set the repair item like so in the armor:
Although in game it does not repair my armor item:
Here is the mod src:
https://www.dropbox.com/s/sll48qp5v9mkpv1/example src 1.12.2.zip?dl=0
If anyone knows how to add repair items for 1.12.2 and can either give me the information as to how to do it or update the src so I know how to do it that would be great.
set the repair item when you register the armor material, by adding
.setRepairItem(new ItemStack(mod_items.ALUMINUM_INGOT));
"You know you're joke is good when you have to explain it to everyone."
Alright where do I add that to this in order for it to work, that is the part I am confused on: