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

Raiders cannot pick up ominous banner

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Resolution: Invalid
    • 1.18.1
    • None
    • Community Consensus
    • Raids

    Description

      What Happened

      • Raider can pick up ominous banner item dropped from anywhere(player in any gamemode/chests/mob loot/etc.) after leader's death.
      • But 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. Or any intension the game designer wishes to reach.

       

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

      Attachement javaw 2022-01-03 13-49-29-388_1.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();
          }
      } 

       

       

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:
                CHK: