Posted January 12, 201411 yr Hey everyone, I am having trouble while creating a new ResourceLocation using a 64x32 file and then rendering that into a Gui. As far as I am aware, a Gui can only use 256x256 ResourceLocation objects, otherwise your whole Gui could possibly get messed up, and nobody wants that. So my question is, what is the equivalent to a ResourceLocation for non 256x256 files, and why is a Gui not capable of rendering smaller? I know it's probably extremely simple, but thanks in advance, Dr E. Follow me on twitter! @keepablock Read up on whats new! www.catacombs.co http://electronic-chronic.com/assets/keep-a-block/wikilink/wikilink_logo.png[/img]
January 12, 201411 yr You can just use the 256x256 texture and past the GUI into the center. Anything not filled in is transparent in GUI's.
January 12, 201411 yr Author The means of acquiring the texture doesn't allow me to do this. I'm rendering parts of player skins into the GUI, and their files are 64x32. Follow me on twitter! @keepablock Read up on whats new! www.catacombs.co http://electronic-chronic.com/assets/keep-a-block/wikilink/wikilink_logo.png[/img]
January 12, 201411 yr You could overlay the texture onto the GUI. I'm not sure how that would work, but you could render the player skins into the foreground of your GUI, in the drawGuiContainerForeground method, and have the background be just an empty 256 x 256 texture.
January 12, 201411 yr Take a look at the code for the player inventory GUI; the player model is rendered (skin and all) is rendered within the larger gui screen. http://i.imgur.com/NdrFdld.png[/img]
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.