Commit Graph
406 Commits
Author SHA1 Message Date
YoyoNow baa4cf34e5 Calculate hull visibility on block faces
Instead of a block occluding as a whole, the hull stores which of its six
faces are full, using the occlusion shapes the client culls faces with. A ray
inside a block can only leave it through an open face and enter the next
block through its open opposite face; if only that face is full, the ray
reaches its surface, so the block is visible, but stops there. Slabs, stairs
and stacked slabs now hide what is behind them; double slabs need no special
case anymore. Faces only open up on block updates, after which the rays that
could not get into, out of or past the block are continued.

Hidden blocks occlude by the same decision as the techhider, so waterlogged
blocks count as well when water is hidden. The hull therefore takes the
ObfuscationConfig, which the fight shares with its TechHiderWrapper.
2026-10-31 21:18:24 +01:00
YoyoNow e1ff37bea2 Apply the gamemode techhider with /hullhider
Players using /hullhider also get the techhider of the region's gamemode in
the build area, like in a fight: its hidden blocks are replaced and occlude
in the hull.
2026-10-31 20:09:45 +01:00
YoyoNow 9fd2bd17d4 Use @LinkedTimer for the timers of linked classes
The repeating timers that linked classes and the plugin main classes started
once for the whole runtime now use @LinkedTimer, on Spigot (BauSystem,
SpigotCore, LobbySystem, MissileWars, TowerRun, Teamserver) and Velocity.
The FightInfoPacketSenders of MissileWars and TowerRun are linked themselves
instead of being started by the main class.
2026-10-31 16:26:34 +01:00
YoyoNow 9598b1c961 Add @LinkedTimer
A method of a linked class annotated with @LinkedTimer(delay, period) is run
repeatedly by the linker, on Spigot and Velocity. The method must not have
parameters, its return value is ignored. It is called through a MethodHandle
bound once when linking instead of reflection; LambdaMetafactory cannot be used
as the linker and the linked classes are in different class loaders.

The unit defaults to ticks and can be set to milliseconds up to hours; the
Unit enum converts it to ticks for Spigot and to a TimeUnit for Velocity.
HullHiderCommand uses it for its tick task.
2026-10-31 16:11:28 +01:00
YoyoNow b78fab3172 Stop the loader task and listener when a loader ends
Every loader started a timer and registered itself as listener, but neither
was stopped, so each loader kept running every tick until the server
restarted. Both are now stopped when the loader is stopped or replaced by a
new one.
2026-10-31 16:02:31 +01:00
YoyoNow d76c396268 Do not hide entities with the BauSystem hullhider
HullHider gets a hideEntities parameter: the fight still hides entities inside
hidden hulls, /hullhider only hides blocks. As the TechHider also dropped
spawn packets at hidden positions, ForPlayer#canAccessEntitySpawn decides
about them now, which the BauTechHider always allows.
2026-10-31 15:57:25 +01:00
YoyoNow abf44b2306 Allow @Linked on fields
The value of a @Linked field of a linked class is linked like a linked class
itself, e.g. registered as listener, and unlinked again on unlink. The field
has to be initialised when linking. HullHiderCommand and TPSSystem use it
instead of registering their listeners by hand.
2026-10-31 15:43:35 +01:00
YoyoNow a9fbb4cd8d Combine techhider, xray and hullhider scoreboard lines
As only one of /techhider, /xray and /hullhider can be active per region,
the scoreboard shows them in a single "View" line naming the active one.
2026-10-31 15:36:02 +01:00
YoyoNow f02f356b2b Add /hullhider to BauSystem
/hullhider hides the inside of the build area hull of a region from the
players who toggle it, like the hull hider of a fight. Each region gets its
own hull while somebody uses it; it is rebuilt every time somebody enables it,
as WorldEdit and Axiom changes do not update it. /techhider, /xray and
/hullhider exclude each other per player and region.

Which players may see the hull contents is now decided by Viewers, a sealed
class with HiddenByDefault (fight) and VisibleByDefault (bau). Added players
are stored in a set; isViewer alone defines what being added means.
2026-10-31 15:32:18 +01:00
YoyoNow ce2a23f4b8 Migrate BauSystem to the new TechHider and remove the legacy TechHider
The new TechHider registers a permanent global filter, so BauSystem now uses
a single BauTechHider that combines the hiding rules of the spectator
techhider, /techhider and /xray per player. To support the different
obfuscation blocks of these rules, ForPlayer now provides the obfuscation
block per position.

The ChunkHider now also checks single valued chunk sections, which were sent
unfiltered before, and recalculates their block count if they change.
Unhandled packet types are logged once; statistics, debug samples and ping
responses are passed through.

The legacy TechHider and its access widener entries are removed.
2026-10-31 15:00:37 +01:00
YoyoNow b8f61658f4 Cleanup Laufbau 2026-10-31 14:23:29 +01:00
YoyoNow 9935ab785d Fix NoClipCommand 2026-10-19 11:21:15 +02:00
YoyoNow 0c3e63d521 Restore BauweltMember cache and notify all dev servers on member changes
getBauMember never read its cache after the Exposed migration, so every
scoreboard render hit the DB (Too many connections, #479). Cache by
(bauwelt, member) incl. negative results, evict on addMember/remove, and
send BaumemberUpdatePacket to the Bauserver and all dev servers (also on
addmember). BauMemberUpdate clears the cache itself to not depend on
handler order.
2026-10-19 10:24:41 +02:00
YoyoNow d14ddc4fab Fix lag from PistonCalculator at high TPS
Bundle piston order recalculations into one run every 200ms (wall clock,
independent of TPS) instead of one full recalculation and entity rebuild
per piston/place/break event. Tracked pistons that get moved are removed
from the visualization instead of being moved along.

Fixes #227
2026-10-19 09:19:41 +02:00
YoyoNow 230f8c521a Use PistonStructureResolver in PistonCalculator
Numbering now comes directly from the vanilla resolver instead of a
custom breadth-first search, so the order matches the real move order
(including backtracking through slime/honey chains). The display of
more than 12 blocks is removed; a blocked piston is shown in red.

Refs: #158
2026-10-18 20:09:10 +02:00
YoyoNow 2302f9aafb Fix SmartPlace reversing debug stick 2026-10-15 18:14:19 +02:00
YoyoNow 2b42f0d13c Remove YAPION from BauSystem_Main module 2026-09-29 14:26:57 +02:00
Hut512 c3b3e3e60f Fix NoClip instant block break 2026-09-07 22:21:53 +02:00
Hut512 3aa1bf7ffd Fix scoreboard cleanup 2026-09-07 21:15:01 +02:00
YoyoNow 6f1403df9c Cleanup SWPlayer 2026-09-05 14:52:59 +02:00
YoyoNow ece12df0bc Add SteamEdit 2026-09-01 10:32:56 +02:00
YoyoNow cb744f6aa0 Add AntiPlayerCollision 2026-08-18 10:48:16 +02:00
YoyoNow 227f63c9ff Add AntiPlayerCollision 2026-08-18 10:39:58 +02:00
YoyoNow 32569f19d9 Closes: #468 2026-08-13 10:09:13 +02:00
YoyoNow 8dc101639d Add alias of /tick rate to /tick rate 20 2026-08-11 21:48:28 +02:00
YoyoNow 792620804a Improve TPSSystem 2026-08-11 21:46:38 +02:00
YoyoNow a59e9b4343 Closes: #323 2026-07-17 10:06:48 +02:00
YoyoNow 390d388692 Closes: #442 2026-07-16 16:32:35 +02:00
Sakziea dab443b989 Fix pullRequest comments 2026-07-16 16:23:52 +02:00
Sakziea bf3c65c630 Fix when no tnt isolated show normal 2026-07-14 19:47:08 +02:00
Sakziea b488c4ed7c Fix /trace isolate {id} showing tnt from other traces 2026-07-14 19:29:12 +02:00
Sakziea 2e795aaf8e Fix /trace 1 still showes all the tnt of that trace 2026-07-06 17:49:09 +02:00
Sakziea 7a601235f5 Fix Trace isolating the same Tnt shows all Tnts 2026-07-06 17:27:47 +02:00
Chaoscaot 7038dc2aa5 Merge branch 'main' into swui-v2 2026-06-17 21:49:52 +02:00
YoyoNow 806a1affea Merge pull request 'fix(BauSystem): advanced flag entities being misplaced' (#433) from wip/fix-advanced-flag into main
Reviewed-on: SteamWar/SteamWar#433
Reviewed-by: YoyoNow <4+yoyonow@noreply.localhost>
2026-06-17 21:14:27 +02:00
YoyoNow 48846a698f Fix TestblockCommand tab complete order 2026-06-17 21:04:34 +02:00
D4rkr34lm b771c95b99 Fix advanced flag and add lsp files to gitignore 2026-06-17 20:28:33 +02:00
YoyoNow 1269b7f00a Fix NoClipCommand 2026-06-12 22:16:00 +02:00
YoyoNow 669235709e Fix WorldEditListener 2026-06-12 15:14:09 +02:00
YoyoNow 1590f8f0ee Remove Reflection 2026-06-11 23:18:22 +02:00
YoyoNow 932732737d Unreflect more stuff 2026-06-11 22:35:13 +02:00
YoyoNow 2bc164c1b0 Extract widener definition into a widener.gradle.kts plugin 2026-06-11 20:38:33 +02:00
YoyoNow aa66b3dc83 Optimize imports 2026-06-11 18:29:44 +02:00
YoyoNow 641cefad01 Add comments to bausystem.accesswidener 2026-06-11 13:46:55 +02:00
YoyoNow eb866125ea Remove reflection from BauSystem 2026-06-11 13:45:49 +02:00
YoyoNow 786257ad0e Add initial AccessWidener 2026-06-11 12:22:44 +02:00
Chaoscaot 8050f51424 Cleanup for Merge
Signed-off-by: Chaoscaot <max@maxsp.de>
2026-06-10 21:43:02 +02:00
Chaoscaot e88a4c624b Merge branch 'main' into swui-v2 2026-06-10 09:28:16 +02:00
YoyoNow 0afb6ce06a Merge branch 'main' into BauSystem/RedstoneEngineCommand 2026-06-10 09:03:55 +02:00
Chaoscaot 5ce69e6b7a SWUI V2
Signed-off-by: Chaoscaot <max@maxsp.de>
2026-06-10 00:36:18 +02:00