Skip to content

Instantly share code, notes, and snippets.

@AlexIIL
Last active December 18, 2016 02:31
Show Gist options
  • Save AlexIIL/fe5a0b9c5bc8a6bed6e2d20a11e56b41 to your computer and use it in GitHub Desktop.
Save AlexIIL/fe5a0b9c5bc8a6bed6e2d20a11e56b41 to your computer and use it in GitHub Desktop.
CustomLoadingScreen_1.3.x json description
// config:
Array of ImageRender
// ImageRender:
"type":Type,
"resourceLocation":String,
"positionType":PositionType,
"texture": AreaSrc,
"position": AreaDst,
"text": String,
"colour": String
// Type:
One of the following: [
STATIC, // an image that never changes. Does not use "text"
STATIC_TEXT, // text that never changes. "resourceLocation" should pouint to a font (the default is "minecraft:textures/font/ascii.png")
DYNAMIC_TEXT_STATUS, // text that displays the current info of the progress, for example "Post Init: BuildCraft"
DYNAMIC_TEXT_PERCENTAGE, // text that displays the current percentage of overall progress, for example "24%"
DYNAMIC_PERCENTAGE // An image that will grow horizontally depeding on the current progress of loading
]
// PositionType:
One of the following: [
TOP_LEFT,
TOP_CENTER,
TOP_RIGHT,
CENTER_LEFT,
CENTER,
CENTER_RIGHT,
BOTTOM_LEFT,
BOTTOM_CENTER,
BOTTOM_RIGHT
]
// AreaSrc:
"x" // The source X co-ord of the image. Should be a number between 0 and 256, no matter the actual size of the texure
"y" // The source Y co-ord of the image. Should be a number between 0 and 256, no matter the actual size of the texure
"width" // The width of the image in the raw image. Should be a number between 0 and 256.
"height" // The height of the image in the raw image. Should be a number between 0 and 256.
// AreaDst:
"x" // The destination X co-ord of the image, in pixels. You WILL need to play around with this to position it how you want.
"y" // The destination Y co-ord of the image, in pixels. You WILL need to play around with this to position it how you want.
"width" // The width of the image, in pixels.
"height" // The height of the image in pixels.
// The follwing is a simple outline of all the possible text's in a config file.
// This is stored in the "json" format (see http://www.json.org" for more detail)
[
// The config is an array of all the elements used.
// The highest element is rendered first, so it appears at the back
{
"type":"STATIC", // Defines an image that never changes
"resourceLocation":"minecraft:textures/blocks/dirt.png", // The image to load from (this might be "minecraft:textures/blocks/dirt.png")
"positionType":"CENTER", // One of TOP_LEFT, TOP_CENTER, TOP_RIGHT, CENTER_LEFT, CENTER, CENTER_RIGHT, BOTTOM_LEFT, BOTTOM_CENTER, BOTTOM_RIGHT
"texture": { // Defines
"x": 0,
"y": 0,
"width": 256,
"height": 256 //take the whole source texture
},
"position": {
"x": 0,
"y": 0,
"width": 512
"height": 512 // Make it huge
},
"colour":"FF0055" // RGB colour, in hexidecimal. This is a light pink
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment