Skip to content
TheChatArchiveThe Chat Archive
Geminigemini-2.5-flash· GoogleHugging Face LMArena Human Preference 140K

마인크래프트 1.20.2 맨헌트에서 다이아 들고 F키를 누르면 다이아 1개가 소모되고 도망자 방향으로 쭉 길게 파티클이 잠시동안 나왔다가 사라지는 데이터팩을…

From a Chatbot Arena battleThe same person sent this prompt to two anonymous models at once. Compare it with Mistralmistral-medium-2505’s answer.
  1. User

    마인크래프트 1.20.2 맨헌트에서 다이아 들고 F키를 누르면 다이아 1개가 소모되고 도망자 방향으로 쭉 길게 파티클이 잠시동안 나왔다가 사라지는 데이터팩을 만들어줘. 도망자 말고 추격자만 사용이 가능해야해

  2. Gemini Assistant

    마인크래프트 1.20.2 버전에서 맨헌트 (Manhunt) 상황을 가정한, 다이아몬드를 사용하여 도망자의 위치를 추적하는 데이터팩을 만들어드리겠습니다.

    중요 알림:

    • F키 직접 감지 불가능: 마인크래프트 데이터팩만으로는 F키(오프핸드 교체) 단독 누름을 직접적으로 감지할 수 없습니다. 대신, 추적 다이아몬드 아이템을 들고 우클릭하는 방식으로 구현됩니다. (F키를 누르면 아이템이 오프핸드로 가기 때문에, 데이터팩은 아이템의 "사용"을 감지하지 못합니다.)
    • 리소스팩 필요: carrot_on_a_stick 아이템을 다이아몬드처럼 보이게 하려면 리소스팩이 필요합니다. 리소스팩 없이 사용하면 막대기에 당근이 달린 아이템으로 보이지만 기능은 동일하게 작동합니다.

    📦 데이터팩 및 리소스팩 구성

    이 기능을 사용하기 위해 다음 두 가지를 만들어야 합니다:

    1. 데이터팩 (Manhunt Tracker): 실제 기능 구현
    2. 리소스팩 (Tracker Diamond Texture): 추적 아이템의 외형 변경 (선택 사항이지만 권장)

    1. 데이터팩 (Manhunt Tracker)

    manhunt_tracker.zip 이라는 이름으로 압축할 폴더 구조입니다.

    manhunt_tracker/
    ├── pack.mcmeta
    └── data/
        ├── minecraft/
        │   └── tags/
        │       └── functions/
        │           ├── load.json
        │           └── tick.json
        └── manhunt_tracker/
            ├── functions/
            │   ├── activate_tracker.mcfunction
            │   ├── draw_beam.mcfunction
            │   ├── draw_beam_segment.mcfunction
            │   └── setup.mcfunction
            └── advancements/
                └── tracker_usage.json
    

    pack.mcmeta (데이터팩 정보)

    {
      "pack": {
        "pack_format": 18,
        "description": "Manhunt Tracker Datapack for 1.20.2"
      }
    }
    

    data/minecraft/tags/functions/load.json (월드 로드 시 실행)

    {
      "values": [
        "manhunt_tracker:setup"
      ]
    }
    

    data/minecraft/tags/functions/tick.json (매 틱마다 실행)

    {
      "values": [
        "manhunt_tracker:tick"
      ]
    }
    

    data/manhunt_tracker/functions/setup.mcfunction (초기 설정)

    # 팀 생성 (이미 있다면 오류 없이 넘어감)
    team add hunter
    team add runner
    
    # 추적 감지 스코어보드 생성
    scoreboard objectives add tracker_use used:carrot_on_a_stick
    say 맨헌트 추적 데이터팩이 로드되었습니다!
    say 사냥꾼은 '/function manhunt_tracker:give_tracker' 명령어로 '추적 다이아몬드'를 얻을 수 있습니다.
    say 이 아이템을 우클릭하면 인벤토리의 다이아몬드 1개를 소모하고 도망자 방향으로 추적 파티클을 생성합니다.
    

    data/manhunt_tracker/functions/tick.mcfunction (매 틱마다 실행, 추적기 사용 감지) 이 파일은 직접 만들지 않고, tracker_usage.json 발전과제 (Advancement)를 통해 기능을 실행합니다. tick.json에서 manhunt_tracker:tick은 필요 없습니다. 위에 data/minecraft/tags/functions/tick.json 내용은 삭제하거나, 아무것도 없는 빈 tick.mcfunction 파일을 만들어도 됩니다. 정정: tick.mcfunction은 필요합니다. tracker_use 스코어보드를 초기화해야 합니다.

    data/manhunt_tracker/functions/tick.mcfunction (매 틱마다 실행, 추적기 사용 감지 및 스코어보드 초기화)

    # 추적기 사용 스코어보드 초기화
    # 이것이 없으면 아이템을 한 번만 사용해도 계속 스코어가 1 이상으로 유지되어 매 틱마다 작동할 수 있습니다.
    # 하지만 아래 activate_tracker가 발전과제에 의해 직접 호출되므로, 이 스코어보드는 trigger용으로만 사용되며 굳이 매 틱 초기화할 필요는 없습니다.
    # scoreboard players reset @a tracker_use
    # 대신, 발전과제 기반이므로 이 파일은 필요 없습니다.
    # (이 주석 블록 전체를 삭제해도 됩니다. `data/minecraft/tags/functions/tick.json`에서 "manhunt_tracker:tick"도 삭제해야 합니다.)
    

    최종 결정: tick.mcfunction 파일은 실제로 필요 없습니다. tracker_usage.json 발전과제가 function을 직접 호출합니다. data/minecraft/tags/functions/tick.json에서 manhunt_tracker:tick을 삭제하고, data/manhunt_tracker/functions/tick.mcfunction 파일을 만들지 마세요.

    data/manhunt_tracker/advancements/tracker_usage.json (추적 다이아몬드 사용 감지) 이 발전과제는 플레이어가 manhunt_tracker:1b NBT 태그를 가진 carrot_on_a_stick 아이템을 사용할 때 activate_tracker 함수를 실행합니다.

    {
      "criteria": {
        "used_tracker_diamond": {
          "trigger": "minecraft:player_interacted_with_entity",
          "conditions": {
            "player": {
              "nbt": "{SelectedItem:{id:'minecraft:carrot_on_a_stick',tag:{manhunt_tracker:1b}}}"
            }
          }
        }
      },
      "rewards": {
        "function": "manhunt_tracker:activate_tracker"
      },
      "parent": "minecraft:story/root"
    }
    

    참고: player_interacted_with_entity 트리거는 엔티티를 우클릭했을 때 발동합니다. item_used_on_block은 블록을 우클릭했을 때 발동합니다. 맨땅에 우클릭하는 것을 포함하려면 player_interacted_with_entity나 item_used_on_block만으로는 충분하지 않습니다. 가장 광범위한 "사용"을 감지하는 것은 minecraft.used:minecraft.carrot_on_a_stick 스코어보드를 활용하는 것입니다. 다시 스코어보드 방식으로 회귀하겠습니다.

    data/manhunt_tracker/functions/setup.mcfunction (수정된 초기 설정)

    # 팀 생성 (이미 있다면 오류 없이 넘어감)
    team add hunter
    team add runner
    
    # 추적 감지 스코어보드 생성 (carrot_on_a_stick 사용 감지)
    scoreboard objectives add tracker_use used:carrot_on_a_stick
    say 맨헌트 추적 데이터팩이 로드되었습니다!
    say 사냥꾼은 '/function manhunt_tracker:give_tracker' 명령어로 '추적 다이아몬드'를 얻을 수 있습니다.
    say 이 아이템을 우클릭하면 인벤토리의 다이아몬드 1개를 소모하고 도망자 방향으로 추적 파티클을 생성합니다.
    

    data/minecraft/tags/functions/tick.json (수정된 매 틱마다 실행)

    {
      "values": [
        "manhunt_tracker:tick"
      ]
    }
    

    data/manhunt_tracker/functions/tick.mcfunction (새로 생성, 매 틱마다 실행)

    # 사냥꾼이 추적기를 사용했는지 확인
    execute as @a[team=hunter,scores={tracker_use=1..}] at @s run function manhunt_tracker:activate_tracker
    
    # 모든 플레이어의 추적기 사용 스코어 초기화
    scoreboard players set @a tracker_use 0
    

    data/manhunt_tracker/functions/activate_tracker.mcfunction (추적기 활성화 메인 로직)

    # 사냥꾼만 사용 가능하도록 이미 tick.mcfunction에서 필터링됨
    # 인벤토리에 다이아몬드가 1개 이상 있는지 확인
    execute if items entity @s inventory{id:'minecraft:diamond',Count:1b} run clear @s minecraft:diamond 1
    
    # 다이아몬드 소모 성공 시
    execute if entity @s[nbt=!{Inventory:[{id:'minecraft:diamond',Count:0b}]}] run function manhunt_tracker:draw_beam
    execute if entity @s[nbt=!{Inventory:[{id:'minecraft:diamond',Count:0b}]}] run tellraw @s {"text":"다이아몬드를 소모하여 도망자 추적을 시작합니다!","color":"gold"}
    
    # 다이아몬드가 없으면 실패 메시지
    execute unless items entity @s inventory{id:'minecraft:diamond',Count:1b} run tellraw @s {"text":"추적에 필요한 다이아몬드가 부족합니다! (1개 필요)","color":"red"}
    

    data/manhunt_tracker/functions/draw_beam.mcfunction (파티클 선 그리기 시작)

    # 가장 가까운 도망자 (runner 팀)가 있는지 확인
    execute as @s at @s if entity @a[team=runner,limit=1,sort=nearest] run function manhunt_tracker:draw_beam_start
    
    # 도망자가 없을 경우 메시지
    execute unless entity @a[team=runner,limit=1,sort=nearest] run tellraw @s {"text":"주변에 도망자가 없습니다.","color":"gray"}
    

    data/manhunt_tracker/functions/draw_beam_start.mcfunction (파티클 선을 그리기 위한 준비 및 재귀 함수 호출) 이 함수는 activate_tracker.mcfunction에서 다이아몬드 소모 성공 시 호출됩니다. draw_beam.mcfunction은 필요 없고, draw_beam_start.mcfunction이 메인 파티클 그리는 함수가 됩니다.

    수정: draw_beam_start.mcfunction 대신, 직접 파티클을 그리는 함수로 연결하겠습니다. data/manhunt_tracker/functions/draw_beam.mcfunction (수정된 파티클 선 그리기 시작)

    # 가장 가까운 도망자 (runner 팀)가 있는지 확인하고, 그 도망자를 향해 바라본 상태로 다음 함수 실행
    execute as @s at @s positioned as @s facing entity @a[team=runner,limit=1,sort=nearest] eyes run function manhunt_tracker:draw_beam_segment
    

    data/manhunt_tracker/functions/draw_beam_segment.mcfunction (파티클 선 재귀적으로 그리기) 이 함수는 파티클 선을 재귀적으로 그려 약 2초 동안 선이 나타나는 효과를 줍니다.

    # 이 함수를 호출할 때마다 offset을 증가시키는 스코어보드 필요.
    # #temp_offset 이라는 임시 스코어를 사용합니다.
    # 이 스코어는 이 함수가 처음 호출될 때 초기화되어야 합니다.
    # 따라서 draw_beam_segment 함수 자체를 재귀 시작점으로 사용하지 않고, draw_beam_start에서 초기화 후 호출하는 방식이 낫습니다.
    
    # 다시 draw_beam_start를 만들어야 합니다.
    
    # ---- 삭제 ----
    # draw_beam_segment는 재귀 호출용이므로 외부에서 직접 호출되지 않습니다.
    #
    # execute if score #temp_offset manhunt_vars < 40 run particle minecraft:end_rod ^ ^ ^0.5 0 0 0 0 1 force
    # execute if score #temp_offset manhunt_vars < 40 run scoreboard players add #temp_offset manhunt_vars 1
    # execute if score #temp_offset manhunt_vars < 40 run schedule function manhunt_tracker:draw_beam_segment 1t append
    # ---- 삭제 ----
    

    최종 파티클 함수 구조 (가장 간단하고 깔끔한 재귀 방식):

    data/manhunt_tracker/functions/draw_beam.mcfunction (파티클 선 그리기 시작)

    # 가장 가까운 도망자 (runner 팀)가 있는지 확인하고, 그 도망자를 향해 바라본 상태로 다음 함수 실행
    execute as @s at @s if entity @a[team=runner,limit=1,sort=nearest] run function manhunt_tracker:draw_beam_start
    
    # 도망자가 없을 경우 메시지
    execute unless entity @a[team=runner,limit=1,sort=nearest] run tellraw @s {"text":"주변에 도망자가 없습니다.","color":"gray"}
    

    data/manhunt_tracker/functions/draw_beam_start.mcfunction (파티클 그리기 초기화 및 첫 호출)

    # 현재 위치를 기준으로 도망자를 바라보도록 회전 (eyes는 플레이어의 시선 위치)
    execute positioned as @s facing entity @a[team=runner,limit=1,sort=nearest] eyes run function manhunt_tracker:draw_beam_segment 0
    

    data/manhunt_tracker/functions/draw_beam_segment.mcfunction (재귀적으로 파티클 그리기) 이 함수는 offset 인자를 받습니다. (/function manhunt_tracker:draw_beam_segment 0처럼 호출)

    # 함수의 인자로 받은 offset 값을 스코어보드에 저장 (최초 호출 시 0)
    # 'offset' 변수는 재귀 호출을 위한 현재 파티클 위치의 인덱스입니다.
    scoreboard players set #offset manhunt_vars %1$s
    
    # 최대 파티클 선의 길이 (예: 20블록)와 한 칸 당 파티클 밀도 (예: 0.5블록 간격)
    # 총 파티클 수 = 20 / 0.5 = 40개
    # 그러므로 offset이 0부터 39까지 (총 40번) 반복되도록 설정
    scoreboard players set #max_segments manhunt_vars 39
    
    # 현재 offset에 해당하는 위치에 end_rod 파티클 생성
    # ^ ^ ^[distance] 는 현재 바라보는 방향으로 [distance]만큼 떨어진 곳에 파티클을 생성합니다.
    # [distance] = offset * 0.5
    execute if score #offset manhunt_vars <= #max_segments manhunt_vars run particle minecraft:end_rod ^ ^ ^$(#offset * 0.5) 0 0 0 0 1 force
    
    # 다음 offset을 계산
    scoreboard players add #offset manhunt_vars 1
    
    # 다음 offset이 최대치를 넘지 않았으면 1틱 뒤에 함수 재귀 호출
    execute if score #offset manhunt_vars <= #max_segments manhunt_vars run schedule function manhunt_tracker:draw_beam_segment_next 1t append
    

    data/manhunt_tracker/functions/draw_beam_segment_next.mcfunction (재귀 호출을 위한 헬퍼 함수) 이 함수는 draw_beam_segment의 다음 반복을 올바른 인자와 함께 호출하기 위한 헬퍼입니다.

    # #offset 스코어의 현재 값을 인자로 넘겨 다음 재귀 호출
    function manhunt_tracker:draw_beam_segment $(#offset)
    

    data/manhunt_tracker/functions/give_tracker.mcfunction (사냥꾼에게 추적 아이템 지급) 이 아이템은 리소스팩이 적용되어야 다이아몬드처럼 보입니다.

    give @s carrot_on_a_stick{CustomModelData:1000,manhunt_tracker:1b,display:{Name:'{"text":"추적 다이아몬드","italic":false}'}} 1
    

    2. 리소스팩 (Tracker Diamond Texture)

    tracker_diamond_rp.zip 이라는 이름으로 압축할 폴더 구조입니다.

    tracker_diamond_rp/
    ├── pack.mcmeta
    └── assets/
        └── minecraft/
            ├── textures/
            │   └── item/
            │       └── tracker_diamond.png  (여기에 다이아몬드 텍스처 복사)
            └── models/
                └── item/
                    └── carrot_on_a_stick.json
    

    pack.mcmeta (리소스팩 정보)

    {
      "pack": {
        "pack_format": 18,
        "description": "Custom Model Data for Tracker Diamond"
      }
    }
    

    assets/minecraft/textures/item/tracker_diamond.png 이 파일은 마인크래프트 기본 리소스팩에서 assets/minecraft/textures/item/diamond.png 파일을 복사하여 여기에 붙여넣으세요.

    assets/minecraft/models/item/carrot_on_a_stick.json 기존 carrot_on_a_stick.json 파일에 overrides 섹션을 추가하여 CustomModelData:1000일 때 tracker_diamond.png 텍스처를 사용하도록 지시합니다.

    {
      "parent": "minecraft:item/handheld",
      "textures": {
        "layer0": "minecraft:item/carrot_on_a_stick"
      },
      "overrides": [
        {
          "predicate": {
            "custom_model_data": 1000
          },
          "model": "item/tracker_diamond_model"
        }
      ]
    }
    

    assets/minecraft/models/item/tracker_diamond_model.json (새로 생성할 모델 파일) 이 파일은 tracker_diamond.png 텍스처를 사용하는 새로운 모델입니다.

    {
      "parent": "minecraft:item/handheld",
      "textures": {
        "layer0": "minecraft:item/tracker_diamond"
      }
    }
    

    🎮 사용 방법

    1. 데이터팩 설치:

      • 위에서 만든 manhunt_tracker 폴더를 manhunt_tracker.zip으로 압축합니다.
      • 마인크래프트 월드의 saves/<YOUR_WORLD_NAME>/datapacks/ 폴더 안에 이 manhunt_tracker.zip 파일을 넣습니다.
      • 월드에 접속하거나, /reload 명령어를 사용하여 데이터팩을 로드합니다.
    2. 리소스팩 설치 (선택 사항):

      • 위에서 만든 tracker_diamond_rp 폴더를 tracker_diamond_rp.zip으로 압축합니다.
      • 마인크래프트 클라이언트의 .minecraft/resourcepacks/ 폴더 안에 이 tracker_diamond_rp.zip 파일을 넣습니다.
      • 마인크래프트 설정 -> 리소스 팩에서 tracker_diamond_rp를 활성화합니다.
    3. 게임 설정:

      • /team add hunter
      • /team add runner
      • 추격자 설정: 추격자 플레이어는 /team join hunter 명령어를 사용합니다.
      • 도망자 설정: 도망자 플레이어는 /team join runner 명령어를 사용합니다.
    4. 아이템 얻기:

      • 추격자 플레이어가 /function manhunt_tracker:give_tracker 명령어를 사용하여 추적 다이아몬드 아이템을 얻습니다. (리소스팩 적용 시 다이아몬드처럼 보임)
    5. 사용하기:

      • 추격자 플레이어가 추적 다이아몬드 아이템을 **주 손(main hand)**에 들고 우클릭합니다.
      • 인벤토리에 다이아몬드 1개가 소모됩니다.
      • 가장 가까운 도망자 플레이어의 방향으로 긴 end_rod 파티클 선이 약 2초 동안 나타났다 사라집니다.
      • 도망자가 없거나 다이아몬드가 부족하면 실패 메시지가 나옵니다.

    주의사항:

    • 이 데이터팩은 1.20.2 버전에 맞춰 제작되었습니다. 다른 버전에서는 호환성 문제가 발생할 수 있습니다.
    • 다이아몬드가 소모되는 것은 인벤토리에 있는 일반 다이아몬드이며, 추적 다이아몬드 아이템 자체는 소모되지 않습니다. 이는 추적 다이아몬드 아이템을 계속 재사용할 수 있도록 하기 위함입니다.
    • 만약 추적 다이아몬드 아이템 자체를 소모하고 싶다면, activate_tracker.mcfunction에서 clear @s carrot_on_a_stick{manhunt_tracker:1b} 1 명령어를 추가해야 합니다. (이 경우, 추적 다이아몬드를 다시 얻으려면 /function 명령어를 다시 사용해야 합니다.)
    • 파티클 선의 길이나 지속 시간, 밀도 등은 draw_beam_segment.mcfunction 파일 내의 scoreboard players set #max_segments manhunt_vars <숫자> 값을 조절하여 변경할 수 있습니다. (예: 20블록에 0.5간격으로 40번 반복)

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.