╔══════════════════════════════════════════════════════════════╗
║   COMMAND BLOCKS SETUP — COMPLETE GUIDE v3.5                ║
╚══════════════════════════════════════════════════════════════╝

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
TAG SYSTEM — POORA EXPLANATION
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Tags = Players ke upar "labels" hain.

pof_ingame tag:
  → Button press hote hi AUTOMATICALLY milta hai
  → game/begin.mcfunction mein: tag @a add pof_ingame
  → Matlab: button dabao → sabko instantly pof_ingame tag

pof_dead tag:
  → Sirf tab milta hai jab player marta hai
  → death/on_death function mein: tag @s add pof_dead
  → Yeh tag CB3 ke liye zaroori hai

pof_winner tag:
  → Last surviving player ko milta hai
  → winner/declare.mcfunction mein

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
REQUIRED COMMAND BLOCKS — 3 TOTAL
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

┌─────────────────────────────────────────────────┐
│ CB 1 — LOBBY BUTTON                             │
│ Type:     Impulse                               │
│ Redstone: Needs Redstone                        │
│ Command:  /function game/start                  │
└─────────────────────────────────────────────────┘
  Button press → game shuru → sab tagged automatically

┌─────────────────────────────────────────────────┐
│ CB 2 — DEATH DETECTOR ★ MOST IMPORTANT ★        │
│ Type:     Repeat                                │
│ Redstone: Always Active                         │
│ Command:                                        │
│ /execute as @a[tag=pof_ingame,tag=!pof_dead,    │
│  m=!survival] run function death/on_death       │
└─────────────────────────────────────────────────┘
  Har tick check karta hai: koi pof_ingame player
  jo survival mein NAHI hai? → woh mara → on_death chalo
  doImmediateRespawn=true ka yahi solution hai.

┌─────────────────────────────────────────────────┐
│ CB 3 — SPECTATOR ENFORCER                       │
│ Type:     Repeat                                │
│ Redstone: Always Active                         │
│ Command:                                        │
│ /gamemode spectator @a[tag=pof_dead,            │
│  m=!spectator]                                  │
└─────────────────────────────────────────────────┘
  pof_dead tag wale players ko spectator force karta hai.
  Yeh CB 2 ka backup hai — double guarantee.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
OPTIONAL CB 4 — FALL DEATH
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

┌─────────────────────────────────────────────────┐
│ Type:     Repeat | Always Active                │
│ /execute as @a[tag=pof_ingame,tag=!pof_dead]    │
│  at @s if block ~ ~-1 ~ air                     │
│  run function death/on_death                    │
└─────────────────────────────────────────────────┘
  Player neeche gira aur uske neeche air hai → dead

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ONE-TIME SETUP
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
/function setup/init
/tickingarea add 290 -60 300 380 30 390 "pof_zone"

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
LOOT TABLE SUMMARY v3.5
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  Blocks:  seeds 0-54  = 56.7% chance
  Food:    seeds 55-74 = 20.6% chance
  Misc:    seeds 75-84 = 10.3% chance
  Weapons: seeds 85-91 =  7.2% chance (only 7 weapons!)
  Rare:    seeds 92-96 =  5.2% chance

  NO snowball. NO egg. Weapons very rare.
  Enchanted Golden Apple = seed 96 only (1%).
