From 6d4ec93b6c9ee9e4b8155824139c2914ebcef551 Mon Sep 17 00:00:00 2001 From: UserNugget Date: Thu, 13 Jun 2024 15:43:49 +0300 Subject: [PATCH] Properly create chunks for Sodium fix --- .../net/elytrium/limbofilter/LimboFilter.java | 20 +++++++------------ 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/src/main/java/net/elytrium/limbofilter/LimboFilter.java b/src/main/java/net/elytrium/limbofilter/LimboFilter.java index 940c455..07400ca 100644 --- a/src/main/java/net/elytrium/limbofilter/LimboFilter.java +++ b/src/main/java/net/elytrium/limbofilter/LimboFilter.java @@ -241,21 +241,15 @@ public void reload() { // Make LimboAPI preload parent to captcha chunks to ensure that Sodium can properly render captcha. if (Settings.IMP.MAIN.FRAMED_CAPTCHA.FRAMED_CAPTCHA_ENABLED) { Settings.MAIN.FRAMED_CAPTCHA settings = Settings.IMP.MAIN.FRAMED_CAPTCHA; - Settings.MAIN.FRAMED_CAPTCHA.COORDS.OFFSET_1_7 offset = settings.COORDS.OFFSET_1_7; - - for (int y = 0; y < settings.HEIGHT; y++) { - for (int x = 0; x < settings.WIDTH; x++) { - int id = y * settings.WIDTH + x; - int entityId = id + 10; - - this.filterWorld.getChunkOrNew( - (settings.COORDS.X + x + offset.X) >> 4, - (settings.COORDS.Z + offset.Z) >> 4 - ); + for (int x = 0; x < settings.WIDTH; x++) { + this.filterWorld.getChunkOrNew(settings.COORDS.X + x, settings.COORDS.Z); + } + for (int x = -1; x <= 1; x++) { + for (int z = -1; z <= 1; z++) { this.filterWorld.getChunkOrNew( - (settings.COORDS.X + x) >> 4, - (settings.COORDS.Z) >> 4 + (int) captchaCoords.CAPTCHA_X + (x * 16), + (int) captchaCoords.CAPTCHA_Z + (z * 16) ); } }