LAG SHIELD v4.1
What's new
# LAG SHIELD 4.1 — "Love Letter" 🛡️
6,000+ of you downloaded this thing. every single feature in this update came from something one of you said. so: thank you. here's your update.
## 🏆 ACHIEVEMENT-FRIENDLY (4.1)
two of you flagged this and you were both right, in two different ways:
**1. the commands needed cheats.** `/scriptevent` only works with cheats on — so **sneak + tap a COMPASS** now opens the whole addon as a menu instead. report card, addon breakdown, flight recorder, player load, benchmark, cleanup, every setting. no commands typed at all. *(thank you @sahilsourav4u)*
**2. the pack itself was still killing achievements.** behavior packs disable them unless the manifest is flagged as an addon — mine wasn't. **4.1 adds `"product_type": "addon"` to the manifest**, which is the flag Minecraft looks for. *(thank you @Xgodsentx13 — you were right and I was wrong)*
so: keep cheats OFF, skip the Experiments toggles, and your achievements should stay on. if your world still disables them, tell me and I'll keep digging — Mojang changes how this is detected sometimes.
(the `/scriptevent` commands still work too if you prefer typing.)
## 📼 THE FLIGHT RECORDER — see the lag you MISSED
`/scriptevent lag:log`
here's the thing nobody solves: **when your world lags, you're busy playing.** by the time you stop and run a report, the spike is over and everything looks fine again.
so Lag Shield records it for you now. every bad moment gets logged automatically — **the TPS, how many entities were loaded, and which addon they belonged to** — and `lag:log` replays your worst spikes, newest info first:
> `4 min ago — 9.1 tps · 412 entities · 63 junk`
> ` mostly eternal_caves (218)`
it saves with your world, so you can check it tomorrow. and if entities start climbing fast, it warns you **before** the TPS drops.
## 🏷️ WHICH ADDON — by name
`/scriptevent lag:addons`
the census told you *which mob* was flooding your world. this tells you **which ADDON** — grouped by the mod's own id, with a % of your total entity load and the heaviest one flagged.
> *"this really helps me pinpoint which one to exclude"* — the first person who ever commented here, building a modpack. this one's for you.
## 🧪 BENCHMARK MODE — what does this addon actually COST?
`/scriptevent lag:bench start` → turn the addon on → play 2-3 min → `/scriptevent lag:bench end`
you get a real before/after: **TPS delta, entity delta, which addon added the most**, and a straight verdict — *basically free* / *a noticeable hit* / *this costs you real TPS*.
people were already doing this by hand, one addon at a time. now it's one command. **if you're building a modpack for a forever world, this is the feature.**
## 👥 WHO IS IT? — for realms and shared worlds
`/scriptevent lag:players`
playing with friends? the addon now attributes **every loaded entity to its nearest player** and shows you the breakdown:
> `Steve: 247 entities <-- heaviest`
> ` mostly eternal_caves (180) · overworld (1204, -330)`
so instead of arguing about whose fault the lag is, you get a name and a coordinate. usually it's whoever's AFK at a mob farm. it also counts the entities near **nobody** — the ones far cull exists to clean up.
## 🩹 ONE-COMMAND FIX
`/scriptevent lag:fix` — reads your world and applies the right settings for it (far cull, thinner, tighter caps if you're overloaded), then cleans up. tells you exactly what it changed, and everything's still yours to undo.
for everyone who just wants it handled without learning ten commands.
## 📟 LIVE TPS HUD
`/scriptevent lag:toggle hud` — your tick rate and entity count, always on the action bar, color-coded. watch your world's health in real time while you play.
## ✅ also
- verified on the latest Bedrock (26.40)
- everything from 3.0 still here: far cull · mob thinner · report card · census · hotspots · valuables protection · zero-hitch cleaning
**Stable script APIs only — NO experimental toggles.** Only the host needs it. 15 KB.
special thanks to **@YoSnowww** (far cull exists because of your writeup) and everyone who's commented, reported, or told me what was broken. this addon is 4 versions deep in a month because you kept talking. 🙏
— see your TPS. find your lag. kill it. 🛡️
This mod has no additional files

