Watson

Watson is a mod for Liteloader 1.7.2 to 1.12.2, Rift 1.13.2 and Fabric 1.14.4-1.18.1 that displays LogBlock, CoreProtect or Ledger logs in 3-D.

It allows the player to see coordinates, ore deposits, configure many aspects such as TP, a Cursor, Vectors and more.









For the Liteloader totemo GitHub builds check here (1.7.2 to 1.8)

For the Liteloader Minebench GitHub builds check here (1.9.4 to 1.12.2)

For the Rift/Fabric Watson GitHub Builds/Information/Wiki check here (1.13.2, 1.14.4 to 1.18.1)

Rift/Fabric Curseforge Description

Malilib is required

https://www.curseforge.com/minecraft/mc-mods/malilib

Server side support

https://www.spigotmc.org/resources/watson-display-coreprotect-logblock-logs-in-3d.82222

Watson is a Minecraft mod that displays LogBlock, CoreProtect or Ledger logs in 3-D. It also has some features to make moderation tasks, such as observing chat and managing screenshots, a little easier. The current features of the mod are:

To open main menu, press L

To open the config menu, press L + C

It displays individual edits as wireframe 3-D boxes.

It groups edits of ore blocks into ore deposits, numbers each deposit, shows the numbers in 3-D space and provides commands to teleport to deposits and compute a stone:diamond ratio.

It draws vectors between edits indicating the time sequence of edits.

It draws text annotations in 3-D space. These can act as teleport targets.

Edits and annotations can be saved to files and loaded at a later date.

There's a simple built-in calculator for working out stone:diamond ratios.

It uses colour to highlight parts of chat that match regular expressions. This can be used to draw attention to banned words. It can also be used to highlight the names of people, acting as a rudimentary friends list.

It adds player names to screenshots automatically.

It does a /region info regionname for you when you right click on a region with the wooden sword (rate limited to once every 10 seconds - the wooden sword will simply list the region name the other times).

In order to shorten coordinate displays and make them easier to read, Watson also hides the LogBlock coords lines from chat and re-echoes them in a custom, brief format, where block IDs are numeric rather than words. Re-echoed coordinates are assigned colours based on their physical proximity. This makes separate ore deposits easy to distinguish in the coordinate listing. Note that reformatting and recolouring of LogBlock query results can be controlled by the reformatqueryresults and recolourqueryresults configuration settings, respectively.

If you have questions or need help with something, the fastest way to get answers is to join Watson Discord, otherwise put them on my github incase of crashes/bugs here

Want to support development?

If you want to support development, check out my Patreon! Supporting me via Patreon lets me spend more time modding, and allows me to put out more updates for everyone to enjoy.

Liteloader GitHub Description/Screenshots/Tables

A Minecraft mod that displays LogBlock, Prism and CoreProtect query results in 3-D.

Watson is a Minecraft mod that displays LogBlock (and to a limited extent Prism and CoreProtect) logs in 3-D. It also has some features to make moderation tasks, such as observing chat and managing screenshots, a little easier. The current features of the mod are:

It displays individual edits as wireframe 3-D boxes.

It groups edits of ore blocks into ore deposits, numbers each deposit, shows the numbers in 3-D space and provides commands to teleport to deposits and compute a stone:diamond ratio.

It draws vectors between edits indicating the time sequence of edits.

It draws text annotations in 3-D space. These can act as teleport targets.

Edits and annotations can be saved to files and loaded at a later date.

If you install the Macro/Keybind Mod and the Watson Macro/Keybind Support then Watson can be controlled and queried by Macro/Keybind Mod scripts and key bindings. There's a simple built-in calculator for working out stone:diamond ratios.

It uses colour to highlight parts of chat that match regular expressions. This can be used to draw attention to banned words. It can also be used to highlight the names of people, acting as a rudimentary friends list.

It adds player names to screenshots automatically.

It does a /region info regionname for you when you right click on a region with the wooden sword (rate limited to once every 10 seconds - the wooden sword will simply list the region name the other times).

In order to shorten coordinate displays and make them easier to read, Watson also hides the LogBlock coords lines from chat and re-echoes them in a custom, brief format, where block IDs are numeric rather than words. Re-echoed coordinates are assigned colours based on their physical proximity. This makes separate ore deposits easy to distinguish in the coordinate listing. Note that reformatting and recolouring of LogBlock query results can be controlled by the reformat_query_results and recolour_query_results configuration settings, respectively.

An optional, custom materials.yml file for LogBlock is provided. That allows Watson to provide more visually distinct depictions of many types of blocks, notably carpets, stained clay and stained glass. See the section on Custom LogBlock Material Names.

Downloads and Installation Instructions

See the releases page for this project for downloads and installation instructions.

If you plan to control Watson using the Macro/Keybind Mod, then you will also need to install the Watson Macro/Keybind Support mod.

Using Watson

Viewing Edits

Turn on the Watson display. On survival servers that use the nerd.nu ModMode plugin, the display is turned on and off automatically when switching in and out of ModMode:

/w display on

The Watson display can be toggled by omitting the on|off parameter:

/w display

Use LogBlock to get the coordinates. As Watson sees coordinates listed in chat, it makes a record of the edit and draws a wireframe outline of the block where the edit occurred.

/lb time 12h player playername block 56 coords

/lb page 2

/lb page 3

/lb page 4



Edits with default vector length.

When listing edits in chat, Watson groups them together based on spatial proximity and echoes the co-ordinates using a different colour for each group. This allows separate ore deposits to be readily distinguished, for the purpose of selecting which edit to teleport to with /lb tp. (However, note that there is a separate /w tp feature for teleporting to ore deposits, discussed later.)

To teleport to an edit of interest:

/lb tp 25

