-
Notifications
You must be signed in to change notification settings - Fork 20
Configuring the mod (v1.x)
This page contains information on how to configure the latest version of the mod. All config files for this mod can either be found or created in the config
directory where Minecraft is installed.
- File name:
betterstats.properties
- File format:
Properties
To get started, create the betterstats.properties
config file in the config
directory, if there isn't one already. And from there, define whichever properties and values you wish to configure. This config can also be modified in-game by using the Options tab. Below is the list of all properties you can use, and their default values:
# To access the options tab, hold down the ctrl key while cycling tabs. Disabling this
# config property will disable the options tab as well, making it inaccessible.
BS_OPTIONS_GUI=true
# This property keeps track of whether or not the user has seen the better statistic screen
# before. It is used for drawing a red dot in the top right corner of the "Statistics" button.
# In other words, if the user never saw the screen before, a small red dot will let them know
# to click on the "Statistics" button.
SEEN_BSS=false
# This one is an extra unused feature I decided to include. At first I was gonna use it, but
# I then changed my mind, as I couldn't come up with a cool texture for the button.
# When turned on, the `betterstats:textures/gui/stats_btn_bg.png` image will be drawn below
# the "Statistics" button's text. You can use this to customize the button if you wish to.
# Don't forget to keep the texture's edges transparent, so as to let the game's button outline
# work properly. You can find the placeholder image you could use in the mod's `assets` folder.
BSS_BTN_IMG=false
# When enabled, you will be able to shift+[click/enter] an item stat to /give yourself that item.
# Requires permission level 2 or OP, aka permission to use /give.
ALLOW_CHEATS=false
# Some modded entities might not support the way this mod handles and renders them, resulting in
# errors that end up crashing the game. This option makes this mod try to ignore those errors.
# For example, some entities may always assume they are in a ServerWorld, while this mod renders
# them on the screen using the ClientWorld.
# Please see COLOR_STAT_BG_ERRORED as well.
IGNORE_ENTITY_RENDER_ERRORS=true
# When enabled, you will be able to middle-mouse-click mod and item stats to open their Wiki
# article. For modded mobs and items, you will have to define their Wiki site manually using
# the Wiki config.
ENABLE_WIKI_LINKS=true
# When enabled, you will be able to left/right-mouse-click an item stat to open the REI
# screen for the given item. Requires the REI mod to be installed.
ENABLE_REI_LINKS=true
# Filters
FILTER_HIDE_EMPTY_STATS=false
FILTER_SHOW_ITEM_NAMES=true
# Colors for tooltips displayed by this mod
COLOR_TOOLTIP_TEXT=-1
COLOR_TOOLTIP_BG=-15794161
COLOR_TOOLTIP_OUTLINE=-15007682
# Statistics colors and content pane colors
COLOR_CONTENTPANE_BG=2013265920
COLOR_STAT_GENERAL_TEXT=-1
COLOR_STAT_BG=599045300
COLOR_STAT_BG_ERRORED=771724950
COLOR_STAT_OUTLINE=-4144960
# Category name colors:
# Certain stats such as item stats are divided into categories. Each category has it's
# name displayed on the top of the category. Item stats category texts always use the
# COLOR_CATEGORY_NAME_HIGHLIGHTED color. As for food and monsters killed stats, they
# use the COLOR_CATEGORY_NAME_NORMAL color. Once all food items were eaten in a given
# category or all hostile mobs were killed in a given category, the
# COLOR_CATEGORY_NAME_HIGHLIGHTED color will be used. This highlighted color acts as
# an indicator that you ate all food items or killed all monsters in a given category.
COLOR_CATEGORY_NAME_NORMAL=-922747136
COLOR_CATEGORY_NAME_HIGHLIGHTED=-256
When it comes to color properties, you need to assign them an integer representing the RGBA color you wish to use. As for obtaining integer numbers for given RGBA values, I have created a Java code snippet on the online compiler site that you can use right now to obtain the integer for any color you wish to use. You can see it by clicking here.
- File name:
betterstats_mobStatRenderer.json
- File format:
JSON
JsonObject
When rendering mob statistics, the mod tries it's best to position and scale the mob models correctly so as to make them fit the GUI box properly. However, not every mob model behaves the same, and as such, some modded mobs may appear positioned inappropriately, despite the mod's efforts to make it positioned and scaled appropriately.
If you are someone who uses this mod, or a mod-pack creator/developer, you can use this config file to tell the mod how it should render certain entities. I have already tweaked some Vanilla entities to make them positioned appropriately. You can always override those tweaks using the config file.
To get started, create the betterstats_mobStatRenderer.json
file in the config
directory, make sure it's contents are at least {}
to avoid errors, and make sure you use the appropriate JSON syntax. Below is an example configuration:
{
"minecraft:axolotl": { "MobStatGuiPosOffset": [10,-10] },
"minecraft:ghast": { "MobStatGuiPosOffset": [0,-25] },
"minecraft:spider": { "MobStatGuiSize": 95 },
"minecraft:cave_spider": { "MobStatGuiSize": 80 },
"minecraft:squid": { "MobStatGuiPosOffset": [0,-25] },
"minecraft:glow_squid": { "MobStatGuiPosOffset": [0,-25] },
"minecraft:phantom": { "MobStatGuiSize": 60, "MobStatGuiPosOffset": [0,-20] },
"minecraft:turtle": { "MobStatGuiSize": 70, "MobStatGuiPosOffset": [0,0] },
"minecraft:ender_dragon": { "MobStatGuiSize": 300, "MobStatGuiPosOffset": [0,-20] },
"minecraft:slime": { "MobStatGuiSize": 400 },
"minecraft:magma_cube": { "MobStatGuiSize": 400 },
"minecraft:pufferfish": { "MobStatGuiSize": 150 }
}
Each JSON entry is an Identifier
for a given entity, for example "minecraft:pig": { ... }
. Each entry can have certain properties defining how the entity in question will be rendered on a GUI mob statistic.
- Type:
Integer
Before rendering mobs, the mod attempts to calculate which size it should use when rendering a given mob. This integer is a percentage value that multiplies the mod's chosen size number by MobStatGuiSize / 100
. So for example, if the mod chose to render a mob using the size of 30
, and the value of this property was let's say 200
, then the final rendering size would be 30 * (200 / 100) = 60
, aka 60
.
Example: "MobStatGuiSize": 100
- Type:
Integer array with the length of 2
This property offsets a given entity's GUI position relative to the mod's chosen position at which to render a mob at. The mod attempts to render a mob near the center of it's GUI statistic box. The X and Y values are also percentages, and those percentages are relative to the size of the GUI box. In v1.1, the size of the box is 50
, so a value of let's say X = 100
would offset the entity by 50
in the X axis, because 50 * (100 / 100) = 50
, and so the final value would be 50 (chosen by the mod) + 50 (custom offset) = 100
. It is not recommended to use values > 100 or < -100
.
Example: "MobStatGuiPosOffset": [0,-20]
- File name:
betterstats_wikiLinks.json
- File format:
JSON
JsonObject
When middle-mouse-clicking a mob or an item stat, the mod will attempt to open it's Wiki article in the default browser. For modded mobs and entities, you have to manually define what Wiki website the mod should use, so the mod knows what site to open. That is what this config is for. Below is an example configuration:
{
"minecraft": { "WikiHandler": "https://minecraft.fandom.com/wiki/" },
"examplemod":
{
"MobWikiHandler": "https://example.com/wiki/mobs/",
"ItemWikiHandler": "https://example.com/wiki/items/"
}
}
The way this feature works is, when you middle-mouse-click let's say... a statistic for a minecraft:pig
, the mod will use the identifier namespace (aka minecraft
) to try and obtain the Wiki handler URL for the given mob or item (in this case, mob), and it will then append the identifier path (in this case pig
) to the Wiki handler URL, and it will then open the URL in the default browser.
In this case, the final URL would be: https://minecraft.fandom.com/wiki/pig