aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/utils
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-12-10 04:33:56 +0100
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-12-10 04:33:56 +0100
commitc1ccf0ef9b7e3672bc295f9aa124d4415ed8588e (patch)
treeaf63a05e7004974b2ebe843eec547748baac7ac2 /src/main/java/at/hannibal2/skyhanni/utils
parent873378ed823de01b4be4900c0f4893acb1e97f03 (diff)
downloadskyhanni-c1ccf0ef9b7e3672bc295f9aa124d4415ed8588e.tar.gz
skyhanni-c1ccf0ef9b7e3672bc295f9aa124d4415ed8588e.tar.bz2
skyhanni-c1ccf0ef9b7e3672bc295f9aa124d4415ed8588e.zip
Fixed toBlocPos -> toBlockPos
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/utils')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/BlockUtils.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/EntityUtils.kt12
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/LorenzVec.kt2
3 files changed, 8 insertions, 10 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/BlockUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/BlockUtils.kt
index 5b8c8a0c0..724ed3dd7 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/BlockUtils.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/BlockUtils.kt
@@ -14,10 +14,10 @@ object BlockUtils {
getBlockStateAt().block
fun LorenzVec.getBlockStateAt(): IBlockState =
- Minecraft.getMinecraft().theWorld.getBlockState(toBlocPos())
+ Minecraft.getMinecraft().theWorld.getBlockState(toBlockPos())
fun LorenzVec.isInLoadedChunk(): Boolean =
- Minecraft.getMinecraft().theWorld.chunkProvider.provideChunk(toBlocPos()).isLoaded
+ Minecraft.getMinecraft().theWorld.chunkProvider.provideChunk(toBlockPos()).isLoaded
fun getTextureFromSkull(position: BlockPos?): String? {
val entity = Minecraft.getMinecraft().theWorld.getTileEntity(position) as TileEntitySkull
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/EntityUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/EntityUtils.kt
index 427d5e48b..36c01c64d 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/EntityUtils.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/EntityUtils.kt
@@ -35,8 +35,8 @@ object EntityUtils {
debugWrongEntity: Boolean = false,
): List<EntityArmorStand> {
val center = getLorenzVec().add(y = y)
- val a = center.add(-inaccuracy, -inaccuracy - 3, -inaccuracy).toBlocPos()
- val b = center.add(inaccuracy, inaccuracy + 3, inaccuracy).toBlocPos()
+ val a = center.add(-inaccuracy, -inaccuracy - 3, -inaccuracy).toBlockPos()
+ val b = center.add(inaccuracy, inaccuracy + 3, inaccuracy).toBlockPos()
val alignedBB = AxisAlignedBB(a, b)
val clazz = EntityArmorStand::class.java
val found = worldObj.getEntitiesWithinAABB(clazz, alignedBB)
@@ -59,8 +59,8 @@ object EntityUtils {
radius: Double = 3.0,
): List<EntityArmorStand> {
val center = getLorenzVec().add(y = 3)
- val a = center.add(-radius, -radius - 3, -radius).toBlocPos()
- val b = center.add(radius, radius + 3, radius).toBlocPos()
+ val a = center.add(-radius, -radius - 3, -radius).toBlockPos()
+ val b = center.add(radius, radius + 3, radius).toBlockPos()
val alignedBB = AxisAlignedBB(a, b)
val clazz = EntityArmorStand::class.java
val found = worldObj.getEntitiesWithinAABB(clazz, alignedBB)
@@ -78,8 +78,8 @@ object EntityUtils {
debugWrongEntity: Boolean = false,
): EntityArmorStand? {
val center = getLorenzVec().add(y = y)
- val a = center.add(-inaccuracy, -inaccuracy - 3, -inaccuracy).toBlocPos()
- val b = center.add(inaccuracy, inaccuracy + 3, inaccuracy).toBlocPos()
+ val a = center.add(-inaccuracy, -inaccuracy - 3, -inaccuracy).toBlockPos()
+ val b = center.add(inaccuracy, inaccuracy + 3, inaccuracy).toBlockPos()
val alignedBB = AxisAlignedBB(a, b)
val clazz = EntityArmorStand::class.java
val found = worldObj.getEntitiesWithinAABB(clazz, alignedBB)
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/LorenzVec.kt b/src/main/java/at/hannibal2/skyhanni/utils/LorenzVec.kt
index 2a35a488a..ba337b620 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/LorenzVec.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/LorenzVec.kt
@@ -23,8 +23,6 @@ data class LorenzVec(
constructor(x: Float, y: Float, z: Float) : this(x.toDouble(), y.toDouble(), z.toDouble())
- @Deprecated("Misspelled function name", replaceWith = ReplaceWith("toBlockPos()"))
- fun toBlocPos(): BlockPos = toBlockPos()
fun toBlockPos(): BlockPos = BlockPos(x, y, z)
fun toVec3(): Vec3 = Vec3(x, y, z)