Diamond Bandits

Short Summary Carry diamonds and attract bandits. Every 30 seconds, zombies raid you based on the number of diamonds in your inventory. More diamonds mean stronger enemies. Features boss bar timers, multiplayer support, and custom raid scaling. Korean

Diamond Bandits — Minecraft Java 1.21.4

Installation

Place the ZIP file directly into your world's datapacks folder without extracting it, then run /reload.

When updating, remove the old Diamond_Bandits ZIP and keep only the Smooth_Retreat ZIP.

Works in Survival or Adventure mode on Easy, Normal, and Hard difficulty.

Operator permissions are required to use commands.

This datapack is separate from the previously released Thief Villager datapack. If you do not want thief villagers, stop and remove that datapack.

Raid Composition

(Armor always includes helmet, chestplate, leggings, and boots.)

1–2 Diamonds

  • 1–3 regular zombies (no armor, no weapons)

3–4 Diamonds

  • 1–2 zombies with leather armor and wooden swords
  • 2–3 regular zombies

5–6 Diamonds

  • 2–3 zombies with leather armor and wooden swords
  • 1–2 zombies with iron armor and iron swords

7+ Diamonds

  • 2–3 zombies with iron armor and iron swords
  • 2 zombies with diamond armor and diamond swords

The number of each unit type is chosen randomly within the listed range.

Enemy types from previous stages do not carry over into higher stages.

Rules

  • Once a player obtains at least 1 diamond, a personal 600-tick (30-second) countdown begins.
  • The boss bar displays the remaining time and the current diamond count.
  • While carrying diamonds, raids repeat every 30 seconds.
  • The raid composition is determined by the diamond count at the moment the raid begins.
  • If the diamond count drops to 0, the timer resets and the boss bar disappears.
  • Only diamonds carried in the player's inventory, including the off-hand, are counted.
  • Diamonds inside chests, Ender Chests, Shulker Boxes, bundles, diamond blocks, and diamond equipment are ignored.
  • Diamonds are never consumed.
  • Creative mode, Spectator mode, death, or Peaceful difficulty reset the timer and stop raids.
  • When a raid starts, "Bandits have appeared" is displayed in chat and on the center of the screen.
  • When reaching a higher diamond tier, a warning message is shown once:

1 Diamond:
"A threat can be felt."

3 Diamonds:
"A greater threat can be felt."

5 Diamonds:
"There may be no easy opponents."

