aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-02-18 15:18:22 +0100
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-02-18 15:18:22 +0100
commitce5b48e7998157e71e3151a9d3289449619499e5 (patch)
treed017f7889107aeef74851626253f545b14c4880a
parenta54dad6af6c00bd4cb8632a5aaab866535ee4592 (diff)
downloadSkyHanni-ce5b48e7998157e71e3151a9d3289449619499e5.tar.gz
SkyHanni-ce5b48e7998157e71e3151a9d3289449619499e5.tar.bz2
SkyHanni-ce5b48e7998157e71e3151a9d3289449619499e5.zip
Fixed NPE.
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/GardenVisitorFeatures.kt2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenVisitorFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenVisitorFeatures.kt
index d2b860908..ade008853 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenVisitorFeatures.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenVisitorFeatures.kt
@@ -194,7 +194,7 @@ class GardenVisitorFeatures {
if (packet !is C02PacketUseEntity) return
val theWorld = Minecraft.getMinecraft().theWorld
- val entity = packet.getEntityFromWorld(theWorld)
+ val entity = packet.getEntityFromWorld(theWorld) ?: return
val entityId = entity.entityId
lastClickedNpc = entityId