Jump to content

[1.8] Using ISpecialArmor without Armor material


Dr_Schnauzer

Recommended Posts

I'm stucked now for a while, cause I don't know how I have to use the ISpecialArmor getProperties() to let the armor work like it has a armor material, that defines the damage reduction. I've tried this, but it doesn't seem to work when I compare it to normal armor.

 

@Override
    public ArmorProperties getProperties(EntityLivingBase player, ItemStack armor, DamageSource source, double damage, int slot) {
        if(armor.getTagCompound() != null) {
            ArmorValues values = ArmorValues.readFromNBT(armor);
            return new ArmorProperties(0, values.getResistance() / 25.0D, values.getResistance());
        }
        return new ArmorProperties(0, 0, 0);
    }

 

The problem why I can't use a armor material is, that the armor is different in the damage reduction depending on the crafting.

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

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