Skip to content

Commit

Permalink
Properly create chunks for Sodium fix
Browse files Browse the repository at this point in the history
  • Loading branch information
UserNugget committed Jun 13, 2024
1 parent 74296c5 commit 6d4ec93
Showing 1 changed file with 7 additions and 13 deletions.
20 changes: 7 additions & 13 deletions src/main/java/net/elytrium/limbofilter/LimboFilter.java
Original file line number Diff line number Diff line change
Expand Up @@ -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)
);
}
}
Expand Down

0 comments on commit 6d4ec93

Please sign in to comment.