7+ Diamonds:
"It seems wise to prepare thoroughly."

  • If multiple tiers are skipped at once, only the highest reached warning is shown.
  • Warnings are not repeated while remaining in the same tier.
  • If the player drops below a tier and later reaches it again, the warning is shown again.
  • If a warning and a raid occur at the same time, the warning appears first, followed by the raid notification.
  • Bandits still spawn on schedule even when notifications overlap. 
  • Spawning and Combat Behavior

    • Bandits attempt to spawn roughly 7–9 blocks away from the player.
    • The datapack checks for valid ground and headroom within a vertical range of 4 blocks.
    • If a spawn location is blocked by walls, lava, or other obstacles, another nearby location is tried.
    • If all possible locations are blocked, that bandit is skipped.
    • Bandits are adult zombies using normal zombie pathfinding and attacks.
    • They may attack nearby players, villagers, and other valid targets.
    • All bandits have a permanent Glowing effect.
    • Existing bandits from previous versions also receive the effect after updating.
    • A bandit's combat tier is locked when it spawns.
    • Dropping diamonds after a raid begins will not weaken already spawned bandits.

    Tier Statistics

    1–2 Diamonds

    • Standard pursuit
    • Movement speed attribute: 0.23
    • Follow range: 32 blocks

    3–4 Diamonds

    • Slightly faster movement
    • Movement speed attribute: 0.25
    • Follow range: 40 blocks
    • Small knockback resistance

    5–6 Diamonds

    • Faster pursuit
    • Movement speed attribute: 0.28
    • Follow range: 56 blocks
    • 25% knockback resistance

    7+ Diamonds

    • Fast pursuit
    • Movement speed attribute: 0.30
    • Follow range: 64 blocks
    • 40% knockback resistance
    • Charges toward nearby players for 1 second approximately every 5 seconds
    • Charge speed attribute: 0.38
    • The old sideways teleport movement that occasionally interrupted pursuit has been removed.
    • Normal chasing now uses vanilla zombie pathfinding.

    Retreat System

    • Bandits spawned in the 7+ diamond tier will retreat when:
      • Their health is 6/20 or lower
      • A player is within 10 blocks
    • This applies to both iron-equipped and diamond-equipped bandits.
    • Retreat lasts up to 4 seconds.
    • Retreat ends early if the player moves more than 12 blocks away.
    • After retreating, bandits continue fighting for 5 seconds before they are allowed to retreat again.

    Retreat Mechanics

    • During retreat, the datapack checks terrain and obstacles.
    • Bandits move away from the player using opposite or angled directions.
    • No teleportation is used.
    • No health regeneration is granted.
    • Retreat can fail if walls or terrain block the escape route.

    Technical Notes

    • Movement attributes are not direct blocks-per-second values.
    • Normal collision and gravity remain active during retreat.
    • This is not a custom AI engine replacing vanilla pathfinding.
    • Bandits cannot break blocks or doors.
    • Bandits cannot move through walls.
    • Complex terrain is still subject to vanilla zombie pathfinding limitations.

    Updating

    • Existing bandits are assigned a combat tier based on their armor when updating.
    • Newly spawned bandits use the exact diamond-count tier system.

    Equipment and Daylight

    • Bandits receive Fire Resistance so they do not immediately burn to death during the day.
    • Zombies may still visually appear on fire in sunlight, but they will not take fire damage.
    • Armor worn by equipped bandits does not lose durability from sunlight.
    • Weapons and armor given by the datapack do not drop when bandits die.

    Multiplayer and Dimensions

    • Bandits from previous raids remain until defeated.
    • New raids can occur even if older bandits are still alive.
    • In multiplayer, each player has an independent diamond count and timer.
    • Works in the Overworld, Nether, End, and custom dimensions containing players     
    • Commands

      /function diamond_bandits:test
      Immediately starts a raid using your current diamond count.
      (Usable by Survival and Adventure mode players.)

      /function diamond_bandits:stop
      Stops new raids and hides the boss bar.

      /function diamond_bandits:start
      Resets the timer and restarts the system.

      /function diamond_bandits:cleanup
      Removes bandits from loaded chunks.
      (Naturally spawned zombies are not affected.)

      Removal

      Run:

      /function diamond_bandits:stop

      and

      /function diamond_bandits:cleanup

      Then close the world and remove the datapack ZIP file.

      Bandits in unloaded chunks may remain, so visit those areas and run cleanup if necessary.

      Verification

      Datapack Format: 61 (Minecraft Java 1.21.4)

      Tested on an official Minecraft Java 1.21.4 local server with an automated client.

      Verified features include:

      • Timer behavior from acquisition through 600 ticks

      • Reset when diamond count reaches zero

      • Timer persistence when diamond counts change

      • Raid composition and quantity ranges for 1, 2, 3, 4, 5, 6, 7, and 64 diamonds

      • Equipment loadouts for all four enemy types

      • Ground spawning validation

      • Daylight survival

      • Real combat damage against players

      • Off-hand diamond counting

      • Exclusion of diamonds stored inside Shulker Boxes

      • Peaceful and Creative mode interruption

      • Prevention of spawning inside walls

      • Boss bar delivery

      • Center-screen notifications

      • All four warning messages

      • Duplicate warning prevention

      • Notification ordering during overlapping events

      • Glowing effect on all enemy types

      • Tier-specific movement speed, follow range, and knockback resistance

      • Charge start and end behavior

      • Removal of teleport-based movement

      • Health threshold at 6/20

      • Retreat behavior for the 7+ diamond tier

      • Increased retreat distance

      • Re-engagement after retreat

      • Wall collision handling

      • Temporary entity cleanup

      Visual inspection of the rendered game screen was not performed.

      Compatibility target: Minecraft Java Edition 1.21.4 Datapack Version 61.

    •  

      다이아 강도 — Minecraft Java 1.21.4

      설치
      ZIP을 풀지 않고 월드의 datapacks 폴더에 넣은 뒤 /reload 를 실행하세요.
      업데이트할 때는 기존 Diamond_Bandits ZIP을 제거하고 Smooth_Retreat ZIP 하나만 넣으세요.
      서바이벌 또는 모험 모드, 쉬움/보통/어려움 난이도에서 동작합니다.
      명령어 실행에는 권한이 필요합니다.
      이 데이터팩은 앞서 만든 도둑 주민 데이터팩과 별개입니다. 도둑 주민을 원하지 않으면 기존 팩을 중지하고 제거하세요.

      습격 구성 (갑옷은 머리/가슴/다리/발 전체)
      다이아 1~2개: 일반 좀비 1~3마리 (갑옷/무기 없음)
      다이아 3~4개: 가죽 갑옷 + 나무검 좀비 1~2마리, 일반 좀비 2~3마리
      다이아 5~6개: 가죽 갑옷 + 나무검 좀비 2~3마리, 철 갑옷 + 철검 좀비 1~2마리
      다이아 7개 이상: 철 갑옷 + 철검 좀비 2~3마리, 다이아 갑옷 + 다이아검 좀비 2마리
      범위 안에서 각 병종의 수를 무작위로 결정합니다. 이전 단계의 병종이 누적되지는 않습니다.

      규칙
      - 인벤토리에 다이아몬드가 1개 이상 생기면 개인별 600틱(정상 속도에서 30초) 카운터가 시작됩니다.
      - 보스바에 남은 시간과 현재 다이아몬드 수량을 표시합니다.
      - 보유 중에는 30초마다 반복됩니다. 실제 등장 구성은 등장하는 순간의 수량으로 정합니다.
      - 다이아몬드가 0개가 되면 카운터는 초기화되고 보스바가 숨겨집니다.
      - 보조 손을 포함한 소지 다이아몬드만 셉니다. 상자/엔더 상자/셜커 상자/꾸러미 속 내용물과 다이아 블록, 다이아 장비는 제외합니다.
      - 다이아몬드는 검사만 하며 소비하지 않습니다.
      - 크리에이티브, 관전자, 사망 상태, 평화로움에서는 카운터를 초기화하고 습격을 멈춥니다.
      - 등장하면 화면 중앙과 채팅에 “강도가 나타났다”를 표시합니다.
      - 보유 단계가 올라갈 때 화면 중앙에 다음 문구를 한 번 표시합니다. 한꺼번에 여러 단계를 넘으면 도달한 단계의 문구만 표시합니다.
        1개: 위협이 느껴진다
        3개: 더 큰위협이 느껴진다
        5개: 쉬운상대는 없을거 같다
        7개 이상: 만만의 준비가 필요할거 같다
      - 같은 단계 안에서는 경고를 반복하지 않습니다. 단계가 낮아졌다 다시 올라가면 해당 경고를 다시 표시합니다.
      - 단계 경고와 습격이 겹치면 경고를 먼저 보여 주고 습격의 중앙 알림을 뒤에 표시합니다. 강도 생성과 채팅 알림은 제시간에 진행합니다.
      - 대략 7~9블록 떨어진 주변 지점에서 위아래 4블록 범위의 발판과 머리 공간을 검사합니다.
      - 벽/용암 등으로 등장할 자리가 없으면 다른 주변 지점을 시도합니다. 모두 막혔으면 해당 강도는 생략됩니다.
      - 강도는 성인 좀비이며 일반 좀비의 길찾기와 공격을 사용합니다. 가까운 다른 플레이어/주민 등을 공격할 수 있습니다.
      - 모든 강도는 지속적인 발광 효과가 있습니다. 업데이트 전에 등장했던 강도에도 적용됩니다.
      - 전투 단계는 등장 시 보유량으로 고정됩니다. 다이아를 버려도 이미 등장한 강도가 약해지지 않습니다.
      - 1~2개: 기본 추격 (이동 속성 0.23, 추적 범위 32).
      - 3~4개: 조금 빠르고 더 멀리 추격 (0.25 / 40), 약한 밀치기 저항.
      - 5~6개: 더 빠른 기본 길찾기 추격 (0.28 / 56), 밀치기 저항 25%.
      - 7개 이상: 빠른 추격 (0.30 / 64), 밀치기 저항 40%, 근처 플레이어를 향해 약 5초 주기로 1초 동안 돌진(이동 속성 0.38).
      - 이동이 끊기던 측면 순간이동은 제거했습니다. 일반 추격은 기본 좀비 길찾기를 사용합니다.
      - 7개 단계에서 등장한 강도는 체력 6/20 이하이고 플레이어가 10블록 안에 있으면 후퇴합니다. 철/다이아 무장 모두 해당합니다.
      - 후퇴는 최대 4초이며, 플레이어가 12블록 이상 멀어지면 일찍 끝납니다. 이후 5초 동안은 다시 싸우며 바로 후퇴를 반복하지 않습니다.
      - 도주 시 바닥과 장애물을 확인하고 반대 방향/비스듬한 방향으로 이동 속도를 가합니다. 위치 순간이동과 체력 회복은 없습니다. 벽으로 막힌 곳에서는 도주가 막힐 수 있습니다.
      - 이동 속성은 초당 블록 수가 아닙니다. 도주 중에도 기본 충돌과 중력 처리를 유지합니다.
      - 기본 길찾기를 대체하는 새 AI 엔진은 아닙니다. 문/블록을 부수지 않고 벽을 통과하지 않으며, 복잡한 지형에서는 기본 좀비 길찾기의 제한을 받습니다.
      - 기존 강도의 전투 단계는 업데이트할 때 갑옷 종류로 추정합니다. 새로 소환한 강도부터 정확한 소지량 단계가 적용됩니다.
      - 낮에도 바로 타죽지 않도록 화염 저항을 부여합니다. 일반 좀비는 햇빛에 불붙는 모습이 보일 수 있지만 불 피해로 죽지 않습니다.
      - 무장 강도의 갑옷은 햇빛에 닳지 않습니다. 강도의 지급 무기와 갑옷은 드롭하지 않습니다.
      - 이전 습격의 강도는 다음 습격까지 남습니다. 멀티플레이는 각 플레이어의 수량과 타이머로 따로 계산합니다.
      - 오버월드/네더/엔드 및 플레이어가 있는 사용자 정의 차원에서 동작합니다.

      명령어
      /function diamond_bandits:test     현재 소지량으로 즉시 한 번 습격 (서바이벌/모험 플레이어가 실행)
      /function diamond_bandits:stop     새 습격 중지 및 보스바 숨기기
      /function diamond_bandits:start    타이머를 초기화하고 다시 시작
      /function diamond_bandits:cleanup  불러온 청크의 강도 제거 (일반 자연 생성 좀비는 유지)

      제거
      stop, cleanup을 실행한 뒤 월드를 종료하고 이 데이터팩 ZIP을 제거하세요.
      불러오지 않은 청크의 강도는 남을 수 있으므로 해당 지역에서 cleanup을 실행하세요.

      검증 기준
      데이터팩 형식: 61 (Java 1.21.4)
      공식 1.21.4 로컬 서버 + 자동 접속 클라이언트에서 다음을 확인했습니다.
      - 획득 후 첫 틱부터 600틱까지의 타이머, 0개 초기화, 수량 변경 시 타이머 유지
      - 1/2/3/4/5/6/7/64개별 각 3회 습격의 병종과 수량 범위
      - 네 병종의 장비와 지상 소환, 낮에 생존, 플레이어에게 접근하여 실제 피해 발생
      - 보조 손 포함, 셜커 상자 내부 제외, 평화로움/크리에이티브 중지, 벽 안 소환 방지
      - 클라이언트의 중앙 알림 및 보스바 수신
      - 네 단계의 정확한 경고 문구, 중복 방지, 습격 알림과 겹칠 때 표시 순서
      - 모든 병종의 발광, 단계별 이동/추적/밀치기 저항, 돌진 시작/종료
      - 이동 순간이동 제거, 체력 6/20 경계, 7개 단계 한정 도주, 거리 증가, 재추격, 벽 충돌 및 임시 엔티티 정리
      그래픽 클라이언트의 화면을 시각적으로 검사한 것은 아닙니다.
      https://www.minecraft.net/en-us/article/minecraft-java-edition-1-21-4

       

