pluginiPlugin

Add Bitmaps

Bitmap resources can be used to display custom graphics, textures, and interface elements.

Create the Bitmap Assets Directory

Create a namespace and basename under the plugins/Xerr/core/assets/image/[namespace]/[basename] directory.

For example, if the namespace is haha and the basename is world, the full path would be plugins/Xerr/core/assets/image/haha/world.

Add Graphics

Add .png graphic files to the plugins/Xerr/core/assets/image/haha/world/textures directory.

Create the Graphic Configuration File

In the plugins/Xerr/core/assets/image/haha/world/ directory, create the bitmap configuration file config.yml.

The directory structure example is as follows:

xxxxx.png
abc.png
config.yml

Edit the Bitmap Configuration File

In the config.yml file, you can specify display parameters for each graphic, including the graphic's path, height, width, etc.

Here is an example configuration:

# Graphic Configuration
img:
  # Graphic identifier
  ui:
    # Graphic file path (without extension)
    path: xxx
    # Display height ratio (maximum 256)
    height: 128
    # Display width
    width: 128
  tete:
    path: abc
    height: 150
    width: 64
    # Mapped character to display the graphic via text input
    symbol: 
    # Vertical ascent (only effective when symbol is set). Supports negative values, must not exceed height
    ascent: 16

Note

  • The maximum value for height is 256. For taller displays, split the graphic and assemble it progressively.

Reload Configuration

The resource pack will be auto-generated and configurations reloaded automatically after saving changes.

Test Graphic Configuration

Use the following command to verify graphic display:

/xerr print img <namespace> <basename> <graphic-id>
Example
/xerr print img haha world tete

1

Command supports tab autocompletion

2

On this page