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.
This commit is contained in:
2026-10-31 15:00:37 +01:00
parent 7d4252325a
commit ce2a23f4b8
16 changed files with 295 additions and 644 deletions
@@ -70,7 +70,7 @@ public class TechHiderWrapper extends StateDependent implements Listener {
@Override
public void enable() {
ObfuscationConfig obfuscation = ObfuscationConfig.of(Config.GameModeConfig.Techhider);
new TechHider(obfuscation.getObfuscateWith(), newProvider(obfuscation));
new TechHider(newProvider(obfuscation));
}
private AccessPrivilegeProvider newProvider(ObfuscationConfig obfuscation) {
@@ -150,6 +150,11 @@ public class TechHiderWrapper extends StateDependent implements Listener {
public boolean canAccessBlockEntity(int blockX, int blockY, int blockZ, BlockEntityType<?> type) {
return !isHidden(blockX, blockY, blockZ) || !obfuscation.hidesBlockEntity(type);
}
@Override
public BlockState getObfuscation(int blockX, int blockY, int blockZ) {
return obfuscation.getObfuscationState();
}
}
@Override