From 08b7dd4d56e6c513ef7a740db2b28f7854295235 Mon Sep 17 00:00:00 2001 From: Gabber235 Date: Mon, 19 Feb 2024 10:23:42 +0100 Subject: [PATCH] Fix player near location detection --- .../entries/event/PlayerNearLocationEventEntry.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/adapters/BasicAdapter/src/main/kotlin/me/gabber235/typewriter/entries/event/PlayerNearLocationEventEntry.kt b/adapters/BasicAdapter/src/main/kotlin/me/gabber235/typewriter/entries/event/PlayerNearLocationEventEntry.kt index 70339e5356..77962f301d 100644 --- a/adapters/BasicAdapter/src/main/kotlin/me/gabber235/typewriter/entries/event/PlayerNearLocationEventEntry.kt +++ b/adapters/BasicAdapter/src/main/kotlin/me/gabber235/typewriter/entries/event/PlayerNearLocationEventEntry.kt @@ -1,5 +1,6 @@ package me.gabber235.typewriter.entries.event +import lirand.api.extensions.math.blockLocation import me.gabber235.typewriter.adapters.Colors import me.gabber235.typewriter.adapters.Entry import me.gabber235.typewriter.adapters.modifiers.Help @@ -35,7 +36,10 @@ fun onPlayerNearLocation(event: PlayerMoveEvent, query: Query - !event.from.isInRange(entry.location, entry.range) && event.to.isInRange(entry.location, entry.range) + !event.from.blockLocation.isInRange( + entry.location, + entry.range + ) && event.to.blockLocation.isInRange(entry.location, entry.range) } startDialogueWithOrNextDialogue event.player }