Loot Spawn Manager

A powerful Minecraft Forge 1.16.5 mod for managing coordinate-based loot spawning with DayZ mechanics.

File Details

lootspawnmanager-0.0.9.jar

  • R
  • Jun 16, 2026
  • 324.36 KB
  • 8
  • 1.16.5
  • Forge

File Name

lootspawnmanager-0.0.9.jar

Supported Versions

  • 1.16.5

Curse Maven Snippet

Forge

implementation fg.deobf("curse.maven:loot-spawn-manager-1574953:8259261")
Curse Maven does not yet support mods that have disabled 3rd party sharing

Learn more about Curse Maven

[0.0.9] - 2026-06-16 (Performance & Admin Tools)

Added

  • Visual loot grid editor — [⊞ Grid] toggle in Template Detail's Loot Pool section header switches from the item list to a 9-column icon grid (20×20 px slots). Hover any slot to see a tooltip with item name, count range, chance%, and weight. Click the [×] icon that appears in the top-right corner of a hovered slot to remove the item. [≡ List] reverts to the table view. Toggle persists within a session.
  • Per-template export — [📤 Export] button in Template Detail footer. Sends C2SExportTemplatePacket to server (requires ADMIN); writes the template's JSON (items + settings) to config/lootmanager/exports/template_NAME_TIMESTAMP.json. Server sends a chat message with the filename. Can be shared between servers or used as a backup of specific templates.

Changed

  • Async disk I/O — DataManager.save() and savePointsOnly() now serialize data in-memory on the server thread (~1 ms) then hand off file writes to a dedicated single-thread LootSpawnManager-Save executor (~5-50 ms, off server thread). Eliminates disk stalls during admin actions on busy servers. On shutdown, a final save is submitted last in the queue and awaitTermination(30 s) ensures all writes complete before the JVM exits.
  • Network protocol: "5" → "6" (incompatible with v0.0.8 clients)

[0.0.8] - 2026-06-16 (Security & Backup Restore)

Added

  • Backup Restore UI — Tools tab now shows up to 5 recent backups with timestamps. Click [Restore] → ConfirmDialog → server atomically replaces all data from the snapshot, rebuilds the scheduler, notifies other admins, and resyncs all clients. No server restart required.
    • BackupManager.listBackups() / readBackup(filename) with path-traversal protection
    • DataManager.restoreFromSnapshot(json) — full field migration for old snapshots
    • Packets: C2SRequestBackupListPacketS2CBackupListPacketC2SRestoreBackupPacket
    • ClientState.backupList stores the latest list from server
  • Input validation on item packets — C2SAddItemPacket and C2SAddPointItemPacket now reject: empty item ID, minCount < 1maxCount < minCountchance outside 0–100, negative weight. Malformed packets are silently dropped server-side.

Fixed

  • Path traversal in ImportExportManager — importFile() now rejects filenames containing ../\ and verifies the resolved path stays inside the import directory. Prevents directory escape via crafted filenames.
  • String.isBlank() → trim().isEmpty() — two packets used a Java 11+ API (isBlank) causing compile failure under the required JDK 8.
  • AdminLogger race condition — log() is now synchronized; prevents log-line interleaving when two admins trigger actions simultaneously.

Changed

  • Network protocol: "4" → "5" (incompatible with v0.0.7 clients)

[0.0.7] - 2026-06-16 (Map & Multi-Admin)

Added

  • Interactive Map screen — [Map] button in SpawnPointListScreen opens a top-down coordinate grid of all spawn points in the current dimension:
    • Zoom with scroll wheel, pan by left-drag on empty space
    • Each point rendered as a colored dot (green = active, red = inactive)
    • Click a dot to open its SpawnPointListScreen row; Shift+click to select
    • Drag to reposition — drag a dot to new coordinates → sends C2SMovePointPacket
    • Template legend: click a template chip to toggle visibility of its points
    • Grid lines every 100 blocks, coordinate labels, crosshair at origin
  • ConfirmDialog — universal modal overlay for destructive operations:
    • Delete group (shows template count warning)
    • Delete template (shows bound point count warning)
    • Delete point
    • Restore backup
    • Enter = confirm, Escape = cancel; isPauseScreen() returns false so the game keeps ticking while the dialog is open
  • Multi-admin notifications — when any admin mutates data, all other connected admins with ≥ VIEW permission receive a toast notification:
    • Group delete, template delete → warning toast naming the deleted object
    • Backup restore → warning toast naming the filename
    • S2CAdminNotifyPacket (TYPE_INFO / TYPE_WARNING) + SyncHelper.notifyAdmins()

Fixed

  • TemplateDetailScreen per-frame GC — ForgeRegistries.ITEMS.getValue(new ResourceLocation(...)) was called every render frame per item. Replaced with itemStackCache (Map rebuilt once per template change). Eliminates allocation spike at 60 fps with large loot pools.
  • ToolsScreen O(T+P) per frame — collectWarnings() walked all templates and points on every render call. Now guarded by warningsDirty flag; only recomputed on data sync or screen init.
  • Dead code in ShiftPointsScreen.cycleTmpl() — removed redundant else if (tmplIdx == -1) tmplIdx = -1 branch.

Changed

  • Network protocol: "3" → "4" (incompatible with v0.0.6 clients)