add Chunks#toChunkPos(Vector3ic, Vector3i)
@@ -116,6 +116,21 @@ public static Vector3i toChunkPos(int x, int y, int z, Vector3i dest) {
return toChunkPos(x, y, z, POWER_X, POWER_Y, POWER_Z, dest);
}
+ /**
+ * The position of the chunk given the coordinate and size of chunk in powers of 2.
+ * This uses the default power ({@link #POWER_X}, {@link #POWER_Y}, {@link #POWER_Z})
+ *
+ * <p>default chunk size ({@link #SIZE_X}, {@link #SIZE_Y}, {@link #SIZE_Z}) </p>
+ *
+ * @param pos absolute coordinate of the block
+ * @param dest will hold the result
+ * @return dest
+ */
+ public static Vector3i toChunkPos(Vector3ic pos, Vector3i dest) {
+ return toChunkPos(pos.x(), pos.y(), pos.z(), POWER_X, POWER_Y, POWER_Z, dest);
+ }
+
+
/**
* The position of the chunk given the coordinate and size of chunk in powers of 2.
*
