ProtectionBlocks

ProtectionBlocks allows players to secure their builds with customizable protection blocks and manage permissions with ease.

File Details

protectionblocks-1.0.12.jar

  • R
  • Jul 7, 2026
  • 8.46 MB
  • 5
  • 1.20.1
  • Forge

File Name

protectionblocks-1.0.12.jar

Supported Versions

  • 1.20.1

Curse Maven Snippet

Forge

implementation fg.deobf("curse.maven:protection-blocks-1351203:8386274")
Curse Maven does not yet support mods that have disabled 3rd party sharing

Learn more about Curse Maven

🚀 v1.0.12 — Fuel persistence fix + unlimited capacity + admin ownership transfer

Two things you can actually feel in survival, plus one new admin tool. If you use currency mode, this release is a must-have: it fixes a data-loss bug where any block holding more than 127 fuel items was silently wiped on save.


🐛 Critical fix — Fuel above 127 was being wiped on save

  • Root cause: ItemStack.save() serializes the count as a signed byte (max 127). A block holding, say, 392 iron in the fuel slot would overflow: (byte) 392 = -120, and on reload Minecraft parsed that as "empty stack" → the entire fuel deposit was gone the moment the chunk saved.
  • Real-world symptom: users report "I deposited 400 iron last night, came back today and the block is empty" — even though the cron hadn't ticked enough to consume that much. That's the byte overflow, not the consumption cron.
  • Fix: the fuel slot now writes the count as a separate int tag (CurrencyCount) alongside the item id. Loads read the int and re-inflate the stack, so any value fits (well within Integer.MAX_VALUE). Old worlds are read as-is — if you had ≤127 items saved before, they load exactly as before; from this release forward, larger stacks persist correctly.

🔋 Fuel capacity is now effectively unlimited

  • Before: MAX_FUEL_SLOT = 999. Any deposit over that limit silently dropped the excess and left it in your inventory. The GUI input capped at 3 digits.
  • Now: no cap — the slot accepts any positive integer. The deposit input in the GUI accepts up to 9 digits (999 999 999 items). Together with the byte-overflow fix, this means you can stockpile as much fuel as you want in a single block without losing anything.
  • Design intent: some players wanted to pre-load their base for weeks and stop worrying about it. That's now a first-class use case.

👑 New admin tool — Assign block ownership (online or offline players)

Small, focused feature for support and moderation. From the block management GUI, an OP in creative can now assign ownership of the current block to any player the server has ever seen — including offline players.

  • New 👑 Asignar / Assign button in the GUI header (visible only for OP + creative — regular players don't see it).
  • Opens an inline picker with the full list of known players: the current tab list plus everyone with a file in the world's playerdata/, resolved through the server's user profile cache.
  • Type-to-search box works over the whole list, so you can find someone by partial name in a couple of keystrokes.
  • On selection: the block's owner is switched atomically — removed from the old owner's block-count, added to the new owner's block-count (respecting their per-player block limit), and the sync packet updates everyone who has the chunk loaded so the tooltip and any open GUI show the new owner right away.
  • Chat feedback covers all cases: successful transfer (with old → new owner and coordinates), target already at max blocks, target is already the owner (idempotent no-op), or missing block at that position.
  • Uses the same canManage gate as the rest of the admin-manage features from 1.0.11 (OP + creative required, server-side check), so clients cannot spoof it.

🔍 Under the hood

  • Extra debug logging in the fuel path ([cron consume], [refillCurrencyStack], [setCurrencyStack] SUSPICIOUS drop) writes to config/protectionblocks/debug.log. Only useful if you're chasing a fuel bug — normal players will never notice it.
  • Two new network packets — RequestKnownPlayersPacket / SyncKnownPlayersPacket — handle the picker's known-players list. Gated by OP + creative on the server so non-admins can't harvest player names.

📦 Compatibility

  • Minecraft 1.20.1
  • Forge 47.x (built against 47.4.8)
  • Fully compatible with 1.0.11 worlds — no data migration. Old NBT with the byte-encoded count still loads correctly; new saves use the int format going forward.

© 2026 vicxelcode — MIT License