Skip to content

Release 1.30.2

Latest

Choose a tag to compare

@tastybento tastybento released this 06 Sep 23:33
41f6208

A bug fix for piston counting plus a new opt-in feature that keeps entity counts honest by recounting islands in the background.

  • Extended pistons no longer count twice — Limits treats a piston head as its base piston so that breaking the head decrements the count correctly. The admin recount (calc) walks every block on the island, though, and was counting both the base and the head of every extended piston. A redstone build with all its pistons extended doubled the count (16 sticky pistons showing as 32/30), and every recalc put the wrong number back. Blocks in transit as they were being pushed were also counted as pistons. The recount now counts only the base, and explosions that destroy both the base and head of a piston decrement it once. Reported on Discord. [PR #302]
  • ⚙️ Automatic entity recounts (opt-in) — entity counts are maintained incrementally, so any missed event (sniffer egg hatches, mobs crossing portals, increments lost in a crash before the batched save) leaves them stuck away from reality with no way to recover except a manual recount. Two new opt-in options reconcile counts automatically: recount-on-join runs a background entity-only recount of an island when its owner logs in, and recount-periodic sweeps online islands on a timer so long sessions self-heal too. Recounts are async, rate-limited to one island at a time, deduplicated and throttled per island, and only rewrite entity counts; block counts are left alone. Islands larger than recount-max-chunks are skipped with a one-time warning. Both are off by default because a recount loads every chunk of the island's protection area. Thanks @daniel-skopek. [PR #301]
  • Entities crossing portals off-island decrement correctly — when an entity went through a portal while standing outside its island's protection range, the source-dimension count was never decremented. The portal handler now uses the same entity-to-island cache as removal tracking. [PR #301]

⚙️ Config note: six new keys are added to config.yml: recount-on-join, recount-on-join-cooldown, recount-periodic, recount-periodic-interval, recount-periodic-batch and recount-max-chunks. All default to off or to safe values, so nothing changes unless you enable them. Read the comments in the config before turning them on: cost scales with the square of the protection range (64 chunks per world at range 50, 2,601 at range 400), and a recount replaces counts rather than merging them, so it is only accurate when the island's chunks are loaded.

Piston note: islands whose piston count is inflated will show the right number after one more recount (/<gamemode> admin limits calc <player>) on this version.

Compatibility

✔️ BentoBox API 2.7.1
✔️ Paper Minecraft 1.21.11 - 26.2
✔️ Java 21

Upgrading

  1. As always, take backups just in case. (Make a copy of everything!)
  2. Stop the server.
  3. Replace the Limits jar with this one.
  4. Restart the server. The new recount-* keys are added to config.yml automatically with their defaults.
  5. Optionally enable recount-on-join and/or recount-periodic after reading the config comments.
  6. Run a recount on any island that showed too many pistons.

Legend

⚙️ Config options have been added.

What's Changed

  • ⚙️ Self-heal drifting entity counts via background recount by @daniel-skopek in #301
  • Count an extended piston once during recount and explosions by @tastybento in #302

Full Changelog: 1.30.1...1.30.2