Config Items
Items in the config
You will find two types of items in the config files. One has properties such as "position" and "permissions" and the other is a more simplistic type that is used for filling out background items.
Config Item
Here you can find a commented and uncommented example of a simple config item
Extended Config item
This is the more common of the two as it allows for permission checks, and positioning in the GUI.
Here you can find a commented and uncommented example of an extended config item
Pixelmon UI Elements
Pixelmon UI elements are a special item that allows you to display any sprite that exists on the client in the GUI. There are plenty of of different properties you can add to the item's NBT to change the appearance of the sprite, such as the position, scale, and rotation. Below I will document all the keys, what they do, and the accepted ranges and provide an example ConfigItem with a Pixelmon UI element.
Keys
UIImage
Key: UIImage
Type: String
Description:
This is the resource location path of the sprite you want to display.
Example: pixelmon:textures/gui/uielements/discord.png
Default: ``
UIHoverImage
Key: UIHoverImage
Type: String
Description:
This is the resource location path of the sprite you want to display when the player holds their mouse over the item in the GUI.
Example: pixelmon:textures/gui/uielements/discord.png
Default: ``
UIText
Key: UIText
Type: String
Description:
This is the text that will be displayed on the item.
Example: &aClick me!
Default: ``
UIHoverText
Key: UIHoverText
Type: String
Description:
This is the text that will be displayed when the player holds their mouse over the item in the GUI.
Example: &aClick me!
Default: ``
UITextJustification
Key: UITextJustification
Type: Short
Description:
This is the justification of the text. Which means that the text from the UIText and UIHoverText value is either aligned to the right, center or left based on the value. Anything less than 0 is right, 0 is center, and anything greater than 0 is left.
Example: 0
Default: -1
Range: [-Infinity, Infinity]
UITextScale
Key: UITextScale
Type: Float
Description:
This is the scale of the text from both UIText and UIHoverText values. It defaults to 12.0.
Example: 12.0
Range: [0, Infinity]
UIXOffset
Key: UIXOffset
Type: Int
Description:
The number of pixels the image is offset from the left side of the item.
Example: 10
Default: 0
Range: [0, Infinity]
UIYOffset
Key: UIYOffset
Type: Int
Description:
The number of pixels the image is offset from the top of the item.
Example: 10
Default: 0
Range: [0, Infinity]
UIXOverride
Key: UIXOverride
Type: Int
Description:
The X position of the image to render it at. If not set the image renders at the slot of the item in the GUI.
Example: 10
Default: None
Range: [0, Infinity]
UIYOverride
Key: UIYOverride
Type: Int
Description:
The Y position of the image to render it at. If not set the image renders at the slot of the item in the GUI.
Example: 10
Default: None
Range: [0, Infinity]
UIZLevel
Key: UIZLevel
Type: Int
Description:
The Z level of the sprite on the UI. The higher the number the more it will render on top of other sprites.
Example: 10
Default: 0
Range: [0, 255]
UIImageWidth
Key: UIImageWidth
Type: Int
Description:
The width, in pixels, the sprite will be rendered to. Example: 16
Default: 16
Range: [0, 255]
UIImageHeight
Key: UIImageHeight
Type: Int
Description:
The height, in pixels, the sprite will be rendered to. Example: 16
Default: 16
Range: [0, 255]
UIImageU
Key: UIImageU
Type: Float
Description:
The u value of the sprite to render. This means the x position of the sprite in the texture file.
Example: 0.0
Default: 0.0
Range: [0, 255]
UIImageV
Key: UIImageV
Type: Float
Description:
The v value of the sprite to render. This means the y position of the sprite in the texture file.
Example: 0.0
Default: 0.0
Range: [0, 255]
UIImageScaleX
Key: UIImageScaleX
Type: Float
Description:
The scale of the sprite on the x-axis.
Example: 1.0
Default: 1.0
Range: [0, Infinity]
UIImageScaleY
Key: UIImageScaleY
Type: Float
Description:
The scale of the sprite on the y-axis.
Example: 1.0
Default: 1.0
Range: [0, Infinity]
UIRotation
Key: UIRotation
Type: Float
Description:
The rotation of the sprite in degrees.
Example: 0.0
Default: 0.0
Range: [-360, 360]
UIImageR
Key: UIImageR
Type: Float
Description:
The red color value of the sprite.
Example: 1.0
Default: 1.0
Range: [0, 1]
UIImageG
Key: UIImageG
Type: Float
Description:
The green color value of the sprite.
Example: 1.0
Default: 1.0
Range: [0, 1]
UIImageB
Key: UIImageB
Type: Float
Description:
The blue color value of the sprite.
Example: 1.0
Default: 1.0
Range: [0, 1]
UIImageA
Key: UIImageA
Type: Float
Description:
The alpha value of the sprite. Which means how transparent the sprite is.
Example: 1.0
Default: 1.0
Range: [0, 1]
UIImageHR
Key: UIImageHR
Type: Float
Description:
The red color value of the sprite when hovered over.
Example: 1.0
Default: 1.0
Range: [0, 1]
UIImageHG
Key: UIImageHG
Type: Float
Description:
The green color value of the sprite when hovered over.
Example: 1.0
Default: 1.0
Range: [0, 1]
UIImageHB
Key: UIImageHB
Type: Float
Description:
The blue color value of the sprite when hovered over.
Example: 1.0
Default: 1.0
Range: [0, 1]
UIImageHA
Key: UIImageHA
Type: Float
Description:
The alpha value of the sprite when hovered over. Which means how transparent the sprite is.
Example: 1.0
Default: 1.0
Range: [0, 1]
Example
Here is an example of a ConfigItem with a Pixelmon UI element.
Last updated