From db917890be633a8e6db9418a5e89dd74e7936c46 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Mon, 20 May 2024 12:11:48 +0200 Subject: [PATCH 1/2] fix npe in DemonlordSlayer --- .../skytilsmod/features/impl/slayer/impl/DemonlordSlayer.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/gg/skytils/skytilsmod/features/impl/slayer/impl/DemonlordSlayer.kt b/src/main/kotlin/gg/skytils/skytilsmod/features/impl/slayer/impl/DemonlordSlayer.kt index c419a8490..3e25ef6a4 100644 --- a/src/main/kotlin/gg/skytils/skytilsmod/features/impl/slayer/impl/DemonlordSlayer.kt +++ b/src/main/kotlin/gg/skytils/skytilsmod/features/impl/slayer/impl/DemonlordSlayer.kt @@ -193,7 +193,8 @@ class DemonlordSlayer(entity: EntityBlaze) : ) thrownEntity = e return@tickTimer - } else if (e.name.matches(SlayerFeatures.totemRegex) && e.getDistanceSq(totemPos) < 9) { + // + } else if (totemPos?.let { e.name.matches(SlayerFeatures.totemRegex) && e.getDistanceSq(it) < 9 } == true) { totemEntity = e } } From f44f20ed8da6cea377aadad33b9da95e60d3c305 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Mon, 20 May 2024 12:14:21 +0200 Subject: [PATCH 2/2] remove comment --- .../skytilsmod/features/impl/slayer/impl/DemonlordSlayer.kt | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/kotlin/gg/skytils/skytilsmod/features/impl/slayer/impl/DemonlordSlayer.kt b/src/main/kotlin/gg/skytils/skytilsmod/features/impl/slayer/impl/DemonlordSlayer.kt index 3e25ef6a4..0a36c90b5 100644 --- a/src/main/kotlin/gg/skytils/skytilsmod/features/impl/slayer/impl/DemonlordSlayer.kt +++ b/src/main/kotlin/gg/skytils/skytilsmod/features/impl/slayer/impl/DemonlordSlayer.kt @@ -193,7 +193,6 @@ class DemonlordSlayer(entity: EntityBlaze) : ) thrownEntity = e return@tickTimer - // } else if (totemPos?.let { e.name.matches(SlayerFeatures.totemRegex) && e.getDistanceSq(it) < 9 } == true) { totemEntity = e }