Uploaded image for project: 'Minecraft (Bedrock codebase)'
  1. Minecraft (Bedrock codebase)
  2. MCPE-133481

Drowned And Piglins codebase for projectiles still work even if you replace the item with a non-projectile base item

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.17.2 Hotfix, 1.19.2 Hotfix, 1.19.10, 1.19.11 Hotfix, 1.20.1 Hotfix
    • None
    • Confirmed
    • Multiple
    • 651435

      Drowned and piglins seem to have an error with their coding in terms of the replaceitem command. The command in use when I want to replace their weapon (mainly a trident or crossbow) with air or any other item, they still shoot either arrows or their tridents at the player, as it feels like an overlook on the coding when looking at it at first glance. I wondered if it was, considering skeletons have multiple behaviors when having melee or projectile weapons, piglins and drowns should have a similar code regarding this since they can wield a crossbow/trident and a melee weapon (which for drowns are still trident when closer to the player).

      How to reproduce:

      1. Spawn a Drowned or a Piglin (Make sure you have one with either trident or crossbow)
      2. Use chat to execute a command or a command block
      3. do /replaceitem entity @e[type=(either drowned or piglin)] slot.weapon.mainhand 0 any item data if you want to place one
      4. Test it out in Survival regarding the issue

      UPDATE:

      The spawn events that switch the mobs from a ranged state to a melee state do not switch their events to the according state. Drowneds and Piglins do not follow that rule even if you continuously repeat the spawn event rendered in-game.

            FaraFar FaraFarX
            Votes:
            5 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              CHK: