FIXIES AUTO REFILL ??

This commit is contained in:
Chayapak 2023-09-24 09:12:33 +07:00
parent e0c7804aa7
commit 1604b0a996

View file

@ -70,13 +70,17 @@ public class CommandCore {
timer.schedule(task, 50, 50); timer.schedule(task, 50, 50);
timer.schedule(refillTask, 50, 900); timer.schedule(refillTask, 50, 1000);
} }
private void tick () { private void tick () {
final ClientPlayNetworkHandler networkHandler = client.getNetworkHandler(); final ClientPlayNetworkHandler networkHandler = client.getNetworkHandler();
if (networkHandler == null) cleanup(); if (networkHandler == null) {
cleanup();
return;
}
reloadRelativeArea(); reloadRelativeArea();
@ -92,10 +96,10 @@ public class CommandCore {
if (networkHandler == null || withPos == null) return; if (networkHandler == null || withPos == null) return;
for (int x = withPos.start.getX(); x <= withPos.end.getX(); x++) { try {
for (int y = withPos.start.getY(); y <= withPos.end.getY(); y++) { for (int x = withPos.start.getX(); x <= withPos.end.getX(); x++) {
for (int z = withPos.start.getZ(); z <= withPos.end.getZ(); z++) { for (int y = withPos.start.getY(); y <= withPos.end.getY(); y++) {
try { for (int z = withPos.start.getZ(); z <= withPos.end.getZ(); z++) {
final BlockPos pos = new BlockPos(x, y, z); final BlockPos pos = new BlockPos(x, y, z);
final ClientWorld world = client.world; final ClientWorld world = client.world;
@ -109,11 +113,11 @@ public class CommandCore {
shouldRefill = true; shouldRefill = true;
return; return;
} catch (Exception e) {
e.printStackTrace();
} }
} }
} }
} catch (Exception e) {
e.printStackTrace();
} }
} }