Before installing/using these or any mods, make sure you backup your .minecraft folder, I (Vazkii), or any other modders for that matter, am not responsible in any way, shape or form for any damage dealt to, but not only, your saves, your minecraft, your computer or others.
This mod was made for ModJam, a 96 hour modding competition. It was made in a total of around 17 hours trough 3 days. You can watch the streams of the creation of the mod below:
So what is this, you ask? ReCubed is a statistics mod, it shows you stuff. All sorts of stuff you may or may not want to know. So let's get on to it.
Server Side persistent statistics.
In-depth statistics of everything that happened.
Real time pie chart and scoreboard stat visualisation (with configurable update interval).
Commands for server owners.
Remember when I said it tracked all sorts of stuff? I wasn't kidding.
Arrows Shot (differentiates Shots and Critical Shots)
Ender Eyes Used
Ender Pearls Thrown
Items Picked Up
Messages Sent (differentiates all commands)
Potions Affected By
Sheep Dyed (differentiates colors)
Times Fished (differentiates casts and catches)
Times Logged In
All stats get subcategories, so for example, Blocks Broken shows how many blocks of each type you broke, Damage Taken shows what type of damage you took, etc.
Using the mod is simple, to start off, open your inventory and click the little cogwheel next to your character (if you don't like this, you can swap it for a keybind in the config file).
You'll get the above screen. There's a few options in the bottom, mess with them a bit and look at the bottom right corner of your screen to see the changes. You can press Move HUD to change where it's at. (tip, use the WASD keys to snap the HUD to the corners of the screen!).
Pressing View Stats will open the stat viewer screen. This is where it all happens. The list on the left shows all stats being tracked (stats in grey are stats you have no data on). Clicking one of the stats will show a pie chart of the top players (the pie charts only show the 10 most prevalent entries to prevent clutter). You can click the players' slices of the pie to view their stats, or type in someone's name to view their stats (case they aren't in the graph). Clicking "Your Stats" on the bottom shows you your stats.
When viewing stats, if you want to see what values a stat has, if the stat isn't present in the pie chart, simply typing it in will let you see what values it has. Lastly, pressing ENTER will track the stat you're looking at (be it the top players or the top stats for a given player).
This is the Ingame HUD, it displays the top 15 values for any stat you chose, in a scoreboard format. If you're looking at the stats of a player, anything below that gets coupled into an "others" stat, if you're looking at the top players and you don't happen to be in that list, you'll still appear at the end, alongside your rank in the server.
If you are a server admin, be glad to hear that there are some commands for you to use. These commands can be restricted to a specific set of players in the config file if you so desire.
/recubed-freezecateogry <frozen(true false)="">
Sets the frozen flag of a category, if a category is frozen, the stats there stay constant.
/recubed-freeze <frozen(true false)="">
Sets the frozen flag of ALL categories.
Clears all the data in a category.
Clears all of a player's data in a category.
Wipes ALL data portraying to a player.
Wipes ALL data.
Saves all the current data in a backup of the name given. If a backup of that name already exists it'll overwrite it.
Loads the backup (if existent) of the name given.
If a backup of the name given exists, deletes it.
List of categories:
If you are still confused to what category you need to manipulate to what effect, look in the localization file, the display names might help you find what you need. For example, the category displayed as "Experience Collected" is, in code, "experience_gathered".
Adding your own statistics is very easy, simply call the registerCategory function.
The first parameter is the category's name (full unlocalized name, to be localized in the client), the second parameter is a short term of the category, to be used with the server commands.
This can be done during any initialization phase before ServerStarting.
The next methods, let you manipulate the values in the categories. The tag parameter is supposed to be an unlocalized name, to be localized in the client, (e.g. "item.ingotIron.name"). Countless examples of this being used can be found in GeneralEventHandler and PlayerLastTickData.
Q: Why are the colors so weird?
A: All the colors are randomly generated using the entry's name as the seed for the RNG. It's normal you'd get some weird colors sometime.
Q: Why no blocks placed stat?
A: Technical issues.
Q: Can't the stats go out of bounds in the HUD?
A: Nope, I'm a step ahead.
Q: Can you add X stat?
A: Feel free to suggest stats, but here's a list of ones I won't add: time played, most (anything), distance travelled/fallen, items crafted/smelted/brewed/enchanted/repaired.
I saw that when you got interviewed on Q stream.
Really really nice work.
I might take a look at your code to see how you made all the UI elements Those look miles better than what I have in Opis right now ^^