From 414581bbe2047aa3637b0c1671585ff8ff2b3003 Mon Sep 17 00:00:00 2001 From: Baitinq <30861839+Baitinq@users.noreply.github.com> Date: Wed, 18 Jan 2023 01:37:17 +0100 Subject: [PATCH] StashLogger: Show the time and date when a stash is found (#466) * StashLogger: Show the time and date when a stash is found After this patch we now show the date and time at which the "stash" was found. This is information which could be useful for the users to better identify the stash after afk hunting. * Remove unnecessary imports Co-authored-by: Constructor --- .../com/lambda/client/module/modules/misc/StashLogger.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/com/lambda/client/module/modules/misc/StashLogger.kt b/src/main/kotlin/com/lambda/client/module/modules/misc/StashLogger.kt index cefd60fd3..042e5684f 100644 --- a/src/main/kotlin/com/lambda/client/module/modules/misc/StashLogger.kt +++ b/src/main/kotlin/com/lambda/client/module/modules/misc/StashLogger.kt @@ -25,6 +25,8 @@ import net.minecraft.tileentity.* import net.minecraft.util.math.BlockPos import net.minecraft.util.math.ChunkPos import net.minecraftforge.fml.common.gameevent.TickEvent +import java.text.SimpleDateFormat +import java.util.* import kotlin.math.roundToInt object StashLogger : Module( @@ -96,7 +98,8 @@ object StashLogger : Module( if (logToChat) { val positionString = center.asString() - MessageSendHelper.sendChatMessage("$chatName Found $string at ($positionString) ") + val timeStr = SimpleDateFormat.getDateTimeInstance().format(Calendar.getInstance().time) + MessageSendHelper.sendChatMessage("$chatName Found $string at ($positionString) [$timeStr]") } found = true