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
changed title from WIP:FightSystem/fix-tech-and-hull-hider to refactor(SpigotCore): Techhider to ensure safety and improve reviewablity2026-05-22 19:43:38 +02:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
@@ -38,6 +38,7 @@ dependencies {compileOnly(libs.netty)compileOnly(libs.authlib)compileOnly(libs.fastutil)compileOnly(libs.nms21)Ganz schlechte Idee, im Main (versionsunabhängig) nms zu importieren.
@@ -0,0 +1,502 @@package com.comphenix.tinyprotocol;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)
@@ -1,29 +1,24 @@/*Ist das einfach ein Revert auf upstream TinyProtocol? Damit gab es auch so manche Probleme, insbesondere mit Multiversionierung etc.
@@ -54,0 +427,4 @@this.packetProcessors = processors;this.interceptor = new TinyProtocol(plugin) {Eine neue TinyProtocol-Instanz je TechHider? Paketprocessing wird ja auch noch von anderem Tooling (BauSystem) genutzt -> unpraktisch.
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;Bitte Long.SIZE nutzen
@@ -1,181 +1,565 @@/** This file is a part of the SteamWar software.** Copyright (C) 2025 SteamWar.de-Serverteamdat bleibt.
@@ -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;Unused Import.
@@ -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.*;Unused Import.
@@ -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;may be final
@@ -50,2 +52,2 @@public static final Class<?> iBlockData = BlockState.class;public static final Class<?> block = Block.class;// TODO handle packet bundlepublic TechHider(Block blockUsedForObfuscation) {protected pls, ist ja abstract
@@ -53,3 +57,1 @@public boolean iBlockDataHidden(BlockState iBlockData) {return obfuscateIds.contains(BlockIds.impl.getCombinedId(iBlockData));}this.chunkHider = new ChunkHider(blockUsedForObfuscation) {gibt dem ChunkHider lieber eine instanz vom Techhider, dann brauch es nicht diesen Proxy
@@ -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(may be static
@@ -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<>();could all be static
WIP:FightSystem/fix-tech-and-hull-hiderto refactor(SpigotCore): Techhider to ensure safety and improve reviewablity