Commit Graph
249 Commits
Author SHA1 Message Date
YoyoNow d1fb4ca67e Allow removing hulls and resend their chunks
HullHider#removeHull stops hiding a hull: it shows the entities and REntities
the hull hid and resends its chunks to everybody who could not view it. A hull
is enabled again by adding and initialising it.

Hull#resendChunks only resends chunks the player has loaded. HullHider now
resends the chunks to non-viewers after initialising a hull itself, so
FightHullHider no longer does it.
2026-10-31 15:09:04 +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 7d4252325a Extract obfuscation config into HiderCore
ObfuscationConfig resolves the hidden blocks, block states (including all
waterlogged states when water is hidden) and block entity types plus the
obfuscation block, either from a gamemode's techhider config or from plain
materials. TechHiderWrapper now only contains the fight specific access rules.
2026-10-31 14:50:32 +01:00
YoyoNow da4b684a4b Move Hull and generic HullHider into HiderCore
Hull no longer depends on FightSystem: plugin, world, region, ground
visibility and hidden blocks are passed in. HullRegion is the common block
box hulls work on. The generic HullHider<K> manages one hull per key and does
the block, entity and REntity tracking; FightHullHider keeps the fight
specific parts (team hulls, viewer rules, state dependent registration).

Entities are now checked against the hull with block coordinates, so entities
in the bottom layer and at the max z edge are handled correctly.
2026-10-31 14:49:00 +01:00
YoyoNow a3a97ee102 Move TechHider into new HiderCore module
HiderCore holds the TechHider, ChunkHider and AccessPrivilegeProvider so that
FightSystem and BauSystem can both shade it. BlockIds and ProtocolUtils stay in
SpigotCore (used by AntiNocom and RFallingBlockEntity) and move to
de.steamwar.core to avoid a split package. The access widener entries the
TechHider needs are duplicated into hidercore.accesswidener; the legacy
TechHider still needs its own copies in SpigotCore.
2026-10-31 14:44:55 +01:00
YoyoNow fc090c2b48 Remove Hull primary direction 2026-10-31 12:49:28 +01:00
YoyoNow 6c99f1f9c9 Resend hull chunks to non-viewers after hull initialisation
Chunks encoded while the hull was filled as hidden contain obfuscated
blocks that become visible after initialize, and no block update is
generated for them. Reload the team's extend region for all players
that cannot see the hull.
2026-10-27 10:12:07 +01:00
YoyoNow b47cff2805 Make TechHider hidden regions consistent for spectators
Spectators hid HiddenBlocks in the whole arena for block updates, but
full chunk packets outside both extend regions were sent unfiltered, so
the same blocks were hidden or visible depending on the packet type.

Hidden regions are now a list: spectators hide both team extend
regions, team members the opposite one. Block checks and the per-chunk
bypass use the same regions, so everything outside the extend regions
is visible and unfiltered.
2026-10-27 09:58:16 +01:00
YoyoNow 7cd2e540ef Make TechHider access checks player-scoped
AccessPrivilegeProvider#forPlayer returns a PlayerAccess that resolves
the player's hidden region once. TechHider creates it once per outer
packet (shared across bundle sub-packets) and passes it to every
processor, so all decisions within a packet are consistent and the
region/referee lookup no longer runs per block on the netty thread.
2026-10-27 09:50:59 +01:00
YoyoNow 8381cacdf8 Avoid NPE race when computing the TechHider hidden region
getHiddenRegion looked the player up in FightTeam.players twice (team,
then FightPlayer) on netty threads. A concurrent reset or removePlayer
made the second lookup return null, the NPE was swallowed by the global
filter and the packet was dropped. Resolve the FightPlayer once and
derive team and canEntern from it.
2026-10-27 09:28:05 +01:00
YoyoNow 0ef702da9e Hide hulls from players by default in HullHider
Hull kept a set of affected players that was only filled by a join
listener active in the Schem states, so spectators joining earlier were
never hidden from the hull. The set was also a plain HashSet read on
netty threads, where a racing lookup meant "not hidden".

Invert it into a concurrent set of viewers (referees, own team, boarded
players); everyone else is hidden by default.

- Hull: viewer UUID set with addViewer/removeViewer/forgetViewer, a
  null player counts as hidden
- Hull: entities are hidden/shown when they enter/leave the hull for all
  non-viewer online players; uncovered blocks go to non-viewers
- HullHider: join/quit handled in a listener active in every state; quit
  clears the viewer entry
- HullHider: TeamDeathEvent re-hides the enemy hull and resends its chunks
- FightPlayer: stop the enter countdown before firing TeamDeathEvent so
  listeners see canEntern() == false
2026-10-27 09:23:31 +01:00
Sakziea cb38460c4b Merge branch 'main' into FightSystem/WaterRemover 2026-10-26 13:26:31 +01:00
Sakziea a4e06bcfd5 Fix Bubble Colums get removed by WaterRemover 2026-10-26 13:23:07 +01:00
YoyoNow bfbf98c1d6 Fix GUI.schemDialog for overriden Public list 2026-10-23 11:05:28 +02:00
YoyoNow c4b46e4431 Add override for Publics in GameModeConfig.Schematic 2026-10-21 08:22:05 +02:00
YoyoNow 9fe05b59e4 Rework chat into Velocity-managed channels
Chat is now handled entirely by VelocityCore through channels with
separate readers and writers (Global, Local/Fight, Blue/Red fight team,
Team, ServerTeam, Alert and 1:1 direct messages). Each player has a
saved default channel; messages from other channels are tagged with
the channel name, and every default change is announced.

- /global, /local, /tc, /stc, /msg and /r switch the default channel
  when called without a message
- /chat <channel> switches, /chat <channel> join|leave toggles reading
  (saved); moderators can join arenas by name and write with
  /chat <channel> msg <text>
- '+' sends from global to local and from local/fight to the fight team
- Referees write yellow in the fight chat
- Subservers no longer receive chat; arenas get a record-only
  ChatRecordPacket so replays keep their chat
- Remove the chat listeners of SpigotCore, FightSystem, MissileWars,
  TowerRun and TNTLeague

Closes #460, #129
2026-10-15 19:55:25 +02:00
YoyoNow ece12df0bc Add SteamEdit 2026-09-01 10:32:56 +02:00
YoyoNow ea3aad3bd2 Initial FightSWCommand 2026-08-29 12:52:09 +02:00
YoyoNow d307f890e2 Remove debug output 2026-08-26 22:35:39 +02:00
YoyoNow 97c1da1b2a Add debug output 2026-08-26 22:31:30 +02:00
YoyoNow 8a53aecfac Add debug output 2026-08-26 22:26:43 +02:00
YoyoNow 5236afba17 Add debug output 2026-08-26 22:17:33 +02:00
YoyoNow d3c8b6e1c6 Add debug output 2026-08-26 22:12:53 +02:00
YoyoNow 38e845b0e4 Improve AutoChecker and GameModeConfig again 2026-08-26 21:46:45 +02:00
YoyoNow 5a52771ec1 Improve items for GameModeConfig 2026-08-24 20:05:58 +02:00
YoyoNow f19e4158e7 Fix Check 2026-08-13 10:01:55 +02:00
YoyoNow 6c46b5b2a2 Fix Check 2026-08-13 09:51:56 +02:00
YoyoNow 4aa7c99a6e Fix Check and CheckCommand permission 2026-08-11 21:05:36 +02:00
Sakziea 1d2ac4f705 Fix pull Request comment 2026-07-18 14:58:24 +02:00
Sakziea b48c75ef74 Remove unused imports 2026-07-18 12:49:23 +02:00
Sakziea 8b6ea12a08 Add Wind charge config 2026-07-18 12:43:46 +02:00
Sakziea 801678ddd3 Fix Wind charges cross middle and interact with Blocks 2026-07-18 12:43:23 +02:00
Sakziea e5cc874834 Fix Windcharge remove Water 2026-07-18 11:08:51 +02:00
D4rkr34lm e07298e748 Move listener to permanent 2026-06-17 21:21:17 +02:00
D4rkr34lm d7ba19049a Add event handler 2026-06-17 21:10:55 +02:00
D4rkr34lm 47909b6f07 Add listener to prevent dried ghasts from growing 2026-06-17 21:09:07 +02:00
YoyoNow 6cbfc94e6d Merge pull request 'Access widener for paper' (#420) from AccessWidener into main
Reviewed-on: SteamWar/SteamWar#420
Reviewed-by: Chaoscaot <max@chaoscaot.de>
2026-06-12 11:16:33 +02:00
YoyoNow c0ff123279 Fix EntityDamage only applying cancel for Player 2026-06-12 11:09:13 +02:00
YoyoNow 711920464a Remove some deprecated code in favor of newer code 2026-06-12 09:37:43 +02:00
YoyoNow c362a3e1f0 Remove unused code 2026-06-11 23:24:11 +02:00
YoyoNow 932732737d Unreflect more stuff 2026-06-11 22:35:13 +02:00
YoyoNow aa66b3dc83 Optimize imports 2026-06-11 18:29:44 +02:00
YoyoNow f5d9c6e175 Unreflect everything 2026-06-11 18:26:15 +02:00
D4rkr34lm 1de17d27f4 Fix arrow stopper 2026-05-30 11:55:59 +02:00
D4rkr34lm 69b924ded6 fix techhider not hiding waterlogged blocks if neccecary 2026-05-23 12:29:19 +02:00
D4rkr34lm 5d70f75ac9 Move techhider init into enable to prevent always active even in check and test state 2026-05-22 23:12:39 +02:00
YoyoNow 23b5ab3e82 Fix build 2026-05-22 21:35:01 +02:00
YoyoNow 4f9fe07951 Fix final formatting stuff 2026-05-22 21:29:58 +02:00
D4rkr34lm 1810cb7546 Fix inlineing 2026-05-22 20:51:24 +02:00
D4rkr34lm e55ca911c4 Inline get all regions 2026-05-22 20:41:05 +02:00