Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

  • Author

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.

  • Author

I appreciate your help, however some companion mods for the mod that I am writing aren't being updated to 1.8 and there's not much I can do about that.

As for how big I want the rectangle to be, I'd like it to fill the screen (it's at 16:9 aspect ratio).

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/

  • Author

Okay, let me see if I understand.

I should make a texture that is a power of two (as you stated), with the desired aspect ratio of 16:9, and then use u and v to only draw the picture as a 16:9 picture?

  • Author

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?

  • Author

So, I fixed that problem (however it is still tiled). What was happening was it would update the frame, add 1 to the frame number until it reached the frame cap, and then redraw the screen.

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.

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.