Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-106707

Thorns damage is applied when player shoots himself

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Works As Intended
    • None
    • Minecraft 16w35a
    • Confirmed

      The bug

      When a player shoots himself with a bow he will be damaged by his own thorns enchantment.

      How to reproduce

      1. Use the following command and equip the chestplate
        /give @p minecraft:diamond_chestplate 1 0 {ench:[{id:7s,lvl:32767s}]}
        
      2. Shoot yourself
        → Your chestplate will break and you will die because of the thorns damage

      Possible solution

      The following is based on a decompiled version of Minecraft 1.10 using MCP 9.30.

      This could probably be tested in the methods net.minecraft.enchantment.EnchantmentHelper.applyThornEnchantments(EntityLivingBase, Entity) (better?) or net.minecraft.enchantment.EnchantmentThorns.onUserHurt(EntityLivingBase, Entity, int).

            Excited Maria Lemón
            marcono1234 Marcono1234
            Votes:
            5 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: