aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/cosmetics/CosmeticFollowingLine.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowHelper.kt16
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/event/diana/InquisitorWaypointShare.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/fishing/ShowFishingItemName.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/fishing/ThunderSparksHighlight.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/GardenPlotAPI.kt15
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt6
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorFeatures.kt8
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangBlazingSouls.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangGravityOrbs.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/rift/area/dreadfarm/RiftAgaricusCap.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/rift/area/dreadfarm/RiftWiltedBerberisHelper.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/rift/area/dreadfarm/VoltHighlighter.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/rift/area/livingcave/LivingCaveDefenseBlocks.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/EnigmaSoulWaypoints.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerItemsOnGround.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerMiniBossFeatures.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/slayer/VampireSlayerFeatures.kt10
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/slayer/enderman/EndermanSlayerFeatures.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/summonings/SummoningSoulsName.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/EntityUtils.kt6
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/LocationUtils.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/LorenzVec.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/ParkourHelper.kt4
25 files changed, 57 insertions, 60 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/cosmetics/CosmeticFollowingLine.kt b/src/main/java/at/hannibal2/skyhanni/features/cosmetics/CosmeticFollowingLine.kt
index 662ad68a0..022ec07b9 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/cosmetics/CosmeticFollowingLine.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/cosmetics/CosmeticFollowingLine.kt
@@ -69,7 +69,7 @@ class CosmeticFollowingLine {
}
private fun updateClose(event: LorenzRenderWorldEvent) {
- val playerLocation = event.exactLocation(Minecraft.getMinecraft().thePlayer).add(0.0, 0.3, 0.0)
+ val playerLocation = event.exactLocation(Minecraft.getMinecraft().thePlayer).add(y = 0.3)
latestLocations = latestLocations.editCopy {
val locationSpot = LocationSpot(SimpleTimeMark.now(), Minecraft.getMinecraft().thePlayer.onGround)
@@ -110,7 +110,7 @@ class CosmeticFollowingLine {
}
if (event.isMod(2)) {
- val playerLocation = LocationUtils.playerLocation().add(0.0, 0.3, 0.0)
+ val playerLocation = LocationUtils.playerLocation().add(y = 0.3)
locations.keys.lastOrNull()?.let {
if (it.distance(playerLocation) < 0.1) return
diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowHelper.kt
index df89ccd7f..01aabed38 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowHelper.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowHelper.kt
@@ -158,19 +158,19 @@ object GriffinBurrowHelper {
val distance = location.distance(playerLocation)
if (distance > 10) {
val formattedDistance = LorenzUtils.formatInteger(distance.toInt())
- event.drawDynamicText(location.add(0, 1, 0), "§d§lInquisitor §e${formattedDistance}m", 1.7)
+ event.drawDynamicText(location.add(y = 1), "§d§lInquisitor §e${formattedDistance}m", 1.7)
} else {
- event.drawDynamicText(location.add(0, 1, 0), "§d§lInquisitor", 1.7)
+ event.drawDynamicText(location.add(y = 1), "§d§lInquisitor", 1.7)
}
if (distance < 5) {
InquisitorWaypointShare.maybeRemove(playerName)
}
- event.drawDynamicText(location.add(0, 1, 0), "§eFrom §b$playerName", 1.6, yOff = 9f)
+ event.drawDynamicText(location.add(y = 1), "§eFrom §b$playerName", 1.6, yOff = 9f)
if (config.inquisitorSharing.showDespawnTime) {
val spawnTime = inquis.spawnTime
val format = TimeUtils.formatDuration(75.seconds - spawnTime.passedSince())
- event.drawDynamicText(location.add(0, 1, 0), "§eDespawns in §b$format", 1.6, yOff = 18f)
+ event.drawDynamicText(location.add(y = 1), "§eDespawns in §b$format", 1.6, yOff = 18f)
}
}
}
@@ -185,7 +185,7 @@ object GriffinBurrowHelper {
val distance = location.distance(playerLocation)
val burrowType = burrow.value
event.drawColor(location, burrowType.color, distance > 10)
- event.drawDynamicText(location.add(0, 1, 0), burrowType.text, 1.5)
+ event.drawDynamicText(location.add(y = 1), burrowType.text, 1.5)
}
}
@@ -194,10 +194,10 @@ object GriffinBurrowHelper {
val guessLocation = findBlock(it)
val distance = guessLocation.distance(playerLocation)
event.drawColor(guessLocation, LorenzColor.WHITE, distance > 10)
- event.drawDynamicText(guessLocation.add(0, 1, 0), "Guess", 1.5)
+ event.drawDynamicText(guessLocation.add(y = 1), "Guess", 1.5)
if (distance > 5) {
val formattedDistance = LorenzUtils.formatInteger(distance.toInt())
- event.drawDynamicText(guessLocation.add(0, 1, 0), "§e${formattedDistance}m", 1.7, yOff = 10f)
+ event.drawDynamicText(guessLocation.add(y = 1), "§e${formattedDistance}m", 1.7, yOff = 10f)
}
}
}
@@ -224,7 +224,7 @@ object GriffinBurrowHelper {
if (config.burrowNearestWarp) {
BurrowWarpHelper.currentWarp?.let { warp ->
animationLocation?.let {
- event.drawColor(it.add(0.0, 1.0, 0.0), LorenzColor.AQUA)
+ event.drawColor(it.add(y = 1), LorenzColor.AQUA)
if (it.distanceToPlayer() < 10) {
event.drawString(it.add(0.5, 1.5, 0.5), "§bWarp to " + warp.displayName, true)
if (config.keyBindWarp != Keyboard.KEY_NONE) {
diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/diana/InquisitorWaypointShare.kt b/src/main/java/at/hannibal2/skyhanni/features/event/diana/InquisitorWaypointShare.kt
index c4f12a993..a99be4102 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/event/diana/InquisitorWaypointShare.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/event/diana/InquisitorWaypointShare.kt
@@ -238,7 +238,7 @@ object InquisitorWaypointShare {
val inquis = SharedInquisitor(cleanName, location, SimpleTimeMark.now())
waypoints = waypoints.editCopy { this[cleanName] = inquis }
if (config.focusInquisitor) {
- GriffinBurrowHelper.setTargetLocation(location.add(0, 1, 0))
+ GriffinBurrowHelper.setTargetLocation(location.add(y = 1))
GriffinBurrowHelper.animationLocation = LocationUtils.playerLocation()
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/ShowFishingItemName.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/ShowFishingItemName.kt
index a64d3da77..4a41b332c 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/fishing/ShowFishingItemName.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/ShowFishingItemName.kt
@@ -47,7 +47,7 @@ class ShowFishingItemName {
if (!isEnabled()) return
if (hasRodInHand) {
for (entityItem in EntityUtils.getEntities<EntityItem>()) {
- val location = event.exactLocation(entityItem).add(0.0, 0.8, 0.0)
+ val location = event.exactLocation(entityItem).add(y = 0.8)
if (location.distance(LocationUtils.playerLocation()) > 15) continue
val itemStack = entityItem.entityItem
var name = itemStack.name ?: continue
diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/ThunderSparksHighlight.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/ThunderSparksHighlight.kt
index bab0d5ae1..e49e8e3f8 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/fishing/ThunderSparksHighlight.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/ThunderSparksHighlight.kt
@@ -55,7 +55,7 @@ class ThunderSparksHighlight {
sparkLocation.add(-0.5, 0.0, -0.5), color, extraSize = -0.25, seeThroughBlocks = seeThroughBlocks
)
if (sparkLocation.distance(playerLocation) < 10) {
- event.drawString(sparkLocation.add(0.0, 1.5, 0.0), "Thunder Spark", seeThroughBlocks = seeThroughBlocks)
+ event.drawString(sparkLocation.add(y = 1.5), "Thunder Spark", seeThroughBlocks = seeThroughBlocks)
}
}
}
@@ -74,4 +74,4 @@ class ThunderSparksHighlight {
event.move(3, "fishing.thunderSparkHighlight", "fishing.thunderSpark.highlight")
event.move(3, "fishing.thunderSparkColor", "fishing.thunderSpark.color")
}
-} \ No newline at end of file
+}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenPlotAPI.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenPlotAPI.kt
index 4131ad60f..64308abf1 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenPlotAPI.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenPlotAPI.kt
@@ -134,7 +134,7 @@ object GardenPlotAPI {
// Front lines
tryDraw3DLine(start, end, lineColor, 1, true)
// Back lines
- tryDraw3DLine(start.addZ(plotSize), end.addZ(plotSize), lineColor, 1, true)
+ tryDraw3DLine(start.add(z = plotSize), end.add(z = plotSize), lineColor, 1, true)
}
// Render vertical on Z-Axis
@@ -144,20 +144,20 @@ object GardenPlotAPI {
// Left lines
tryDraw3DLine(start, end, lineColor, 1, true)
// Right lines
- tryDraw3DLine(start.addX(plotSize), end.addX(plotSize), lineColor, 1, true)
+ tryDraw3DLine(start.add(x = plotSize), end.add(x = plotSize), lineColor, 1, true)
}
// Render horizontal
for (y in minHeight..maxHeight step 4) {
val start = LorenzVec(chunkMinX, y, chunkMinZ)
// (minX, minZ) -> (minX, minZ + 96)
- tryDraw3DLine(start, start.addZ(plotSize), lineColor, 1, true)
+ tryDraw3DLine(start, start.add(z = plotSize), lineColor, 1, true)
// (minX, minZ + 96) -> (minX + 96, minZ + 96)
- tryDraw3DLine(start.addZ(plotSize), start.addXZ(plotSize, plotSize), lineColor, 1, true)
+ tryDraw3DLine(start.add(z = plotSize), start.add(x = plotSize, z = plotSize), lineColor, 1, true)
// (minX + 96, minZ + 96) -> (minX + 96, minZ)
- tryDraw3DLine(start.addXZ(plotSize, plotSize), start.addX(plotSize), lineColor, 1, true)
+ tryDraw3DLine(start.add(x = plotSize, z = plotSize), start.add(x = plotSize), lineColor, 1, true)
// (minX + 96, minZ) -> (minX, minZ)
- tryDraw3DLine(start.addX(plotSize), start, lineColor, 1, true)
+ tryDraw3DLine(start.add(x = plotSize), start, lineColor, 1, true)
}
}
@@ -182,7 +182,4 @@ object GardenPlotAPI {
else -> false
}
- private fun LorenzVec.addX(x: Int) = add(x, 0, 0)
- private fun LorenzVec.addZ(z: Int) = add(0, 0, z)
- private fun LorenzVec.addXZ(x: Int, z: Int) = add(x, 0, z)
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt
index ed0627d82..a1e795e72 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt
@@ -257,12 +257,12 @@ class GardenVisitorFeatures {
val visitor = event.visitor
val text = visitor.status.displayName
val location = event.location
- event.parent.drawString(location.add(0.0, 2.23, 0.0), text)
+ event.parent.drawString(location.add(y = 2.23), text)
if (config.rewardWarning.showOverName) {
visitor.hasReward()?.let { reward ->
val name = reward.displayName
- event.parent.drawString(location.add(0.0, 2.73, 0.0), "§c!$name§c!")
+ event.parent.drawString(location.add(y = 2.73), "§c!$name§c!")
}
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt
index 8f086626b..77ce80990 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt
@@ -281,7 +281,7 @@ class MinionFeatures {
val playerLocation = LocationUtils.playerLocation()
val minions = minions ?: return
for (minion in minions) {
- val location = minion.key.add(0.0, 1.0, 0.0)
+ val location = minion.key.add(y = 1.0)
if (!location.canBeSeen()) continue
val lastEmptied = minion.value.lastClicked
@@ -292,14 +292,14 @@ class MinionFeatures {
val name = "§6" + if (config.nameOnlyTier) {
displayName.split(" ").last()
} else displayName
- event.drawString(location.add(0.0, 0.65, 0.0), name, true)
+ event.drawString(location.add(y = 0.65), name, true)
}
if (config.emptiedTime.display && lastEmptied != 0L) {
val duration = System.currentTimeMillis() - lastEmptied
val format = TimeUtils.formatDuration(duration, longName = true) + " ago"
val text = "§eHopper Emptied: $format"
- event.drawString(location.add(0.0, 1.15, 0.0), text, true)
+ event.drawString(location.add(y = 1.15), text, true)
}
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorFeatures.kt
index 39c4979da..8b3460c25 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorFeatures.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorFeatures.kt
@@ -223,7 +223,7 @@ object TrevorFeatures {
{ config.trapperTalkCooldown }
entityTrapper.getLorenzVec().let {
if (it.distanceToPlayer() < 15) {
- event.drawString(it.add(0.0, 2.23, 0.0), currentLabel)
+ event.drawString(it.add(y = 2.23), currentLabel)
}
}
}
@@ -239,11 +239,11 @@ object TrevorFeatures {
TrevorSolver.currentMob!!.mobName
}
location = TrevorSolver.mobCoordinates
- event.drawWaypointFilled(location.add(0, -2, 0), LorenzColor.GREEN.toColor(), true, true)
- event.drawDynamicText(location.add(0, 1, 0), displayName, 1.5)
+ event.drawWaypointFilled(location.add(y = -2), LorenzColor.GREEN.toColor(), true, true)
+ event.drawDynamicText(location.add(y = 1), displayName, 1.5)
} else {
event.drawWaypointFilled(location, LorenzColor.GOLD.toColor(), true, true)
- event.drawDynamicText(location.add(0, 1, 0), TrevorSolver.mobLocation.location, 1.5)
+ event.drawDynamicText(location.add(y = 1), TrevorSolver.mobLocation.location, 1.5)
}
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangBlazingSouls.kt b/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangBlazingSouls.kt
index 8d7507e12..03175e255 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangBlazingSouls.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangBlazingSouls.kt
@@ -48,7 +48,7 @@ class AshfangBlazingSouls {
event.drawWaypointFilled(orbLocation.add(-0.5, 1.25, -0.5), color, extraSize = -0.15)
if (orbLocation.distance(playerLocation) < 10) {
//TODO find way to dynamically change color
- event.drawString(orbLocation.add(0.0, 2.5, 0.0), "§bBlazing Soul")
+ event.drawString(orbLocation.add(y = 2.5), "§bBlazing Soul")
}
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangGravityOrbs.kt b/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangGravityOrbs.kt
index 5b3fc60de..bf9899e0c 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangGravityOrbs.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangGravityOrbs.kt
@@ -49,7 +49,7 @@ class AshfangGravityOrbs {
if (orbLocation.distance(playerLocation) < 15) {
//TODO find way to dynamically change color
- event.drawString(orbLocation.add(0.0, 2.5, 0.0), "§cGravity Orb")
+ event.drawString(orbLocation.add(y = 2.5), "§cGravity Orb")
}
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/dreadfarm/RiftAgaricusCap.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/dreadfarm/RiftAgaricusCap.kt
index 5ef56976f..c1790a6cc 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/dreadfarm/RiftAgaricusCap.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/dreadfarm/RiftAgaricusCap.kt
@@ -59,7 +59,7 @@ class RiftAgaricusCap {
fun onRenderWorld(event: LorenzRenderWorldEvent) {
if (!isEnabled()) return
- val location = location?.add(0.0, 0.6, 0.0) ?: return
+ val location = location?.add(y = 0.6) ?: return
if (startTime == -1L) {
event.drawDynamicText(location, "§cClick!", 1.5)
diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/dreadfarm/RiftWiltedBerberisHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/dreadfarm/RiftWiltedBerberisHelper.kt
index e17bd32ed..aa1dafd55 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/dreadfarm/RiftWiltedBerberisHelper.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/dreadfarm/RiftWiltedBerberisHelper.kt
@@ -43,7 +43,7 @@ class RiftWiltedBerberisHelper {
hasFarmingToolInHand = InventoryUtils.getItemInHand()?.getInternalName() == RiftAPI.farmingTool
if (Minecraft.getMinecraft().thePlayer.onGround) {
- val block = LocationUtils.playerLocation().add(0, -1, 0).getBlockAt().toString()
+ val block = LocationUtils.playerLocation().add(y = -1).getBlockAt().toString()
val currentY = LocationUtils.playerLocation().y
isOnFarmland = block == "Block{minecraft:farmland}" && (currentY % 1 == 0.0)
}
@@ -115,7 +115,7 @@ class RiftWiltedBerberisHelper {
val location = currentParticles.fixLocation(berberis)
if (!moving) {
event.drawFilledBoundingBox_nea(axisAlignedBB(location), Color.YELLOW, 0.7f)
- event.drawDynamicText(location.add(0, 1, 0), "§eWilted Berberis", 1.5, ignoreBlocks = false)
+ event.drawDynamicText(location.add(y = 1), "§eWilted Berberis", 1.5, ignoreBlocks = false)
} else {
event.drawFilledBoundingBox_nea(axisAlignedBB(location), Color.WHITE, 0.5f)
previous?.fixLocation(berberis)?.let {
diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/dreadfarm/VoltHighlighter.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/dreadfarm/VoltHighlighter.kt
index 6cf37e285..41d42f77b 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/dreadfarm/VoltHighlighter.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/dreadfarm/VoltHighlighter.kt
@@ -75,7 +75,7 @@ class VoltHighlighter {
val dischargeTimeLeft = CHARGE_TIME - dischargingSince.passedSince()
if (dischargeTimeLeft > Duration.ZERO) {
event.drawDynamicText(
- event.exactLocation(entity).add(0.0, 2.5, 0.0),
+ event.exactLocation(entity).add(y = 2.5),
"§eLightning: ${dischargeTimeLeft.format(showMilliSeconds = true)}",
2.5
)
diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/livingcave/LivingCaveDefenseBlocks.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/livingcave/LivingCaveDefenseBlocks.kt
index 88b2939c8..071ec6e94 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/livingcave/LivingCaveDefenseBlocks.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/livingcave/LivingCaveDefenseBlocks.kt
@@ -147,7 +147,7 @@ class LivingCaveDefenseBlocks {
val location = block.location
event.drawWaypointFilled(location, color)
event.draw3DLine(
- block.entity.getLorenzVec().add(0.0, 0.5, 0.0),
+ block.entity.getLorenzVec().add(y = 0.5),
location.add(0.5, 0.5, 0.5),
color,
1,
@@ -161,7 +161,7 @@ class LivingCaveDefenseBlocks {
event.drawWaypointFilled(location, color)
event.draw3DLine(
- block.entity.getLorenzVec().add(0.0, 0.5, 0.0),
+ block.entity.getLorenzVec().add(y = 0.5),
location.add(0.5, 0.5, 0.5),
color,
3,
diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/EnigmaSoulWaypoints.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/EnigmaSoulWaypoints.kt
index 063d16beb..f8ceaa833 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/EnigmaSoulWaypoints.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/EnigmaSoulWaypoints.kt
@@ -1,5 +1,6 @@
package at.hannibal2.skyhanni.features.rift.everywhere
+import at.hannibal2.skyhanni.data.jsonobjects.repo.EnigmaSoulsJson
import at.hannibal2.skyhanni.events.GuiContainerEvent
import at.hannibal2.skyhanni.events.InventoryCloseEvent
import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent
@@ -17,7 +18,6 @@ import at.hannibal2.skyhanni.utils.NEUItems
import at.hannibal2.skyhanni.utils.RenderUtils.drawDynamicText
import at.hannibal2.skyhanni.utils.RenderUtils.highlight
import at.hannibal2.skyhanni.utils.StringUtils.removeColor
-import at.hannibal2.skyhanni.data.jsonobjects.repo.EnigmaSoulsJson
import io.github.moulberry.notenoughupdates.events.ReplaceItemEvent
import io.github.moulberry.notenoughupdates.events.SlotClickEvent
import io.github.moulberry.notenoughupdates.util.Utils
@@ -137,7 +137,7 @@ object EnigmaSoulWaypoints {
for (soul in trackedSouls) {
soulLocations[soul]?.let {
event.drawWaypointFilled(it, LorenzColor.DARK_PURPLE.toColor(), seeThroughBlocks = true, beacon = true)
- event.drawDynamicText(it.add(0, 1, 0), "§5$soul Soul", 1.5)
+ event.drawDynamicText(it.add(y = 1), "§5$soul Soul", 1.5)
}
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerItemsOnGround.kt b/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerItemsOnGround.kt
index 0cb129c7d..f0f80ace4 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerItemsOnGround.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerItemsOnGround.kt
@@ -32,7 +32,7 @@ class SlayerItemsOnGround {
if (!SlayerAPI.hasActiveSlayerQuest()) return
for (entityItem in EntityUtils.getEntities<EntityItem>()) {
- val location = event.exactLocation(entityItem).add(0.0, 0.8, 0.0)
+ val location = event.exactLocation(entityItem).add(y = 0.8)
if (location.distance(LocationUtils.playerLocation()) > 15) continue
val itemStack = entityItem.entityItem
diff --git a/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerMiniBossFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerMiniBossFeatures.kt
index f45d352b5..e384b5de8 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerMiniBossFeatures.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerMiniBossFeatures.kt
@@ -60,7 +60,7 @@ class SlayerMiniBossFeatures {
event.draw3DLine(
event.exactPlayerEyeLocation(),
- mob.getLorenzVec().add(0, 1, 0),
+ mob.getLorenzVec().add(y = 1),
LorenzColor.AQUA.toColor(),
3,
true
diff --git a/src/main/java/at/hannibal2/skyhanni/features/slayer/VampireSlayerFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/slayer/VampireSlayerFeatures.kt
index 04275f1a9..e1f837a7b 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/slayer/VampireSlayerFeatures.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/slayer/VampireSlayerFeatures.kt
@@ -291,7 +291,7 @@ object VampireSlayerFeatures {
if (distance <= 15) {
event.draw3DLine(
event.exactPlayerEyeLocation(),
- vec.add(0.0, 1.54, 0.0),
+ vec.add(y = 1.54),
config.lineColor.toChromaColor(),
config.lineWidth,
true
@@ -319,7 +319,7 @@ object VampireSlayerFeatures {
(if (isIchor) configBloodIcor.linesColor else configKillerSpring.linesColor).toChromaColor()
val text = if (isIchor) "§4Ichor" else "§4Spring"
event.drawColor(
- stand.position.toLorenzVec().add(0.0, 2.0, 0.0),
+ stand.position.toLorenzVec().add(y = 2.0),
LorenzColor.DARK_RED,
alpha = 1f
)
@@ -332,8 +332,8 @@ object VampireSlayerFeatures {
for ((player, stand2) in standList) {
if ((configBloodIcor.showLines && isIchor) || (configKillerSpring.showLines && isSpring))
event.draw3DLine(
- event.exactLocation(player).add(0.0, 1.5, 0.0),
- event.exactLocation(stand2).add(0.0, 1.5, 0.0),
+ event.exactLocation(player).add(y = 1.5),
+ event.exactLocation(stand2).add(y = 1.5),
// stand2.position.toLorenzVec().add(0.0, 1.5, 0.0),
linesColorStart,
3,
@@ -343,7 +343,7 @@ object VampireSlayerFeatures {
}
if (configBloodIcor.renderBeam && isIchor && stand.isEntityAlive) {
event.drawWaypointFilled(
- event.exactLocation(stand).add(0, -2, 0),
+ event.exactLocation(stand).add(0, y = -2, 0),
configBloodIcor.color.toChromaColor(),
beacon = true
)
diff --git a/src/main/java/at/hannibal2/skyhanni/features/slayer/enderman/EndermanSlayerFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/slayer/enderman/EndermanSlayerFeatures.kt
index 42c50f00a..cd0de443e 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/slayer/enderman/EndermanSlayerFeatures.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/slayer/enderman/EndermanSlayerFeatures.kt
@@ -129,14 +129,14 @@ class EndermanSlayerFeatures {
val durationFormat = duration.format(showMilliSeconds = true)
event.drawColor(location, beaconConfig.beaconColor.toChromaColor(), alpha = 1f)
event.drawWaypointFilled(location, beaconConfig.beaconColor.toChromaColor(), true, true)
- event.drawDynamicText(location.add(0, 1, 0), "§4Beacon §b$durationFormat", 1.8)
+ event.drawDynamicText(location.add(y = 1), "§4Beacon §b$durationFormat", 1.8)
}
}
for (beacon in flyingBeacons) {
if (beacon.isDead) continue
if (beaconConfig.highlightBeacon) {
val beaconLocation = event.exactLocation(beacon)
- event.drawDynamicText(beaconLocation.add(0, 1, 0), "§4Beacon", 1.8)
+ event.drawDynamicText(beaconLocation.add(y = 1), "§4Beacon", 1.8)
}
if (beaconConfig.showLine) {
diff --git a/src/main/java/at/hannibal2/skyhanni/features/summonings/SummoningSoulsName.kt b/src/main/java/at/hannibal2/skyhanni/features/summonings/SummoningSoulsName.kt
index 6d206bf17..98752b04a 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/summonings/SummoningSoulsName.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/summonings/SummoningSoulsName.kt
@@ -78,7 +78,7 @@ class SummoningSoulsName {
for ((entity, name) in souls) {
val vec = entity.getLorenzVec()
- event.drawString(vec.add(0.0, 2.5, 0.0), name)
+ event.drawString(vec.add(y = 2.5), name)
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/EntityUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/EntityUtils.kt
index 7fe6e8efb..427d5e48b 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/EntityUtils.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/EntityUtils.kt
@@ -34,7 +34,7 @@ object EntityUtils {
inaccuracy: Double = 1.6,
debugWrongEntity: Boolean = false,
): List<EntityArmorStand> {
- val center = getLorenzVec().add(0, y, 0)
+ 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 alignedBB = AxisAlignedBB(a, b)
@@ -58,7 +58,7 @@ object EntityUtils {
contains: String,
radius: Double = 3.0,
): List<EntityArmorStand> {
- val center = getLorenzVec().add(0, 3, 0)
+ 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 alignedBB = AxisAlignedBB(a, b)
@@ -77,7 +77,7 @@ object EntityUtils {
inaccuracy: Double = 1.6,
debugWrongEntity: Boolean = false,
): EntityArmorStand? {
- val center = getLorenzVec().add(0, y, 0)
+ 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 alignedBB = AxisAlignedBB(a, b)
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/LocationUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/LocationUtils.kt
index 580075543..654974d5c 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/LocationUtils.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/LocationUtils.kt
@@ -24,7 +24,7 @@ object LocationUtils {
fun playerEyeLocation(): LorenzVec {
val player = Minecraft.getMinecraft().thePlayer
val vec = player.getLorenzVec()
- return vec.add(0.0, 0.0 + player.getEyeHeight(), 0.0)
+ return vec.add(y = player.getEyeHeight().toDouble())
}
fun AxisAlignedBB.isInside(vec: LorenzVec) = isVecInside(vec.toVec3())
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/LorenzVec.kt b/src/main/java/at/hannibal2/skyhanni/utils/LorenzVec.kt
index 294053f83..b3cd44032 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/LorenzVec.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/LorenzVec.kt
@@ -50,7 +50,7 @@ data class LorenzVec(
fun add(x: Double = 0.0, y: Double = 0.0, z: Double = 0.0): LorenzVec = LorenzVec(this.x + x, this.y + y, this.z + z)
- fun add(x: Int, y: Int, z: Int): LorenzVec = LorenzVec(this.x + x, this.y + y, this.z + z)
+ fun add(x: Int = 0, y: Int = 0, z: Int = 0): LorenzVec = LorenzVec(this.x + x, this.y + y, this.z + z)
override fun toString() = "LorenzVec{x=$x, y=$y, z=$z}"
@@ -159,7 +159,7 @@ data class LorenzVec(
return LorenzVec(x, y, z)
}
- fun getBlockBelowPlayer() = LocationUtils.playerLocation().roundLocationToBlock().add(0.0, -1.0, 0.0)
+ fun getBlockBelowPlayer() = LocationUtils.playerLocation().roundLocationToBlock().add(y = -1.0)
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/ParkourHelper.kt b/src/main/java/at/hannibal2/skyhanni/utils/ParkourHelper.kt
index 068f2340d..e80aa7f62 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/ParkourHelper.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/ParkourHelper.kt
@@ -1,6 +1,7 @@
package at.hannibal2.skyhanni.utils
import at.hannibal2.skyhanni.SkyHanniMod
+import at.hannibal2.skyhanni.data.jsonobjects.repo.ParkourJson.ShortCut
import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent
import at.hannibal2.skyhanni.test.command.ErrorManager
import at.hannibal2.skyhanni.utils.LocationUtils.distanceToPlayer
@@ -11,7 +12,6 @@ import at.hannibal2.skyhanni.utils.RenderUtils.drawFilledBoundingBox_nea
import at.hannibal2.skyhanni.utils.RenderUtils.drawString
import at.hannibal2.skyhanni.utils.RenderUtils.expandBlock
import at.hannibal2.skyhanni.utils.RenderUtils.outlineTopFace
-import at.hannibal2.skyhanni.data.jsonobjects.repo.ParkourJson.ShortCut
import net.minecraft.client.Minecraft
import java.awt.Color
import kotlin.time.Duration.Companion.seconds
@@ -116,7 +116,7 @@ class ParkourHelper(
if (outline) event.outlineTopFace(aabb, 2, Color.BLACK, true)
}
if (SkyHanniMod.feature.dev.waypoint.showPlatformNumber && !isMovingPlatform) {
- event.drawString(location.offsetCenter().add(0, 1, 0), "§a§l$index", seeThroughBlocks = true)
+ event.drawString(location.offsetCenter().add(y = 1), "§a§l$index", seeThroughBlocks = true)
}
}
} catch (e: Throwable) {