Skip to content

Commit

Permalink
Fix #140
Browse files Browse the repository at this point in the history
  • Loading branch information
Luligabi1 committed Nov 11, 2023
1 parent 5fd50b8 commit 53c50de
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions base/src/main/kotlin/dev/nathanpb/dml/utils/Math.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 53c50de

Please sign in to comment.