Jump to content

GUI Texture is Tiled when Stretched is Desired


theMusicalGamer

Recommended Posts

So, now I understand what u and v are.

I've changed to using the func_146110_a function because I read somewhere of a function called "drawTexturedModalRectWithCustomTextureSize". Obviously, that's not a valid function name, but I found the actual function.

Not getting a tiled texture anymore. I've been playing around with the settings, but now it goes off the screen, or shows other things that aren't what is desired (just the one texture). I've updated the github repo with this new code.

Link to comment
Share on other sites

You have to make sure youre texture size is a power of 2 (16x16, 32x32 ... 128x128, 256x256). In there you can create an image with an aspect ratio of 16:9, and than only draw that part from the texture, using the u,v coordinates.

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

Link to comment
Share on other sites

So, I tried that, and if you check my code (https://github.com/theMusicalGamer/skywardSwordMod.git), I have the "frame" variable print out whenever it draws the screen. For some reason, if you check my logs (which I'll post to the issue on my GitHub repository that I'm creating for this), it will jump from 0 to 164, which is what the frameCap is set for. Any reasons why it would do this?

Link to comment
Share on other sites

Any reasons why it would do this?

 

So glad you fixed that problem on you own so I didn't have to call you an idiot.

 

As for the tiling:

 

Your texture is smaller than the screen.  In order to stretch it, you need to draw the exact size that fits on the texture to a much larger area.  Minecraft's GUI system is set up to draw 1 texture pixel to 2 screen pixels (at default GUI scaling).  You might want to take a look at

drawTexturedModalRect

.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.