diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/techhider/ChunkHider.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/techhider/ChunkHider.java
index 79559b56..0182d9e7 100644
--- a/SpigotCore/SpigotCore_Main/src/de/steamwar/techhider/ChunkHider.java
+++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/techhider/ChunkHider.java
@@ -22,32 +22,11 @@ package de.steamwar.techhider;
import io.netty.buffer.ByteBuf;
import lombok.Getter;
import net.minecraft.world.level.block.state.BlockState;
+import org.bukkit.Material;
import org.bukkit.entity.Player;
import java.util.Collections;
import java.util.Set;
-
-/*
- * This file is a part of the SteamWar software.
- *
- * Copyright (C) 2025 SteamWar.de-Serverteam
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see .
- */
-
-package de.steamwar.techhider;
-
import de.steamwar.Reflection;
import io.netty.buffer.Unpooled;
import net.minecraft.network.protocol.game.ClientboundLevelChunkPacketData;
@@ -232,7 +211,7 @@ public class ChunkHider {
if(blockIdsToObfuscate.contains(entry))
entry = blockIdToObfuscateTo;
- if(entry == TechHider.AIR_ID)
+ if(entry == BlockIds.impl.materialToId(Material.AIR))
air = i;
else if(entry == blockIdToObfuscateTo)
target = i;
diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/techhider/TechHiderUpdated.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/techhider/TechHiderUpdated.java
index 7ad1f958..64d12b8a 100644
--- a/SpigotCore/SpigotCore_Main/src/de/steamwar/techhider/TechHiderUpdated.java
+++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/techhider/TechHiderUpdated.java
@@ -181,10 +181,13 @@ public class TechHiderUpdated {
}
}
+ private final Reflection.Field sectionPosField = Reflection.getField(ClientboundSectionBlocksUpdatePacket.class, SectionPos.class, 0);
+ private final Reflection.Field oldPosField = Reflection.getField(ClientboundSectionBlocksUpdatePacket.class, short[].class, 0);
+ private final Reflection.Field oldStatesField = Reflection.getField(ClientboundSectionBlocksUpdatePacket.class, BlockState[].class, 0);
private ClientboundSectionBlocksUpdatePacket processSectionUpdate(Player p, ClientboundSectionBlocksUpdatePacket packet) {
- SectionPos sectionPos = packet.sectionPos;
- short[] oldPos = packet.positions;
- BlockState[] oldStates = packet.states;
+ SectionPos sectionPos = sectionPosField.get(packet);
+ short[] oldPos = oldPosField.get(packet);
+ BlockState[] oldStates = oldStatesField.get(packet);
boolean modified = false;
List filteredPos = new ArrayList<>(oldPos.length);