Skip to content

Commit

Permalink
fix: check if corleone entity is visible to the player (#483)
Browse files Browse the repository at this point in the history
Co-authored-by: hannibal2 <[email protected]>
  • Loading branch information
hannibal002 and hannibal002 committed Apr 29, 2024
1 parent 88c08c3 commit 3d21b9e
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ import gg.skytils.skytilsmod.events.impl.PacketEvent
import gg.skytils.skytilsmod.features.impl.handlers.MayorInfo
import gg.skytils.skytilsmod.utils.*
import gg.skytils.skytilsmod.utils.RenderUtil.highlight
import gg.skytils.skytilsmod.utils.graphics.SmartFontRenderer
import gg.skytils.skytilsmod.utils.graphics.colors.ColorFactory
import net.minecraft.client.entity.EntityOtherPlayerMP
import net.minecraft.client.renderer.GlStateManager
Expand Down Expand Up @@ -356,10 +355,11 @@ object MiningFeatures {
@SubscribeEvent
fun onRenderLivingPre(event: RenderLivingEvent.Pre<EntityLivingBase?>) {
if (!Utils.inSkyblock) return
if (Skytils.config.crystalHollowWaypoints && event.entity is EntityOtherPlayerMP && event.entity.name == "Team Treasurite" && event.entity.baseMaxHealth == if (MayorInfo.mayorPerks.contains(
"DOUBLE MOBS HP!!!"
)
) 2_000_000.0 else 1_000_000.0
if (Skytils.config.crystalHollowWaypoints &&
event.entity is EntityOtherPlayerMP &&
event.entity.name == "Team Treasurite" &&
mc.thePlayer.canEntityBeSeen(event.entity) &&
event.entity.baseMaxHealth == if (MayorInfo.mayorPerks.contains("DOUBLE MOBS HP!!!")) 2_000_000.0 else 1_000_000.0
) {
waypoints["Corleone"] = event.entity.position
}
Expand Down

0 comments on commit 3d21b9e

Please sign in to comment.