From e066654ea3862fa772dcdfb2546aef7ef6b6ab59 Mon Sep 17 00:00:00 2001 From: 19MisterX98 <41451155+19MisterX98@users.noreply.github.com> Date: Sun, 27 Aug 2023 18:12:38 +0200 Subject: [PATCH] Fix Block ESP (#4009) --- .../meteorclient/systems/modules/render/blockesp/ESPChunk.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/meteordevelopment/meteorclient/systems/modules/render/blockesp/ESPChunk.java b/src/main/java/meteordevelopment/meteorclient/systems/modules/render/blockesp/ESPChunk.java index cc39ce2a30..0fac693cf3 100644 --- a/src/main/java/meteordevelopment/meteorclient/systems/modules/render/blockesp/ESPChunk.java +++ b/src/main/java/meteordevelopment/meteorclient/systems/modules/render/blockesp/ESPChunk.java @@ -21,7 +21,6 @@ import static meteordevelopment.meteorclient.utils.Utils.getRenderDistance; public class ESPChunk { - private static final BlockPos.Mutable blockPos = new BlockPos.Mutable(); private final int x, z; public Long2ObjectMap blocks; @@ -91,6 +90,8 @@ public static ESPChunk searchChunk(Chunk chunk, List blocks) { ESPChunk schunk = new ESPChunk(chunk.getPos().x, chunk.getPos().z); if (schunk.shouldBeDeleted()) return schunk; + BlockPos.Mutable blockPos = new BlockPos.Mutable(); + for (int x = chunk.getPos().getStartX(); x <= chunk.getPos().getEndX(); x++) { for (int z = chunk.getPos().getStartZ(); z <= chunk.getPos().getEndZ(); z++) { int height = chunk.getHeightmap(Heightmap.Type.WORLD_SURFACE).get(x - chunk.getPos().getStartX(), z - chunk.getPos().getStartZ());