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

Raiders cannot pick up ominous banner

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • None
    • 1.18.1
    • Confirmed
    • (Unassigned)

      What Happened

      • Raiders can't pick up ominous banner if the leader is removed not because of death.

      Expected Behavior

      • Raiders can pick up ominous banners if the leader is removed for any reason.
      • MC-247440 shouldn't be marked as invalid because it reports the same bug.

       

      Attachement CorrectBehaviour(and_banner_dropped_by_player_is_pickable).mp4shows raiders can courrectly pick up ominous banner items after leader's death.

      Attachement WrongBehavour.mp4shows raiders can't pick up ominous banner item(but still pathfind to it) if the leader is removed not because of death.

       

      This is because removeFromRaid() method only update groupRaiderMap but leaders are stored in groupToLeaderMap.

       

      // net.minecraft.world.entity.raid.Raid
      public void removeFromRaid(Raider raider, boolean bl) {
          boolean bl2;
          Set<Raider> set = this.groupRaiderMap.get(raider.getWave());
          if (set != null && (bl2 = set.remove(raider))) {
              if (bl)
      {             this.totalHealth -= raider.getHealth();         }
              raider.setCurrentRaid(null);
              this.updateBossbar();
              this.setDirty();
          }
      } 

       

       

            Unassigned Unassigned
            Youmiel Youmiel
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: