aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features/fishing
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-09-07 13:07:15 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-09-07 13:07:15 +0200
commitb8918c3cae62d27edcec44fac247f2311ff830b7 (patch)
tree08992ef9faa6003faeb6e034675dd8d005906aca /src/main/java/at/hannibal2/skyhanni/features/fishing
parentd345adc3ecd390d9b722127a4013a6edb6c3dc76 (diff)
downloadskyhanni-b8918c3cae62d27edcec44fac247f2311ff830b7.tar.gz
skyhanni-b8918c3cae62d27edcec44fac247f2311ff830b7.tar.bz2
skyhanni-b8918c3cae62d27edcec44fac247f2311ff830b7.zip
code cleanup
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/fishing')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/fishing/SeaCreatureFeatures.kt27
1 files changed, 10 insertions, 17 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/SeaCreatureFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/SeaCreatureFeatures.kt
index 9f7ef0fa5..883607b70 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/fishing/SeaCreatureFeatures.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/SeaCreatureFeatures.kt
@@ -7,27 +7,18 @@ import at.hannibal2.skyhanni.events.RenderEntityOutlineEvent
import at.hannibal2.skyhanni.events.withAlpha
import at.hannibal2.skyhanni.features.damageindicator.DamageIndicatorManager
import at.hannibal2.skyhanni.mixins.hooks.RenderLivingEntityHelper
-import at.hannibal2.skyhanni.utils.*
-import at.hannibal2.skyhanni.utils.EntityUtils.getSkinTexture
import at.hannibal2.skyhanni.utils.EntityUtils.hasMaxHealth
import at.hannibal2.skyhanni.utils.LocationUtils.distanceToPlayer
+import at.hannibal2.skyhanni.utils.LorenzColor
+import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.LorenzUtils.baseMaxHealth
import at.hannibal2.skyhanni.utils.LorenzUtils.editCopy
-import net.minecraft.client.Minecraft
-import net.minecraft.client.entity.EntityOtherPlayerMP
-import net.minecraft.client.gui.FontRenderer
import net.minecraft.entity.Entity
import net.minecraft.entity.EntityLivingBase
-import net.minecraft.entity.item.EntityItem
import net.minecraft.entity.monster.EntityGuardian
-import net.minecraft.entity.monster.EntitySkeleton
import net.minecraft.entity.monster.EntityZombie
import net.minecraft.entity.player.EntityPlayer
-import net.minecraft.scoreboard.ScorePlayerTeam
-import net.minecraft.scoreboard.Team.EnumVisible
-import net.minecraftforge.client.event.RenderWorldLastEvent
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
-import java.awt.Color
class SeaCreatureFeatures {
@@ -78,15 +69,17 @@ class SeaCreatureFeatures {
private fun isEnabled() = LorenzUtils.inSkyBlock && !LorenzUtils.inDungeons && !LorenzUtils.inKuudraFight
- private val getEntityOutlineColor: (entity: Entity) -> Int? = { e ->
- if (EntityLivingBase::class.java.isInstance(e) && e in rareSeaCreatures && e.distanceToPlayer() < 30) {
+ private val getEntityOutlineColor: (entity: Entity) -> Int? = { entity ->
+ if (EntityLivingBase::class.java.isInstance(entity) && entity in rareSeaCreatures && entity.distanceToPlayer() < 30) {
LorenzColor.GREEN.toColor().rgb
- } else {
- null
- }
+ } else null
}
- enum class RareSeaCreatureType(val clazz: Class<out EntityLivingBase>, val nametag: String, vararg val health: Int) {
+ enum class RareSeaCreatureType(
+ val clazz: Class<out EntityLivingBase>,
+ val nametag: String,
+ vararg val health: Int
+ ) {
WATER_HYDRA(EntityZombie::class.java, "Water Hydra", 500_000, 1_500_000),
SEA_EMPEROR(EntityGuardian::class.java, "The Sea Emperors", 750_000, 800_000, 2_250_000, 2_400_000),
ZOMBIE_MINER(EntityPlayer::class.java, "", 2_000_000, 6_000_000),