Skip to content

Commit

Permalink
StashLogger: Show the time and date when a stash is found (#466)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
Baitinq and Avanatiker authored Jan 18, 2023
1 parent 85bcf15 commit 414581b
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 414581b

Please sign in to comment.