for (int z = 0; z < 32; z++) {
Block b = chunk.get(x, y, z);
int gx = p.x * 32 + x;
int gy = p.y * 16 + y;
int gz = p.z * 32 + z;
HighestBlockChunk hbc = chunks.getHighestBlockChunkAtXY(gx, gy, tmp2);
simBlock(gx, gy, gz, chunk, hbc, b, step, deltas);
int lx = gx - chunk.cx*32;
int ly = gy - chunk.cy*16;
int lz = gz - chunk.cz*32;
chunk.nextSimStep = Math.min(chunk.nextSimSteps[lx][ly][lz], chunk.nextSimStep);