File Details
laststandhq-1.2.0
- R
- Jul 6, 2026
- 21.40 KB
- 3
- 1.20.1
- Forge
File Name
laststandhq-1.2.0.jar
Supported Versions
- 1.20.1
Curse Maven Snippet
# Last Stand HQ — Changelog
## Bug Fixes
### 1. Wrong dimension registry constant
`Level.RESOURCE_KEY` doesn't exist in 1.20.1. Fixed by using `Registries.DIMENSION` instead.
*(Build failure)*
### 2. `BreakSpeed` position API changed
`PlayerEvent.BreakSpeed#getPos()` was renamed to `getPosition()` (now returns
`Optional<BlockPos>`) between 1.19 and 1.20.
*(Build failure)*
### 3. Crafting menu closed itself instantly
Vanilla's `CraftingMenu` checks every tick that the block it was opened on is literally
`Blocks.CRAFTING_TABLE`. Since the HQ banner isn't a crafting table, the menu force-closed the
instant it opened. Fixed with a custom `HQCraftingMenu` that checks for a banner instead.
### 4. Banner could be re-claimed unlimited times
The "one banner, ever" rule only checked whether a player currently had an *active* HQ, not
whether they'd *ever* had one. Breaking and replacing a banner reset the claim entirely. Fixed
by adding a permanent `everClaimedHQ` flag, independent of active/fallen/dead state, only
cleared by `/hq reset`.
### 5. Extra banners still physically placed
Placing additional banners beyond the one-time HQ claim didn't do anything special, but the
banner itself still went down as a normal decorative block. Fixed by cancelling the placement
outright — nothing gets placed at all.
### 6. Support block had zero protection
Explosion immunity and the mining timer only covered the banner block itself. Destroying the
block underneath a standing banner (or the wall behind a wall banner) popped it off for free,
bypassing both protections. Fixed by detecting the banner's support block and covering it with
the same protections.
### 7. Banner could be insta-broken via tap-then-craft cycling
The original 30-second enforcement measured wall-clock time since a player's *first* touch, with
a 5-second grace window between taps. Tapping the banner on and off repeatedly (with crafting
menu use in between) let the timer quietly accumulate to 30 seconds without the player ever
holding continuously. Diagnosed from a screen recording; fixed by rebuilding the tracking system
around genuine continuous holding, using the `BreakSpeed` event's own per-tick firing pattern
with only a brief (half-second) grace window for network/client-prediction flicker.
### 8. Reflection-based mining tracker failed in production
An intermediate fix attempted to read Minecraft's private `isDestroyingBlock` / `destroyPos`
fields directly via reflection, then via Forge's `ObfuscationReflectionHelper` — both failed once
actually deployed, because production builds use different internal field names than the
development environment. This made the banner **completely unbreakable**, since the safety check
always saw zero progress. Fixed by dropping reflection entirely and building tracking purely on
the `BreakSpeed` event, which needs no private-field access.
### 9. Diagnostic logging removed
Temporary log lines added to debug #8 were removed once the fix was confirmed working, so the
server console isn't spammed during normal play.
## Current Behavior (Confirmed Working)
- 30-second continuous-hold mining timer on the HQ banner and its support block, regardless of
tool or enchantments
- Full immunity to explosions below the nuke-tier threshold
- One-time-only banner claim per player, enforced permanently
- All mining/timer logic enforced server-side; confirmed working in an actual CurseForge
deployment (not just the dev environment)