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

Breezes ignore the deflects_projectiles entity type tag

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 24w21a
    • 24w03b, 24w06a, 1.20.6, 24w18a, 1.21 Release Candidate 1, 1.21
    • Confirmed
    • Data Packs, Mob behaviour
    • Normal
    • 1171610
    • Expansion B

      There are three projectile deflectors in Minecraft snapshot 24w03b: no deflection, simple deflection, and breeze deflection (simple with an added sound).

      Most entity types can have simple deflection enabled by being added to the deflects_projectiles entity type tag. However, breezes are special-cased to ignore the tag and use breeze deflection when the projectile is thrown or shot by a player.

      Thus, breezes ignore the deflects_projectiles entity type tag. If breezes are removed from the tag, they will still deflect with a custom sound. If they are in the tag, then they will not deflect non-player projectiles like other entities in the tag will.

      Steps to reproduce

      1. Create a data pack containing an empty minecraft:deflects_projectiles entity type tag with "replace": true.
      2. Enable/reload the data pack.
      3. Shoot an arrow at a breeze
      4. Notice that the breeze deflects the projectile.

      Code analysis (Yarn mappings)

      This bug can be fixed by calling the default implementation from within the BreezeEntity#getProjectileDeflector method (I'm not sure whether the fact that the breeze is in the tag means that removing the breeze from the tag should prevent the breeze's custom behavior, so if that is the case, then the tag check would have priority over the breeze deflection conditions).

            cojomax99 [Mojang] Cory Scheviak
            haykam haykam
            Votes:
            5 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: