Skip to content

Instantly share code, notes, and snippets.

@Johnnnnnnny
Last active May 30, 2024 21:24
Show Gist options
  • Save Johnnnnnnny/3951396c13521563feaffddb8bded358 to your computer and use it in GitHub Desktop.
Save Johnnnnnnny/3951396c13521563feaffddb8bded358 to your computer and use it in GitHub Desktop.
HOW TO MAKE CUSTOM TOOLTIPS - THE MANUAL
Requirements:
- Minecraft (Java) 1.14+
- Resource Pack
If you are not yet familier with custom fonts, I recommend you watch this video before hand to get the hang of the basics or read the
docs by AmberWat:
(https://youtube.com/watch?v=-9bjbL1dYAE&feature=share)
(https://github.com/AmberWat/NegativeSpaceFont/blob/master/README.md) (Credit to AmberWat for the documentation)
Go into your texture pack folder and go to assets/minecraft/font and create a file called default.json, in this file you will put the
following json code down below. (Do not put the comments (#) into your file.) IF YOU DID NOT BUY THE PREMIUM RESOURCE, REMOVE THE
_*colour* FROM THE PNG FILES ABOVE, IF YOU DID BUY THE RESOURCE PLEASE CHOOSE A COLOUR OUT OF BLUE, GREEN, RED, YELLOW, PURPLE OR PINK,
FOR EXAMPLE: tooltip_top_pink.png / tooltip_middle_blue.png
You can pay for the premium resource here: https://mythiccraft.io/index.php?resources/shiny-tooltip-borders-resource-pack-mmoitems-configs.412/
Now you would also need to put the negative_spaces.ttf in the same folder as you put default.json and also put the pixel art blocks
inside of assets/minecraft/textures/font. If you do not yet have a negative_spaces.ttf, download it here:
(https://github.com/AmberWat/NegativeSpaceFont/releases) (Credit to AmberWat for the negative_spaces.ttf resource)
If you didnt buy my premium the resource, you will need to make your own pixel art of 3 "building blocks" to use as the custom tooltip,
in the resource I have made the pixel sizes:
- tooltip_top.png - 160 width/17 height
- tooltip_middle.png - 160 width/13 height
- tooltip_bottom.png - 160 width/16 height
In this size you should put your borders around the edges of the sprite, for middle only do the left and right border, for top do left,
right and top border and vice-versa for the bottom border, bare in mind that if you want to make these bigger in terms of height not
width you would need to adjust the height and ascent values for the custom symbols.
Now that we have our blocks, its time to utilize the negative spaces to push our blocks into place. First load up Minecraft and make
sure you have some sort of way to put the custom blocks inside an items lore, for the pixel sizes I chose above I will provide the exact
negative spaces needed to slot it into perfect space.
Your Symbol
V
You will need to paste this into your line of lore:   
^ ^^^^^^^
Negative Spaces
Make sure to paste it as one entire block with no spaces inbetween. (Check down below for all negative space values.)
-You will paste the tooltip_top.png in the area where you put the item name.
-You will paste the tooltip_middle.png in the area where you put the item lore.
-You will paste the tooltip_bottom.png in the area where you put the item lore but at the last line (so the bottom).
And there you go your custom tooltip should display in-game, if you have any problems DM me on discord @ Johnny#4567 (I will try answer
as fast as possible!)
{
"providers": [
{
"type": "ttf",
"file": "minecraft:negative_spaces.ttf",
"shift": [0.0, 0.0],
"size": 10.0,
"oversample": 1.0
},
{
"type": "bitmap",
"file": "minecraft:font/tooltip_top_*colour*.png",
"ascent": 12,
"height": 17,
"chars": [
"\uE001"
]
},
{
"type": "bitmap",
"file": "minecraft:font/tooltip_middle_*colour*.png",
"ascent": 10,
"height": 13,
"chars": [
"\uE002"
]
},
{
"type": "bitmap",
"file": "minecraft:font/tooltip_bottom_*colour*.png",
"ascent": 10,
"height": 16,
"chars": [
"\uE003"
]
}
]
}
# Paste the unicode strings into the search bar at the top of this website and copy the symbols into your game.
# (https://unicode-table.com/en/blocks/)
In the video link I posted above, you can find the values of the negative spaces at the time-stamp 8:45, the (-) makes the
icon go backwards and the (+) makes it go forwards (as it explains in the video). I have also put all the values below.
(px = pixels)
|-------------------------------------|
| \uF801 = -1px | \uF821 = +1px |
| \UF802 = -2px | \uF822 = +2px |
| \UF803 = -3px | \uF823 = +3px |
| \UF804 = -4px | \uF824 = +4px |
| \UF805 = -5px | \uF825 = +5px |
| \UF806 = -6px | \uF826 = +6px |
| \UF807 = -7px | \uF827 = +7px |
| \UF808 = -8px | \uF828 = +8px |
| \UF809 = -16px | \uF829 = +16px |
| \UF80A = -32px | \uF82A = +32px |
| \UF80B = -64px | \uF82B = +64px |
| \UF80C = -128px | \uF82C = +128px |
| \UF80D = -512px | \uF82D = +512px |
| \UF80E = -1024px | \uF82E = +1024px |
|-------------------------------------|
Paste the unicode strings into the search bar at the top of this website and copy the symbols into your game.
(https://unicode-table.com/en/blocks/)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment