it happened while testing my placeAt function.
memory usage sums up for some reason, and excessive use would cause concurrentmodificationexception : null and crash client.
used script:
client = getMinecraftClient();
player = client.getPlayer();
world = client.getWorld();
fun isSpawnableBlock(x,y,z){
return (world.getBlockAt(x,y,z).getBlockId().containsString("air") && world.getBlockAt(x,y+1,z).getBlockId().containsString("air") && world.getBlockAt(x,y-1,z).getBlockId() == "stone") ;
}
centerX = 0.5;
centerY = 0.5;
centerZ = 0.5;
placeCount = 0;
radius = 129;
x = centerX-radius;
while (x <= centerX+radius){
y = centerY-radius;
while (y <= centerY+radius){
z = centerZ-radius;
while (z <= centerZ+radius){
ax = x;
ay = y;
az = z;
if ((ax-centerX) ^2 + (ay-centerY)^2 + (az-centerZ)^2 > radius * radius) {z = z+1;continue;}
if(isSpawnableBlock(ax,ay,az)){
player.placeAt(ax,ay,az);
placeCount = placeCount + 1;
sleep(65);
}
z = z+1;
}
y=y+1;
}
x=x+1;
}
I was testing with Rug, at creative mode, allowing Any block placing action with extended reach in single player.
upper code will crash client, but if I add some 'pause'
if (placeCount > 384) { placeCount = 0; sleep(5000);}
it happened while testing my placeAt function. memory usage sums up for some reason, and excessive use would cause concurrentmodificationexception : null and crash client.
used script:
I was testing with Rug, at creative mode, allowing Any block placing action with extended reach in single player. upper code will crash client, but if I add some 'pause'
if (placeCount > 384) { placeCount = 0; sleep(5000);}
then it does not crash.