refactor(SpigotCore): Techhider to ensure safety and improve reviewablity #338

Merged
YoyoNow merged 58 commits from FightSystem/fix-tech-and-hull-hider into main 2026-05-22 21:37:04 +02:00
Owner
No description provided.
D4rkr34lm added 4 commits 2026-05-13 20:15:05 +02:00
D4rkr34lm added 1 commit 2026-05-13 22:48:49 +02:00
D4rkr34lm added 1 commit 2026-05-14 11:57:31 +02:00
D4rkr34lm added 1 commit 2026-05-14 20:21:42 +02:00
D4rkr34lm added 1 commit 2026-05-14 21:38:44 +02:00
D4rkr34lm added 1 commit 2026-05-14 22:08:24 +02:00
D4rkr34lm added 1 commit 2026-05-15 00:32:14 +02:00
D4rkr34lm added 1 commit 2026-05-15 00:48:51 +02:00
Lixfel reviewed 2026-05-15 08:22:48 +02:00
@@ -38,6 +38,7 @@ dependencies {
compileOnly(libs.netty)
compileOnly(libs.authlib)
compileOnly(libs.fastutil)
compileOnly(libs.nms21)
Owner

Ganz schlechte Idee, im Main (versionsunabhängig) nms zu importieren.

Ganz schlechte Idee, im Main (versionsunabhängig) nms zu importieren.
D4rkr34lm marked this conversation as resolved
@@ -0,0 +1,502 @@
package com.comphenix.tinyprotocol;
Owner

Warum nochmal ne neue Reflection Klasse? Sowas müsste schon vorhanden sein (und schon aktiv genutzt werden, und für Kompatibilität mit neuerem Java optimiert worden sein)

Warum nochmal ne neue Reflection Klasse? Sowas müsste schon vorhanden sein (und schon aktiv genutzt werden, und für Kompatibilität mit neuerem Java optimiert worden sein)
D4rkr34lm marked this conversation as resolved
@@ -1,29 +1,24 @@
/*
Owner

Ist das einfach ein Revert auf upstream TinyProtocol? Damit gab es auch so manche Probleme, insbesondere mit Multiversionierung etc.

Ist das einfach ein Revert auf upstream TinyProtocol? Damit gab es auch so manche Probleme, insbesondere mit Multiversionierung etc.
D4rkr34lm marked this conversation as resolved
@@ -54,0 +427,4 @@
this.packetProcessors = processors;
this.interceptor = new TinyProtocol(plugin) {
Owner

Eine neue TinyProtocol-Instanz je TechHider? Paketprocessing wird ja auch noch von anderem Tooling (BauSystem) genutzt -> unpraktisch.

Eine neue TinyProtocol-Instanz je TechHider? Paketprocessing wird ja auch noch von anderem Tooling (BauSystem) genutzt -> unpraktisch.
D4rkr34lm marked this conversation as resolved
D4rkr34lm added 1 commit 2026-05-15 16:14:10 +02:00
D4rkr34lm added 1 commit 2026-05-15 16:23:28 +02:00
D4rkr34lm added 1 commit 2026-05-16 14:45:41 +02:00
D4rkr34lm added 1 commit 2026-05-16 19:19:56 +02:00
D4rkr34lm added 1 commit 2026-05-16 19:25:35 +02:00
D4rkr34lm added 1 commit 2026-05-16 20:14:13 +02:00
D4rkr34lm added 1 commit 2026-05-16 22:12:29 +02:00
D4rkr34lm added 1 commit 2026-05-17 13:49:49 +02:00
D4rkr34lm added 1 commit 2026-05-17 19:58:20 +02:00
Merge branch 'main' into FightSystem/fix-tech-and-hull-hider
Pull Request Build / Build (pull_request) Failing after 34s
270d82eb71
D4rkr34lm added 1 commit 2026-05-19 22:17:45 +02:00
Implement logic for hiding chunk data (not finished)
Pull Request Build / Build (pull_request) Failing after 55s
cf7a1ee086
D4rkr34lm added 1 commit 2026-05-19 22:47:27 +02:00
Finish initial implementation of logic
Pull Request Build / Build (pull_request) Failing after 56s
32a2cbb4dd
D4rkr34lm added 1 commit 2026-05-20 18:28:45 +02:00
Add tinyProtocol Handler for techhider
Pull Request Build / Build (pull_request) Failing after 55s
ba29e5cf23
D4rkr34lm added 1 commit 2026-05-20 21:30:49 +02:00
Started embedding new techhider into fight system
Pull Request Build / Build (pull_request) Failing after 58s
5da3767378
D4rkr34lm added 1 commit 2026-05-20 21:33:08 +02:00
Fix imports in tinyProtocol
Pull Request Build / Build (pull_request) Failing after 59s
a7a8c4d051
D4rkr34lm added 1 commit 2026-05-20 21:44:31 +02:00
removed reflections form anti nocom guard
Pull Request Build / Build (pull_request) Failing after 59s
7ed36fe56e
D4rkr34lm added 1 commit 2026-05-20 21:47:31 +02:00
cut down old protocol wrapper
Pull Request Build / Build (pull_request) Failing after 57s
72df919312
D4rkr34lm added 1 commit 2026-05-21 00:18:17 +02:00
resolve last compile issue in techhider
Pull Request Build / Build (pull_request) Failing after 1m4s
8424f842c3
D4rkr34lm added 1 commit 2026-05-21 10:26:51 +02:00
twast
Pull Request Build / Build (pull_request) Failing after 53s
a1d22b7d77
D4rkr34lm added 1 commit 2026-05-21 12:13:46 +02:00
fixes
Pull Request Build / Build (pull_request) Failing after 55s
dc0365834a
YoyoNow added 1 commit 2026-05-21 12:59:26 +02:00
Merge branch 'main' into FightSystem/fix-tech-and-hull-hider
Pull Request Build / Build (pull_request) Failing after 1m5s
c81e6b15e5
# Conflicts:
#	FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/utils/HullHider.java
#	SpigotCore/SpigotCore_Main/src/de/steamwar/core/events/AntiNocom.java
YoyoNow added 1 commit 2026-05-21 13:00:55 +02:00
Fix build
Pull Request Build / Build (pull_request) Failing after 1m9s
49fafa5955
YoyoNow added 1 commit 2026-05-21 13:05:18 +02:00
Remove unused stuff
Pull Request Build / Build (pull_request) Failing after 1m7s
1f44b3169e
D4rkr34lm added 2 commits 2026-05-21 15:08:45 +02:00
YoyoNow added 1 commit 2026-05-21 17:53:55 +02:00
Add BlockEntityType handling
Pull Request Build / Build (pull_request) Failing after 1m6s
c241aef932
YoyoNow added 1 commit 2026-05-21 18:11:46 +02:00
Add Sound handling
Pull Request Build / Build (pull_request) Failing after 1m5s
32fd4b4630
D4rkr34lm added 1 commit 2026-05-21 18:20:21 +02:00
Add bundle packet handling
Pull Request Build / Build (pull_request) Failing after 1m5s
29106d5bb5
D4rkr34lm added 1 commit 2026-05-21 18:41:59 +02:00
remove container hiding as it has no lacalaity mapping posibility
Pull Request Build / Build (pull_request) Failing after 1m5s
d07a86c13f
D4rkr34lm added 1 commit 2026-05-21 18:46:04 +02:00
remove unused reflection class
Pull Request Build / Build (pull_request) Failing after 1m5s
108aa2af9a
D4rkr34lm marked the pull request as ready for review 2026-05-21 18:47:52 +02:00
D4rkr34lm marked the pull request as work in progress 2026-05-21 19:45:16 +02:00
YoyoNow added 1 commit 2026-05-21 20:58:01 +02:00
Add blockUsedForObfuscation
Pull Request Build / Build (pull_request) Failing after 1m5s
9240bcfd5f
Chaoscaot requested changes 2026-05-21 22:50:30 +02:00
Chaoscaot left a comment
Owner

Da fehlt ein formatter :D

Da fehlt ein formatter :D
@@ -47,0 +54,4 @@
private final int BLOCKS_PER_SECTION = 4096;
private final int BIOMES_PER_SECTION = 64;
private final byte BITS_PER_LONG = 64;
Owner

Bitte Long.SIZE nutzen

Bitte Long.SIZE nutzen
D4rkr34lm marked this conversation as resolved
@@ -1,181 +1,565 @@
/*
* This file is a part of the SteamWar software.
*
* Copyright (C) 2025 SteamWar.de-Serverteam
Owner

dat bleibt.

dat bleibt.
D4rkr34lm marked this conversation as resolved
@@ -27,1 +7,4 @@
import it.unimi.dsi.fastutil.shorts.ShortArraySet;
import it.unimi.dsi.fastutil.shorts.ShortSets;
import net.minecraft.network.protocol.game.*;
import net.minecraft.resources.ResourceLocation;
Owner

Unused Import.

Unused Import.
D4rkr34lm marked this conversation as resolved
@@ -28,0 +21,4 @@
import net.minecraft.network.protocol.configuration.ClientboundSelectKnownPacks;
import net.minecraft.network.protocol.configuration.ClientboundUpdateEnabledFeaturesPacket;
import net.minecraft.network.protocol.cookie.ClientboundCookieRequestPacket;
import net.minecraft.network.protocol.game.*;
Owner

Unused Import.

Unused Import.
D4rkr34lm marked this conversation as resolved
@@ -48,1 +48,3 @@
public static final Reflection.Field<Integer> blockPositionZ = Reflection.getField(baseBlockPosition, int.class, 2);
private final Block blockUsedForObfuscation;
private final BlockState blockStateUsedForObfuscation;
private ChunkHider chunkHider;
Owner

may be final

may be final
D4rkr34lm marked this conversation as resolved
@@ -50,2 +52,2 @@
public static final Class<?> iBlockData = BlockState.class;
public static final Class<?> block = Block.class;
// TODO handle packet bundle
public TechHider(Block blockUsedForObfuscation) {
Owner

protected pls, ist ja abstract

protected pls, ist ja abstract
D4rkr34lm marked this conversation as resolved
@@ -53,3 +57,1 @@
public boolean iBlockDataHidden(BlockState iBlockData) {
return obfuscateIds.contains(BlockIds.impl.getCombinedId(iBlockData));
}
this.chunkHider = new ChunkHider(blockUsedForObfuscation) {
Owner

gibt dem ChunkHider lieber eine instanz vom Techhider, dann brauch es nicht diesen Proxy

gibt dem ChunkHider lieber eine instanz vom Techhider, dann brauch es nicht diesen Proxy
D4rkr34lm marked this conversation as resolved
@@ -75,3 +74,1 @@
this.hiddenBlockEntities = hiddenBlockEntities;
this.obfuscationTarget = CraftMagicNumbers.getBlock(obfuscationTarget).defaultBlockState();
this.obfuscationTargetId = BlockIds.impl.materialToId(obfuscationTarget);
this.bypassingPackets = new HashSet<>(List.of(
Owner

may be static

may be static
D4rkr34lm marked this conversation as resolved
@@ -102,2 +198,2 @@
private static final Reflection.Field<?> blockChangePosition = Reflection.getField(blockChangePacket, blockPosition, 0);
private static final Reflection.Field<?> blockChangeBlockData = Reflection.getField(blockChangePacket, iBlockData, 0);
BiFunction<Player, Packet<? extends PacketListener>, Packet<? extends PacketListener>> tossPacket = (p, packet) -> null;
Map<Class<? extends Packet<? extends PacketListener>>, BiFunction<Player, Packet<? extends PacketListener>, Packet<? extends PacketListener>>> processors = new HashMap<>();
Owner

could all be static

could all be static
D4rkr34lm marked this conversation as resolved
YoyoNow added 1 commit 2026-05-22 16:24:38 +02:00
D4rkr34lm added 1 commit 2026-05-22 16:32:53 +02:00
fix entities not despawning
Pull Request Build / Build (pull_request) Failing after 1m5s
7e18207b87
D4rkr34lm added 1 commit 2026-05-22 17:40:38 +02:00
add old techhider to skip supporting bausystem for now
Pull Request Build / Build (pull_request) Successful in 1m11s
7d74eb0c09
D4rkr34lm added 1 commit 2026-05-22 17:55:17 +02:00
Resolve open comments
Pull Request Build / Build (pull_request) Successful in 1m12s
d682e35159
D4rkr34lm added 1 commit 2026-05-22 17:57:18 +02:00
Fix constructor visiblity
Pull Request Build / Build (pull_request) Successful in 1m13s
ebc10c1ce4
D4rkr34lm added 1 commit 2026-05-22 18:27:58 +02:00
Fix preschem state and techider not being always active
Pull Request Build / Build (pull_request) Successful in 1m12s
e11f3f7cbc
D4rkr34lm added 1 commit 2026-05-22 19:40:04 +02:00
Ensure parity with old techhider by suppressing select packets
Pull Request Build / Build (pull_request) Successful in 1m11s
54fa47bd99
D4rkr34lm changed title from WIP:FightSystem/fix-tech-and-hull-hider to refactor(SpigotCore): Techhider to ensure safety and improve reviewablity 2026-05-22 19:43:38 +02:00
YoyoNow added 8 commits 2026-05-22 20:52:12 +02:00
Add chunk skipping optimisation
Pull Request Build / Build (pull_request) Failing after 1m8s
bede8caa82
Rmeove old player join quickfix
Pull Request Build / Build (pull_request) Failing after 1m6s
29d0c8978c
Fix section packet being unnececarily reconstructed
Pull Request Build / Build (pull_request) Failing after 1m6s
21f6394359
Sync with base branch
Pull Request Build / Build (pull_request) Successful in 1m13s
793f2de6c3
Inline get all regions
Pull Request Build / Build (pull_request) Successful in 1m12s
e55ca911c4
Fix inlineing
Pull Request Build / Build (pull_request) Successful in 1m21s
1810cb7546
Reviewed-on: #385
Reviewed-by: YoyoNow <4+yoyonow@noreply.localhost>
YoyoNow added 1 commit 2026-05-22 21:30:00 +02:00
Fix final formatting stuff
Pull Request Build / Build (pull_request) Failing after 1m7s
4f9fe07951
YoyoNow added 1 commit 2026-05-22 21:35:05 +02:00
Fix build
Pull Request Build / Build (pull_request) Successful in 1m15s
Backport CommonCore / Create CommonCore backport PRs (pull_request) Successful in 9s
23b5ab3e82
YoyoNow merged commit 7f21a31ec9 into main 2026-05-22 21:37:04 +02:00
YoyoNow deleted branch FightSystem/fix-tech-and-hull-hider 2026-05-22 21:37:04 +02:00
Sign in to join this conversation.