fix: try to fix maddy's spam (doesn't do much..)

yes i'm also planning to create deploy core, which should evade all cspy spams, but i'm not sure how well that will perform in a minecraft client
my another plan is to only fill the core only when it's needed, like only when the chat is open (for custom chat), or when there's a cloop running
This commit is contained in:
Chayapak Supasakul 2025-04-19 09:23:28 +07:00
parent 69909de327
commit ea16395c15
Signed by: ChomeNS
SSH key fingerprint: SHA256:0YoxhdyXsgbc0nfeB2N6FYE60mxMU7DS4uCUMaw2mvA

View file

@ -16,6 +16,7 @@ import net.minecraft.network.packet.c2s.play.UpdateCommandBlockC2SPacket;
import net.minecraft.util.math.BlockBox;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Vec3d;
import net.minecraft.world.chunk.Chunk;
import net.minecraft.world.dimension.DimensionType;
import java.util.Timer;
@ -162,7 +163,11 @@ public class CommandCore {
}
public void refill () {
if (!runFillCommand || withPos == null) return;
if (!runFillCommand || client.world == null || withPos == null) return;
final Chunk chunk = client.world.getChunk(withPos.getCenter());
if (chunk == null) return;
final String command = String.format(
"fill %s %s %s %s %s %s command_block",