diff --git a/base/src/main/kotlin/dev/nathanpb/dml/blockEntity/BlockEntityTrialKeystone.kt b/base/src/main/kotlin/dev/nathanpb/dml/blockEntity/BlockEntityTrialKeystone.kt index bb43e47f..c99ef2d9 100644 --- a/base/src/main/kotlin/dev/nathanpb/dml/blockEntity/BlockEntityTrialKeystone.kt +++ b/base/src/main/kotlin/dev/nathanpb/dml/blockEntity/BlockEntityTrialKeystone.kt @@ -273,7 +273,7 @@ class BlockEntityTrialKeystone(pos: BlockPos, state: BlockState) : val innerBlockPos = BlockPos(x, y, z) if ( innerBlockPos != pos - && innerBlockPos.getSquaredDistance(pos) <= config.trial.arenaRadius.squared() + && innerBlockPos.getSquaredDistance(pos) < config.trial.arenaRadius.squared() && world?.getBlockState(innerBlockPos)?.isAir != true ) { list += innerBlockPos diff --git a/base/src/main/kotlin/dev/nathanpb/dml/utils/Math.kt b/base/src/main/kotlin/dev/nathanpb/dml/utils/Math.kt index a6ceb09d..24ff9e4e 100644 --- a/base/src/main/kotlin/dev/nathanpb/dml/utils/Math.kt +++ b/base/src/main/kotlin/dev/nathanpb/dml/utils/Math.kt @@ -24,6 +24,7 @@ import kotlin.random.Random fun Double.lerp(min: Double, max: Double) = (1 - this) * min + this * max fun Int.lerp(min: Double, max: Double) = (1 - this) * min + this * max +fun Double.squared() = this * this fun Int.squared() = this * this // https://stackoverflow.com/a/35701777/9893963