少し助けが必要です。基本的には世界の2つの座標間のブロック数を計算したいのですが、ご覧のとおり数学が苦手なので、解決策があれば書いてください。大事なことなので書いていただけるとありがたいです!
int x1 = 0, y1 = 0, z1 = 0, x2 = 0, y2 = 0, z2 = 0;
x2 = x // pos x in the coord
y2 = y // pos y in the coord
z2 = z // pos z in the coord
x1 = x;
y1 = y;
z1 = z;
int a = Math.abs(Math.abs(x1)-(Math.abs(x2)));
int b = Math.abs(Math.abs(y1)-(Math.abs(y2)));
int c = Math.abs(Math.abs(z1)-(Math.abs(z2)));
if(x2 != 0)
int volume = a*b*c;