A minimap created within Minecraft's Core Shaders.
- Create a background texture to be used for the minimap.
- Generate a 256x256 texture containing the background.
- The background size can be configured in the shader's configuration file.
- Add the background texture to your resource pack's font
- Spawn a text display in the center of the 256x256 area.
- The text display must have a scale of zero
- The color of the text in the text display must be
#454D00 - Note: The view distance of the text display is smaller than the 256x256 area Now you should have a minimap displayed on screen while in view range. You are able to make larger backgrounds by placing entities at regular intervals.
- Create a texture for your icon.
- This can be any size that is a multiple of two between
2and128
- This can be any size that is a multiple of two between
- Add the texture to your resource pack's font
- Spawn a text display where you want the icon to appear on the map
- The text display must have a scale of zero
- The color value of the text encodes two key properties:
- The 2 most significant bits represent the Z-position of the icon minus 1.
- The 6 least significant bits represent HALF the size of the texture minus 1. Now you should have icons displaying on your minimap. If you wish to center an icon on the minimap (an arrow showing the player) you can simply make the text display ride the player.
| Z Index | 4×4 | 8×8 | 16×16 | 32×32 | 64×64 | 128×128 |
|---|---|---|---|---|---|---|
| 1 | #454D01 |
#454D03 |
#454D07 |
#454D0F |
#454D1F |
#454D3F |
| 2 | #454D41 |
#454D43 |
#454D47 |
#454D4F |
#454D5F |
#454D7F |
| 3 | #454D81 |
#454D83 |
#454D87 |
#454D8F |
#454D9F |
#454DBF |
| 4 | #454DC1 |
#454DC3 |
#454DC7 |
#454DCF |
#454DDF |
#454DFF |
The shader can be configured in the assets/minimap/shaders/include/minimap_config.glsl file.
- The minimap doesn't scale with GUI scale as we don't have access to it. That being said
ScreenSizevariable can be used to dynamicly scale minimap. - This shader doesn't provide any decorations (minimap frame YET, background when you reach the border etc.)
- Name tags of entities spawned after the minimap entities can sometimes show through the minimap. Solution: Spawn text display above build limit + 10 blocks
- If the player has a low render distance, the minimap can stop rendering at shorter distances. Solution: Since minimum render distance is 4(64) set, texture size to 128, and to always show full map (when in between sections) set it to 64.
- You must be mindfull of entity display/track settings in your server configuration, since text-displays are entities, not seeing them means not seeing the minimap.