aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/features/diana/NearbyBurrowsSolver.kt
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2025-11-17 19:55:02 +0100
committerLinnea Gräf <nea@nea.moe>2025-11-17 19:55:02 +0100
commitc93a04a001b0f66b2724d46b04b6d1ed49a08d07 (patch)
tree5869ca70acc482ef0362f27785c3d3f1cbb9ffae /src/main/kotlin/features/diana/NearbyBurrowsSolver.kt
parentaf9893b59407c69d31ebd2ed513f0396ab4d2dc9 (diff)
downloadFirmament-c93a04a001b0f66b2724d46b04b6d1ed49a08d07.tar.gz
Firmament-c93a04a001b0f66b2724d46b04b6d1ed49a08d07.tar.bz2
Firmament-c93a04a001b0f66b2724d46b04b6d1ed49a08d07.zip
refactor: port to mojmaps
Diffstat (limited to 'src/main/kotlin/features/diana/NearbyBurrowsSolver.kt')
-rw-r--r--src/main/kotlin/features/diana/NearbyBurrowsSolver.kt12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/main/kotlin/features/diana/NearbyBurrowsSolver.kt b/src/main/kotlin/features/diana/NearbyBurrowsSolver.kt
index e1fb856..35af660 100644
--- a/src/main/kotlin/features/diana/NearbyBurrowsSolver.kt
+++ b/src/main/kotlin/features/diana/NearbyBurrowsSolver.kt
@@ -2,10 +2,10 @@ package moe.nea.firmament.features.diana
import me.shedaniel.math.Color
import kotlin.time.Duration.Companion.seconds
-import net.minecraft.particle.ParticleTypes
-import net.minecraft.util.math.BlockPos
-import net.minecraft.util.math.MathHelper
-import net.minecraft.util.math.Position
+import net.minecraft.core.particles.ParticleTypes
+import net.minecraft.core.BlockPos
+import net.minecraft.util.Mth
+import net.minecraft.core.Position
import moe.nea.firmament.annotations.Subscribe
import moe.nea.firmament.events.ParticleSpawnEvent
import moe.nea.firmament.events.ProcessChatEvent
@@ -63,7 +63,7 @@ object NearbyBurrowsSolver {
fun onParticles(event: ParticleSpawnEvent) {
if (!DianaWaypoints.TConfig.nearbyWaypoints) return
- val position: BlockPos = event.position.toBlockPos().down()
+ val position: BlockPos = event.position.toBlockPos().below()
if (wasRecentlyDug(position)) return
@@ -135,5 +135,5 @@ object NearbyBurrowsSolver {
}
fun Position.toBlockPos(): BlockPos {
- return BlockPos(MathHelper.floor(x), MathHelper.floor(y), MathHelper.floor(z))
+ return BlockPos(Mth.floor(x()), Mth.floor(y()), Mth.floor(z()))
}