@nxg-org/mineflayer-util-plugin 1.7.3 → 1.7.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/calcs/aabb.js +3 -3
- package/package.json +1 -1
package/lib/calcs/aabb.js
CHANGED
|
@@ -42,7 +42,7 @@ class AABB {
|
|
|
42
42
|
return new vec3_1.Vec3(this.maxX, this.maxY, this.maxZ);
|
|
43
43
|
}
|
|
44
44
|
bottomMiddlePoint() {
|
|
45
|
-
return new vec3_1.Vec3(
|
|
45
|
+
return new vec3_1.Vec3((this.maxX - this.minX) / 2, this.minY, (this.maxZ - this.minZ) / 2);
|
|
46
46
|
}
|
|
47
47
|
heightAndWidths() {
|
|
48
48
|
return new vec3_1.Vec3(this.maxX - this.minX, this.maxY - this.minY, this.maxZ - this.minZ);
|
|
@@ -73,8 +73,8 @@ class AABB {
|
|
|
73
73
|
* @returns {number[][]} single element long array of shapes.
|
|
74
74
|
*/
|
|
75
75
|
toShapeFromBottomMiddle() {
|
|
76
|
-
const wx =
|
|
77
|
-
const wz =
|
|
76
|
+
const wx = (this.maxX - this.minX) / 2;
|
|
77
|
+
const wz = (this.maxZ - this.minZ) / 2;
|
|
78
78
|
return [[-wx, 0, -wz, wx, this.maxY - this.minY, wz]];
|
|
79
79
|
}
|
|
80
80
|
toVertices() {
|