difficulty 8 bypass unbreaking enchantment

Discussion in 'Empire Help & Support' started by Beezart, Feb 7, 2016.

  1. In smp4, I have a unbreaking 3 diamond boot.
    I went out to fight some mob.
    In difficulty 8, item take 2x durability.
    I got hit for a total of 20 times, so my boot now have take 429-389=40 durability.
    According to the wiki, unbreaking 3 have 75% chance to take no durability when used.
    So (1-0.75)x40=10, my boot should only take 10 durability.
    But my boot took 40 durability in difficulty 8.
    Difficulty 8 bypassed unbreaking enchantment.
    We can test that if you need proof.
  2. Please read the tooltip text of Diff 8 through 10. This is working as intended.

    Also EMC's Unbreaking formula is modified from Vanilla.

    Code:
    int j = EnchantmentManager.getEnchantmentLevel(Enchantment.DURABILITY.id, this);
    int k = 0;
    
    j = Math.min(5, j); // EMC
    for (int l = 0; j > 0 && l < i; ++l) {
        // EMC start - make Unbreaking scale to level for armor. 5 = 80% chance of no loss.
        if (getItem() instanceof ItemArmor) {
            if (random.nextFloat() >= 1 - (.8 * (j / 5))) {
                k++;
            }
            continue;
        }
        // EMC end
    It takes Unbreaking 5 to get 80%, so 3 will not give 75%

    Also the wiki is wrong on Vanilla Unbreaking, as there is a 60% chance that Unbreaking doesn't even kick in for armor on vanilla, and then if it does kick in, its random again from there:

    This is vanilla logic:
    return itemstack.getItem() instanceof ItemArmor && random.nextFloat() < 0.6F ? false : random.nextInt(i + 1) > 0;
    Roslyn likes this.
  3. Should it completely ignore unbreaking?
  4. It does not ignore unbreaking. You're misunderstanding how unbreaking works (due to bad information on the Minecraft Wiki). Unbreaking works PER DAMAGE POINT. It is not a % chance to take no damage at all.

    On EMC, Unbreaking 3 has a 48% chance per point.

    So if an item was to take 10 damage in 1 hit, you could expect 5 damage with unbreaking 3 on average. On Unbreaking 5, it would average 2 damage points.

    Then, on Difficulty 8, damage is x2, so you will instead take the original 10 damage.

    Again, EMC unbreaking is actually more powerful than Vanilla - The wiki is just flat out wrong.

    It's 75% * 40% = 30% for Unbreaking 3 in Vanilla. EMC Unbreaking 2 is actually more powerful than Vanilla 3.
  5. No, it still completely ignore the enchantment.
    I changed my difficulty to 7 so there will not be 2x durability taken.
    Before I went to fight, my un-enchanted iron legging has 11 more durability than my unbreaking 3 diamond boot.


    After a fight, my iron legging still have 11 more durability than my diamond boot.(I hugged like 10 creeper)


    A creeper does 1-4 damage to armour.
    In EMC, you said my boot should only take about half of durability compared to my legging, because creeper does more than 1 damage to armour, it should work.
    But it is not true.