Skip to content
Aleksey edited this page Jul 7, 2020 · 9 revisions

Map Skin API and Map Icons API

Map Icons API

For users:

To add your custom mob's icon for map, you just need to place <icon_name>.png image file to the ./config/justmap/icons/<mod_name> folder. Where icon_name is the mob's id in the game.
Example: config/justmap/icons/minecraft/creeper.png.

For other mods:

To add icons for mobs from your mod, place <mob_id>.png image file to the assets/<mod_id>/textures/minimap/entities/ folder of your mod.
Example: assets/minecraft/textures/minimap/entities/creeper.png.

Map Skin API

To add custom skin for the map it need to:

  1. Create folder for a skin in the config/justmap/skins/directory;
  2. Add to the skin's folder file skin_data.json, which contains your skin params;
  3. Place (if necessary) to the skin's folder a skin image file in the .png format.

skin_data.json

This file must contains the your skin's params:

  • "name": String. Skin's display name;
  • "shape": String (optional, default: universal). Skin's shape. Possible values: round (circle), square, universal;
  • "width": Integer. Skin's width;
  • "height": Integer. Skin's height;
  • "border": Integer. Skin's border thickness;
  • "resizable": Boolean (optional, default: false). If true skin will be stretched to the map size;
  • "repeating": Boolean (otional, default: false). If true and "resizable": false for skin render will be duplicates skin border parts. If "resizable": true, it will be stretches skin to the map size and duplicates the shorter texture side (for Big Map mode);
  • "texture_type": String. Possible values: image, source. For the "texture_type": "source" uses existing texture image. For "texture_type": "image" uses image file from skin's folder;
  • "image": String. Name of your skin image file. Uses for "texture_type": "image";
  • "texture": String. Path to texture image. Uses for "texture_type": "source".
    Example:
{
    "name": "Minecraft Gui",
    "shape": "square",
    "width": 64,
    "height": 64,
    "border": 5,
    "resizable": true,
    "repeating": false,
    "texture_type": "image",
    "image": "minecraft_gui.png"
}

Skin shape universal uses for repeating small textures, like minecraft:stone or another blocks texture. Map automaticaly generates skin texture from these textures. This shape is applicable to both round map and square. It recommends to set width and height for universal skins to 256 x 256 for better looks with round map. For example:

{
    "name": "Minecraft Stone",
    "shape": "universal",
    "width": 256,
    "height": 256,
    "border": 5,
    "texture_type": "source",
    "texture": "minecraft:textures/block/stone.png"
}
Clone this wiki locally