Diamond Bandits Team

profile avatar
Owner
  • 3
    Projects
  • 9
    Downloads

More from musang2

  • Random Mob per Block Placement project image

    Random Mob per Block Placement

    Every block you place summons a random mob. One of 83 Minecraft 1.21.4 mobs is selected with equal probability, including bosses such as the Wither, Ender Dragon, and Warden. Mobs spawn directly above the placed block. Supports multiplayer. Korean

    • 3
    • October 8, 2026
  • Thief Villager Datapack-korean project image

    Thief Villager Datapack-korean

    A thief villager appears every 30 seconds and steals a random item stack from your inventory. Catch it within 10 seconds to recover your items, or lose them forever. Supports multiplayer, all vanilla dimensions, and multiple languages including Korean.

    • 3
    • October 7, 2026
  • Random Mob per Block Placement project image

    Random Mob per Block Placement

    Every block you place summons a random mob. One of 83 Minecraft 1.21.4 mobs is selected with equal probability, including bosses such as the Wither, Ender Dragon, and Warden. Mobs spawn directly above the placed block. Supports multiplayer. Korean

    • 3
    • October 8, 2026
  • Thief Villager Datapack-korean project image

    Thief Villager Datapack-korean

    A thief villager appears every 30 seconds and steals a random item stack from your inventory. Catch it within 10 seconds to recover your items, or lose them forever. Supports multiplayer, all vanilla dimensions, and multiple languages including Korean.

    • 3
    • October 7, 2026