-
Notifications
You must be signed in to change notification settings - Fork 8
Screen Sprite Modifiers
1.20.4+ only.
These are some jsons that will allow you to modify arbitrary textures of any screen sprite, be it rendered in a HUD or a GUI texture.
Some practical examples are things like:
- moving xp bar
- making hotbar texture bigger
- removing overlays
- moving off hand slot to the left
- adding an overlay to your minimap border texture
Sprite modifiers act on SPRITES and can modify their position, texture location or UV.
To start you'll need to create a .json file in your resource pack folder in assets/[your namespace]/polytone/overlay_modifiers/[your modifier name].json
.
Note that the namespace and name used can be what you want as those ids wont be used.
Here are all the parameters that you can include in your modifier. Only texture
is mandatory, all others are OPTIONAL.
parameter | type | explanation |
---|---|---|
x_inc |
integer | How much the sprite should be moved on x axis |
y_inc |
integer | How much the sprite should be moved on y axis |
width_inc |
integer | How much the sprite width should be increased |
height_inc |
integer | How much the sprite height should be increased |
u0 |
float | New UV u0 value |
u1 |
float | New UV u1 value |
v0 |
float | New UV v0 value |
v1 |
float | New UV v1 value |
color |
int | New color value |
new_texture |
New texture location to use instead | |
overlays |
List of extra sprites to render. Their syntax is the same as the stuff above (x_inc...) |
Note that all texture path are relative to the textures/gui/sprites/
folder.
Say for example you want you want to make the hotbar texture appear bigger. To do so you can add the following modifier:
{
"texture": "minecraft:hud/hotbar",
"x_inc": -5,
"width_inc": 10,
"overlays":[
{
"texture": "my_pack:hud/my_overlay",
"y_inc": -2,
"height_inc": 4
}
]
}