From cdaa82bdfaea121992e6a42fdcb98afeb507c798 Mon Sep 17 00:00:00 2001 From: ChomeNS <95471003+ChomeNS@users.noreply.github.com> Date: Wed, 21 May 2025 18:15:42 +0700 Subject: [PATCH] fix: OOB on core exist and complete (happen when bot switch to dimensions like nether and/or the end) --- .../me/chayapak1/chomens_bot/plugins/CorePlugin.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/main/java/me/chayapak1/chomens_bot/plugins/CorePlugin.java b/src/main/java/me/chayapak1/chomens_bot/plugins/CorePlugin.java index 3bd49d67..1d7c54c6 100644 --- a/src/main/java/me/chayapak1/chomens_bot/plugins/CorePlugin.java +++ b/src/main/java/me/chayapak1/chomens_bot/plugins/CorePlugin.java @@ -377,9 +377,11 @@ public class CorePlugin implements Listener { for (int y = from.getY(); y <= to.getY(); y++) { for (int z = from.getZ(); z <= to.getZ(); z++) { for (int x = from.getX(); x <= to.getX(); x++) { - final int block = bot.world.getBlock(x, y, z); + try { + final int block = bot.world.getBlock(x, y, z); - if (!isCommandBlockState(block)) return false; + if (!isCommandBlockState(block)) return false; + } catch (final Exception ignored) { } } } } @@ -398,9 +400,11 @@ public class CorePlugin implements Listener { for (int y = from.getY(); y <= to.getY(); y++) { for (int z = from.getZ(); z <= to.getZ(); z++) { for (int x = from.getX(); x <= to.getX(); x++) { - final int block = bot.world.getBlock(x, y, z); + try { + final int block = bot.world.getBlock(x, y, z); - if (isCommandBlockState(block)) return true; + if (isCommandBlockState(block)) return true; + } catch (final Exception ignored) { } } } }