Perhaps, look at what happened immediately before that edit. The Watson "/w pre" command displays the edits immediately before the most recently "selected" block. Just teleporting to an edit selects it for this purpose. Alternatively, when you check a block using the LogBlock toolblock (it defaults to bedrock, but on the nerd.nu servers it's coal ore), that also selects it.

/w pre

By default, "/w pre" queries 45 edits from LogBlock. You can explicitly override that number:

/w pre 75

There's also a "/w post" command that queries LogBlock for the edits that happened immediately after the selected block:

/w post

/w post 60

The default numbers of edits for the "/w pre" and "/w post" queries are adjustable using the pre_count and post_count configuration setting, respectively. If you increase those, you will also want to adjust the max_auto_pages setting to page through all of those results automatically.

Perhaps, look at the immediate vicinity of an edit:

/lb area 3 player playername time 12h coords

Check individual blocks using the LogBlock tool block. Watson will draw this query result in 3-D, the same as with a "coords" query.

Possibly take some screenshots. The screenshot filename will include the name of the player whose last edit was selected. Depending on the Watson settings, the screenshot may also be placed in a subdirectory of the Minecraft .minecraft/screenshots directory. See the section on Screenshot Management for more information.

When you're done investigating, clear the currently stored edits. This also clears the player name (in screenshot filenames) and information about the coordinates, time and block type of the most recently selected edit.

/w clear

If you forget any of the above commands:

/w help

The Cursor

The currently selected edit or position is shown as a magenta 3-D crosshair. A position can be selected using the query tool of the logging plugin, irrespective of whether any results are returned. If the currently selected position corresponds to a block edited by a player, then a dashed magenta line will be drawn to the edit that preceded it (if Watson has that edit in its memory).

The current selection is automatically changed when a new query result is received in chat, if you teleport to an ore deposit using "/w tp" or if you use the logging plugin's teleport-to-edit command (e.g. "/lb tp 1").

Watson can move the cursor through consecutive edits that it has seen in query results, using configurable keys (they default to Alt+SCROLL_UP and Alt+SCROLL_DOWN). You can also teleport to the current cursor position using a configurable key (which defaults to Alt+MOUSE_LEFT).

Viewing Ore Deposits

Watson groups adjacent destructions of ore blocks into ore deposits. Here, "adjacent" includes blocks up to 1 block away along all three cardinal axes simultaneously. Ore deposits are assigned numeric labels starting at 1 and increasing in time. All diamonds are numbered first, then emeralds, then iron, gold, lapis, redstone, coal and finally quartz. Thus, if the coordinates of 5 diamond deposits and 10 iron deposits have been retrieved from the LogBlock database, the diamond deposits will be numbered from 1 to 5, with 1 being the oldest diamond, and the iron deposits will be numbered from 6 to 15, with 6 being the oldest iron deposit.



Ore deposits.

Ore deposits are colour-coded according to ore type, with diamonds listed in light blue, emerald in light green, iron orange, gold yellow, lapis blue, redstone red, coal listed in dark grey and quartz in white.

To list all of the deposits:

/w ore

Or if there are multiple pages (50 deposits to a page) you may need to specify a page number:

/w ore 2

The "/w tp" command can teleport to the next deposit in the sequence (starting at one), the previous one, or the deposit with a specific number:

/w tp

/w tp next

/w tp prev

/w tp 17

The "/w tp" command is just a synonym for "/w tp next". Teleporting to an ore deposit with "/w tp" selects that deposit, so that "/w pre" will show the edits leading up to it.

To automatically compute stone:diamond ratios for the current set of diamond deposits:

/w ratio

Watson will compute one stone:diamond ratio for the time period that includes all diamond deposits listed by /w ore. If there are segments of time where diamonds were mined particularly quickly, Watson will compute additional stone:diamond ratios for those smaller time segments too.

It is also possible to see what the current time is at the server, which can be useful information when looking at LogBlock time stamps:

/w servertime

The numbers of deposits are drawn in 3-D and can be hidden, shown or toggled with the "/w label" command:

/w label off

/w label on

/w label

Given the above commands for working with ore deposits, a basic x-ray checking procedure would be as follows:

List top miners: /lb time 12h block 56 sum p

List diamond edits for one particular miner: /lb time 12h player fred block 56 coords

Page through all coordinate results: /lb next

List ore deposits. This will show their timestamps: /w ore

Check the stone:diamond ratio: /w ratio

Teleport to specific deposits for more detailed examination: /w tp

See what happened before the deposit in question was uncovered: /w pre

Manipulating the Vector and Outline Displays

Watson draws vectors (arrows) from each edit to the next edit which is more recent, provided that the distance in space between the edits is greater than the minimum vector length. The default minimum length is a configuration setting that defaults to 4.0. To draw vectors between all edits:

/w vector length 0

The above command sets the minimum vector length for the current session. The minimum vector length can be permanently changed to that value using:

/w config vector_length 0

To hide, show or toggle the vector display:

/w vector off

/w vector on

/w vector

Watson remembers whether the vector display was on or off the last time Minecraft was run and uses that as the default state at startup.

To hide, show or toggle the outlines of blocks:

/w outline off

/w outline on

/w outline

Manipulating Annotations

Annotations are text associated with a particular location and displayed in 3-D space. They are similar to waypoints in the Rei's Minimap mod.

To create an annotation, first get a location, either with /lb coords query, or by simply using the LogBlock toolblock to mark a position. When using the LogBlock toolblock, it is not necessary for the LogBlock database to contain any edits for that location. The coordinates will be noted by Watson, regardless.

To add an annotation:

/anno add This is the spot

To list all annotations:

/anno list

To remove a single annotation, by number:

/anno remove 1

Teleport to an annotation, by number:

/anno tp 3

To hide, show or toggle the visibility of all annotations:

/w anno off

/w anno on

/w anno

To remove all annotations:

/anno clear

Saving and Loading Edits from Files

Watson can save the current set of edits and annotations to a file in .minecraft/mods/watson/saves/. Watson save files are in a self-explanatory text format that can be processed by UNIX text processing tools like grep. If you don't specify a file name, Watson derives one from the current local time and the name of the player who performed the most recently selected edit.

To save a file (for Notch's edits the file might be Notch-2012-10-23-17.21.34):

/w file save

To list all files:

/w file list

Or alternatively:

/w file list *

If there are multiple pages of files (50 to a page) then you may need to specify a page number:

/w file list * 3

To list all files for players whose names begin with the specified text (case insensitive); the example below would list Notch's edit files, possibly among others:

/w file list notc

To load the most recently saved file for a given player name (case insensitive):

/w file load notch

Files can be deleted by specifying a pattern for the beginning of the file name:

/w file delete not

You can delete all files with the asterisk:

/w file delete *

You can also delete all files older than a specified date, in the form YYYY-MM-DD. For example, to delete all files that were last modified before 2013:

/w file expire 2013-01-01

Filters

Filters are used to ignore query results that don't belong to specific players of interest. Results for other players only appear in chat and are never added to the 3-D display. By default, no filters are set, meaning that any log query result, will be added to the display.

To set a filter, use "/w filter add" followed by a list of player names:

/w filter add totemo

This filter ignores all results except those describing edits made by totemo. If you add a second filter:

/w filter add Notch

then edits by both totemo and Notch will be added to the display as they are encountered in chat. Of course, it's not necessary to type two add commands. You can just use:

/w filter add Notch totemo

Setting a filter also sets the current player of interest. So after "/w filter add Notch", subsequent screenshots will have the name Notch added to them (see Screenshot Management), even when no edits by Notch have been listed in chat. This feature can be used to tag a screenshot with the name of any player, irrespective of whether that player has made any edits. Note, however, that the next query result that passes the filter will change the currently selected player.

To list the current set of filters, use either of:

/w filter list

/w filter

To remove one or more filters, use "/w filter remove" with a list of player names:

/w filter remove Notch

To remove all filters:

/w filter clear

Also, note that clearing the Watson display with "/w clear" also clears the list of filters. Managing Edits By Specific Players

To hide only the edits (outlines, vectors and ore deposit labels) belonging to a specific player or list of player names:

/w edits hide Notch

When edits are hidden, the corresponding ore deposits will be listed as strikeout text in the output of the "/w ore" command.

To show the edits again:

/w edits show Notch

To completely remove all record of edits by specific players from the client's memory (note however that they will still exist as log entries on the server, as well as potentially in Watson save files):

/w edits remove Notch totemo

There's also a "/w edits clear" command, which removes all edits by all players.

To list the players who have made edits that are currently in Watson's memory, use either of:

/w edits list

/w edits

These commands list the number of edits by each player and say whether the edits are currently shown or hidden.

In-Game GUI

Watson has an in-game Graphical User Interface (GUI) with controls for some of the settings that affect the Watson display. By default, the key binding to show the in-game GUI is Ctrl-Return, but the key can be configured in Watson's settings screen. You must be in-game (logged in to a server) to show this GUI.



The Watson in-game GUI.

The various controls are described in the table below:



Settings GUI

Watson has a settings screen for some of the configuration settings. Future versions of Watson will add controls for all configuration settings and then the "/w config" command will probably be removed.

To show the settings GUI:

Press Esc to bring up the Minecraft menus.

Hover the mouse cursor over the LiteLoader tab in the top-right corner of the Minecraft window so that it shows the LiteLoader chicken.

Click on the chicken.

Click on Watson in the list of LiteLoader mods.

Click Settings...



The Watson settings GUI.

Currently, the following settings can be configured with this screen:



The teleport and query key bindings are disabled when the Watson display is hidden. Key bindings for showing the in-game GUI or taking a Watson screenshot will work regardless of whether the Watson display is enabled or not. Macro/Keybind Mod Integration

In versions prior to Minecraft 1.7.2, Watson automatically enables support for the Macro/Keybind Mod when that is installed.

In Minecraft 1.7.2 and later versions, you must install the Watson Macro/Keybind Support mod in order to control Watson using the Macro/Keybind Mod. Built-In Calculator

Watson contains a simple calculator that understands +, -, *, / and parentheses. Currently, the calculator considers '-' to bind to any digits that immediately follow (making a negative number), so when subtracting, use spaces. Example:

/calc 800/(57 - 32)

Highlighting Chat Content

Watson can highlight text that matches a specified Java regular expression using colour and formatting. All currently defined highlights are applied to a line of chat in the order that they were defined. Later highlights can override all or part of those that were defined earlier.

Let's say we'd like to make the "Unknown command." error message stand out a bit more by making it red:

/hl add red ^Unknown\scommand.*

The above command will highlight the whole chat line if it matches the pattern. Watson can also highlight selected parts of a chat line, using the "/hl select" command. To use it, specify a pattern that matches the whole line and put parentheses around the parts of the line that should be highlighted. For example, the following two commands will make player names in chat messages appear in orange italics with blue angle brackets around them:

/hl select blue ^(<\w+>).*$

/hl select /orange ^<(\w+)>.*$

The first command above highlights the name and the angle brackets in blue. The second command reformats just the name. This example also illustrates the fact that highlights are applied in the order that they were defined.

Valid colour names are: black, darkblue/navy, darkgreen/green, cyan, darkred/red, purple, orange/gold/brown, lightgrey/lightgray, darkgrey/darkgray/grey/gray, blue, lightgreen, lightblue, lightred/brightred/rose, pink/lightpurple/magenta, yellow and white. The "/hl add" and "/hl select" commands also allow a style either instead of a colour, or preceding the colour.



To list the existing patterns if you need to remove any:

/hl list

To remove a specific pattern by number:

/hl remove 3

And if you forget any commands, try:

/hl help

Screenshot Management

As of Minecraft version 1.7.2, Watson's screenshot features are now bound to a custom Watson Take Screenshot key, which defaults to F12. Configure this by clicking Options... -> Controls... from the Minecraft menu and scrolling down to the Watson section of the keybindings. If you desire, you can configure Watson's Take Screenshot key to F2 and disable the default Minecraft Take Screenshot key under Miscellaneous by pressing Esc. The Watson screenshot facility is a strict superset of the default Minecraft functionality.

If you ban players for grief or xray, inevitably you will end up with a large number of screenshots that must be retained until the ban is appealed. Watson includes features to make it easier to manage many Minecraft screenshots and to find the ones that pertain to a particular player.

When the name of the player is known (because Watson saw an "/lb coords" result for that player since the last "/w clear") the screenshot will be placed in the directory .minecraft/screenshots/ /, and will be appended to the filename, e.g. ".minecraft/screenshots/Notch/2013-02-21_12.47.50-Notch.png". Both of these behaviours can be turned on or off using the ss_player_directory and ss_player_suffix configuration settings, respectively.

When the player name is not known, then by default the screenshot just ends up in .minecraft/screenshots/. But Watson can be configured to place the screenshot in a subdirectory based on the current date and time. For example, "/w config ss_date_directory yyyy-MM-dd" would put the screenshot in a subdirectory based on the full numeric year, month and day, e.g. 2013-03-15. Whereas "/w config ss_date_directory MMMM yyyy" would use the long name of the month, e.g. "March 2013". There are many options and they are described in greater detail in the section on the Configuration File.

Custom LogBlock Material Names

By default, LogBlock does not provide distinct names for various coloured materials. For example, LogBlock calls all carpets "carpet" and all stained clay "stained clay". Since Watson reads the type of the block from chat, Watson cannot distinguish between "red carpet" and any other colour of carpet, for example. As of Minecraft version 1.7.2, Watson supports an optional LogBlock configuration with distinct names for the various colours of carpets, stained clay and stained glass. The configuration distinguishes between different kinds of saplings, planks and logs. It also has distinct names for the new 1.7 flowers and prepends the word "upper" to the names of any slabs in the upper half of the block.

To install this configuration, download config/LogBlock/materials.yml and place it in plugins/LogBlock/ on your server, replacing the default file, then reload or restart.

Prism Support

Although Watson was originally developed for use with LogBlock, some basic support for Prism has recently been added. Watson can now display "break", "place" and "pour" actions for any queries that return extended results (i.e. contain coordinates). In order for Watson to show Prism inspector results, Prism must be configured to always return extended results, as follows:

messenger:

always-show-extended: true

If that configuration setting is not made, it is still possible to get extended results from lookups using the -extended parameter:

/prism l r:20 p:totemo -extended

By default, Prism groups together what it considers to be related edits. For example, if a player placed red wool 5 minutes ago and just now places green wool, Prism may report that as placing multiple red wool 5 minutes ago. In order for watson to show individual edits, it is necessary to configure Prism to report each edit separately by setting lookup-auto-group to false in the configuration of the plugin.

At the time of writing, Watson does not support automatically calculating stone:diamond ratios ("/w ratio"), querying previous or subsequent edits ("/w pre" and "/w post") or automatically paging through results when used with Prism.

CoreProtect Support

As with Prism, CoreProtect support is currently limited to viewing inspector and lookup results. When used with CoreProtect, Watson does not currently support automatically calculating stone:diamond ratios ("/w ratio"), querying previous or subsequent edits ("/w pre" and "/w post") or automatically paging through results.

Note also that the parsing of lookup results currently ignores the returned world and assumes the current world instead. This will be resolved under Issue #23. For now, the easy way to avoid this problem is to simply specify a radius, e.g.:

/co l r:10

Configuration

Watson's main configuration settings are stored in ".minecraft/mods/watson/configuration.yml". They can be changed using the "/w config" command. If a setting can be either "on" or "off", omitting a value for it in "/w config" will reverse the current value. If the setting has a value that can't be toggled in this way, "/w config settingname" will show its current value.

Incomplete Ordering of information from Table










Files

.minecraft/mods/watson/log.txt - The debugging log. Also includes a log of chat messages.

.minecraft/mods/watson/configuration.yml - The main configuration file. Stores a variety of settings that persist between Minecraft sessions.

.minecraft/mods/watson/chathighights.yml - The list of colours and regular expressions for highlighting chat content. The default contents of this file are saved in the modified minecraft.jar file and saved as a separate file the first time /hl add or /hl remove is run.

.minecraft/mods/watson/blocks.yml - If this file exists, it overrides the default version of it stored in minecraft.jar. It defines the canonical names of block types, as they appear in LogBlock query results, as well as aliases, and defines the shape, colour and line thickness used to draw the block in 3-D.

.minecraft/mods/watson/saves/ - Directory of save files containing records of edited blocks and annotations.

Compatibility

Watson is regularly tested for compatibility with:

LiteLoader

Minecraft Forge

MagicLauncher

Macro/Keybind Mod

WorldEditCUI

Rei's Minimap

Optifine

Older versions of Watson (before 1.7.2) will require Minecraft Forge. More recent versions of Watson use LiteLoader. However, note that LiteLoader and Minecraft Forge can both be installed simultaneously without any problems.



Contact Details

If Watson's not working for you or you want to suggest improvements, I'm happy to help. You can contact me directly in the following ways:

On http://reddit.com and the http://nerd.nu forums, I have the same user name. On gmail.com, append the word "research" to my name to get my address.

You can also raise bug reports or feature requests via GitHub, here.