From b040f07f8b1bc795ba02b8701048e75e30b6a608 Mon Sep 17 00:00:00 2001 From: ChomeNS Date: Fri, 24 Mar 2023 16:28:56 +0700 Subject: [PATCH] fix a kinda major core problem me used >= real --- .../me/chayapak1/chomens_bot/plugins/CorePlugin.java | 11 +++++++---- 1 file changed, 7 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 8837379..c1387be 100644 --- a/src/main/java/me/chayapak1/chomens_bot/plugins/CorePlugin.java +++ b/src/main/java/me/chayapak1/chomens_bot/plugins/CorePlugin.java @@ -36,7 +36,7 @@ public class CorePlugin extends PositionPlugin.PositionListener { public Vector3i relativeCorePosition = Vector3i.from(coreStart); - private boolean kaboom; + private final boolean kaboom; public CorePlugin (Bot bot) { this.bot = bot; @@ -84,17 +84,20 @@ public class CorePlugin extends PositionPlugin.PositionListener { x++; - if (x >= coreEnd.getX()) { + if (x > coreEnd.getX()) { x = coreStart.getX(); + bot.logger().log("x is more than limit (" + coreEnd.getX() + ") so adding z.."); z++; } - if (z >= coreEnd.getZ()) { + if (z > coreEnd.getZ()) { z = coreStart.getZ(); + bot.logger().log("z is more than limit (" + coreEnd.getZ() + ") so adding y.."); y++; } - if (y >= coreEnd.getY()) { + if (y > coreEnd.getY()) { + bot.logger().log("y is more than limit (" + coreEnd.getY() + ") so resetting everything.."); x = coreStart.getX(); y = coreStart.getY(); z = coreStart.getZ();