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

Raiders cannot pick up ominous banner if leader is removed from raid without dying

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.18.1, 23w35a, 1.20.5 Pre-Release 4
    • Confirmed
    • Raids
    • Low
    • Gameplay

      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 intention the game designer wishes to reach.

      Attachment CorrectBehaviour(and_banner_dropped_by_player_is_pickable).mp4 shows raiders can correctly pick up ominous banner items after leader's death.

      Attachment javaw 2022-01-03 13-49-29-388_1.mp4 shows 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 updates 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:
            3 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              CHK: