diff options
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/slayer/EndermanSlayerBeacon.kt | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/slayer/EndermanSlayerBeacon.kt b/src/main/java/at/hannibal2/skyhanni/features/slayer/EndermanSlayerBeacon.kt index 15b497936..1364dc56c 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/slayer/EndermanSlayerBeacon.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/slayer/EndermanSlayerBeacon.kt @@ -54,7 +54,7 @@ class EndermanSlayerBeacon { if (entity is EntityEnderman) { if (hasBeaconInHand(entity)) { - if (LocationUtils.canSee(LocationUtils.playerEyeLocation(), entity.getLorenzVec())) { + if (canSee(LocationUtils.playerEyeLocation(), entity.getLorenzVec())) { endermans.add(entity) } } @@ -63,13 +63,17 @@ class EndermanSlayerBeacon { if (entity is EntityArmorStand) { val stack = entity.inventory[4] ?: return if (stack.name == "Beacon") { - if (LocationUtils.canSee(LocationUtils.playerEyeLocation(), entity.getLorenzVec())) { + if (canSee(LocationUtils.playerEyeLocation(), entity.getLorenzVec())) { armorStands.add(entity) } } } } + private fun canSee(a: LorenzVec, b: LorenzVec): Boolean { + return LocationUtils.canSee(a, b) || a.distance(b) < 15 + } + @SubscribeEvent fun onRenderMobColored(event: RenderMobColoredEvent) { if (!isEnabled()) return @@ -92,7 +96,7 @@ class EndermanSlayerBeacon { for (location in blocks) { event.drawColor(location, LorenzColor.DARK_RED, alpha = 1f) - event.drawString(location.add(0.5, -0.5, 0.5), "Beacon", true) + event.drawString(location.add(0.5, 0.5, 0.5), "ยง4Beacon", true) } } |