# Sethpc Minecraft Project Context ## Infrastructure ### MCSManager Panel - **CT:** 644 on node-112 (sethpc, 192.168.0.112) - **IP:** 192.168.0.244 - **Web panel:** http://mc.sethpc.xyz (via Caddy on CT 600, node-241) - **Panel ports:** 23333 (web), 24444 (daemon) - **OS:** Debian 12, Java 21 (Temurin) - **Installed via:** https://script.mcsmanager.com/setup.sh - **Systemd services:** `mcsm-web.service`, `mcsm-daemon.service` --- ## Server 1 — mc1 (Vanilla survival) | Property | Value | |---|---| | Instance ID | `d39f55861cb34204a92a18a9e1c78ca6` | | Game port | `25565` | | RCON port | `25575` | | RCON password | `REDACTED_RCON` | | Data dir | `/opt/mcsmanager/daemon/data/InstanceData/d39f55861cb34204a92a18a9e1c78ca6/` | | Version | Minecraft 1.21.x (vanilla) | | Connect | `192.168.0.244:25565` | ### Services on CT 644 - `mc-godmode.service` — watches `latest.log`, sets `slingshooter08` to creative on every login - Script: `/usr/local/bin/mc_godmode_watch.sh` - Calls: `/usr/local/bin/mc_godmode_rcon.py` - Toggle: `systemctl start/stop mc-godmode.service` --- ## Server 2 — shrink-world | Property | Value | |---|---| | Instance ID | `shrinkborder1234567890abcdef12345` | | Game port | `25566` | | RCON port | `25576` | | RCON password | `REDACTED_RCON` | | Data dir | `/opt/mcsmanager/daemon/data/InstanceData/shrinkborder1234567890abcdef12345/` | | Version | Minecraft 1.21.x (vanilla, same server.jar as mc1) | | Connect | `192.168.0.244:25566` | | World border | 500x500 centered at 0,0 (started at 1000x1000) | | Difficulty | Hard | ### Datapacks installed 1. **shrinkborder** — detects player deaths, shrinks world border by 1 block per death, alternating N/S and E/W sides. Starts DISABLED. 2. **morespawns** — increases creeper spawn weight from 100 to 500 (5x more creepers) ### Services on CT 644 - `mc-shrink-kit.service` — main watcher script for shrink-world - Script: `/usr/local/bin/shrink_godkit.py` - On first login: gives full god kit (netherite armor + tools + consumables) - On every login: broadcasts world stats - On every death: broadcasts world stats + increments death counter - Every hour: broadcasts world stats - Kit record persisted at: `/kit_given.json` --- ## RCON Helper (Python) All server communication uses raw RCON sockets (no external library needed): ```python import socket, struct, time def rcon(cmd, host='127.0.0.1', port=25575, password='REDACTED_RCON'): s = socket.socket() s.settimeout(5) s.connect((host, port)) def pkt(i, t, p): p = p.encode() + b'\x00\x00' return struct.pack('