lumien231 / Custom-Main-Menu

A mod that allows you to modify the minecraft main menu
MIT License
67 stars 36 forks source link

Custom Main Menu Mod Missing Textures #244

Open Creeperdude2409 opened 6 years ago

Creeperdude2409 commented 6 years ago

I have the CMM mod installed and the Resource Loader installed and I still have it as a missing texture Here's the JSON: { "images": { "title": { "image" : "resources:modpacks:background.png", "posX" : -137, "posY" : 15, "width" : 275, "height" : 75, "alignment" : "top_center" } },

"buttons":
{
    "singleplayer":
    {
        "text" : "menu.singleplayer",
        "posX" : -100,
        "posY" : 48,
        "width" : 200,
        "height" : 20,
        "action" : 
        {
            "type" : "openGui",
            "gui" : "singleplayer"
        }
    },

    "multiplayer":
    {
        "text" : "menu.multiplayer",
        "posX" : -100,
        "posY" : 72,
        "width" : 200,
        "height" : 20,
        "action" : 
        {
            "type" : "openGui",
            "gui" : "multiplayer"
        }
    },

    "mods":
    {
        "text" : "fml.menu.mods",
        "posX" : -100,
        "posY" : 96,
        "width" : 200,
        "height" : 20,
        "action" : 
        {
            "type" : "openGui",
            "gui" : "mods"
        }
    },

    "options":
    {
        "text" : "menu.options",
        "posX" : -100,
        "posY" : 132,
        "width" : 98,
        "height" : 20,
        "action" : 
        {
            "type" : "openGui",
            "gui" : "options"
        }
    },

    "quit":
    {
        "text" : "menu.quit",
        "posX" : 2,
        "posY" : 132,
        "width" : 98,
        "height" : 20,
        "action" : 
        {
            "type" : "quit"
        }
    },

    "language":
    {
        "text" : "",
        "posX" : -124,
        "posY" : 132,
        "width" : 20,
        "height" : 20,
        "action" : 
        {
            "type" : "openGui",
            "gui" : "languages"
        }
    },

    "refresh":
    {
        "text" : "",
        "posX" : -154,
        "posY" : 132,
        "width" : 20,
        "height" : 20,
        "texture" : "custommainmenu:textures/gui/buttons.png",
        "action" : 
        {
            "type" : "refresh"
        }
    }
},

"labels":
{
    "mojang":
    {
        "text" : "Copyright Mojang AB. Do not distribute!",
        "posX" : -197,
        "posY" : -10,
        "color" : -1,
        "alignment" : "bottom_right"
    },

    "fml":
    {
        "text" : "",
        "posX" : 2,
        "posY" : -40,
        "color" : -1,
        "alignment" : "bottom_left"
    }
},

"other":
{
    "splash-text":
    {
        "posX" : 90,
        "posY" : 70,
        "color" : -256,
        "alignment" : "top_center",
        "texts" : "file:minecraft:texts/splashes.txt"
    },

    "panorama":
    {
        "images" : "minecraft:textures/gui/title/background/panorama_%c.png",
        "animate" : true,
        "animationSpeed" : 1,
        "blur" : true,
        "gradient" : true
    }
}

} Here's a screenshot as well missing texture

InterPlay02 commented 6 years ago

Instead of "resources:modpacks:background.png", use "modpack:background.png".

Creeperdude2409 commented 6 years ago

@InterPlay02 It still is doing the same missing texture thing

DrN0xx commented 6 years ago

Just opened another issue ( #249 ), maybe a dupe of this one as I didn't notice you were running 1.10.2 until after I typed it all up above.

georgkozy commented 4 years ago

try restarting the game and. check if you got all the brackets inplace

Hallohannes123 commented 4 years ago

im a bit late but you need to do <"image" : "resources:modpacks/background.png",> so a / instead of a second : Hopefully Im able to help you!

TheLugga commented 1 year ago

Hey! I know this is probably no longer relevant for you after 5 years, hower I found a solution as I encountert the same problem when designing a modpack. I'm leaving this here so modders in the future may not go through the suffering i went through.

Basically what you wanna do is: fuck those old tutorials. Looking into other modpacks config data and comparing it with yours helps! My first lines of code look like this:

{ "images": { "title": { "image" : "mainmenu/title.png", "posX" : -137, "posY" : 30, "width" : 512, "height" : 512, "alignment" : "top_center"

What i've done is: I created one folder inside the resource folder called "mainmenu". In that folder is the picture i'd like to use. So far nothing special. The picture I want to use is called "title". If you observe my code u notice that I put the folder "mainmenu" (the first folder inside your resource folder) behind the colon. After that you continue with the usual path. You seperate the path with slashes.

In the case of the original problem on this thread the code should look something like this:

{ "images": { "title": { "image" : "modpacks:background.png", "posX" : -137, "posY" : 30, "width" : 512, "height" : 512, "alignment" : "top_center"

One last thing: I recomend using a resource loader for the custommainmenu mod.