From aeeefb7ae5c1e60a4a533bdb9ffdeb8b1cbf9cd9 Mon Sep 17 00:00:00 2001 From: Fluffy Jenkins <31552479+FluffyJenkins@users.noreply.github.com> Date: Mon, 13 Feb 2023 00:38:11 +0000 Subject: [PATCH] Added a Vec3 isBlockInShipyard (#417) --- .../main/kotlin/org/valkyrienskies/mod/common/VSGameUtils.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/src/main/kotlin/org/valkyrienskies/mod/common/VSGameUtils.kt b/common/src/main/kotlin/org/valkyrienskies/mod/common/VSGameUtils.kt index c4c90bdc9..2bb4b6347 100644 --- a/common/src/main/kotlin/org/valkyrienskies/mod/common/VSGameUtils.kt +++ b/common/src/main/kotlin/org/valkyrienskies/mod/common/VSGameUtils.kt @@ -224,6 +224,8 @@ fun Level.isBlockInShipyard(blockX: Int, blockY: Int, blockZ: Int) = fun Level.isBlockInShipyard(pos: BlockPos) = isBlockInShipyard(pos.x, pos.y, pos.z) +fun Level.isBlockInShipyard(pos: Vec3) = isBlockInShipyard(pos.x.toInt(), pos.y.toInt(), pos.z.toInt()) + fun Level.isBlockInShipyard(x: Double, y: Double, z: Double) = isBlockInShipyard(x.toInt(), y.toInt(), z.toInt())