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.

starwarsmace

Members
  • Joined

  • Last visited

Everything posted by starwarsmace

  1. First of all, you have to register stuff in the pre-init. Though that shouldn't totally affect it...
  2. What happens when you run your code? Does it crash? If so, give the crash report. If it doesnt crash, say what happens.
  3. Well I need it to fade slowly. So Im not sure if I have an alpha layer, will let me fade it away, unless I can find a GL function for it.
  4. So I need to make an image that fades away. I know how to do it with strings by changing the alpha in the hex number. Would I use the OpenGl's color4f function, to make it more transparent? Or is there an easier way, or would that not work.
  5. Or you can code it yourself. In the long run, it turns out better, even though at first, they look a bit off and stuff. You do learn quickly though. Just a pain in the neck a first, when you have to first keep on launching minecraft over and over again just to see how your model looks like, but I think it is better than using a software.
  6. *facepalm* That was an idiotic mistake. Ill try that.
  7. Is updateScreen able to draw? For some reason its not letting me draw my stuff on the updateScreen.
  8. Oh. That isnt what I want.I actually want it at like 10 fps. I could just check whether 12 frames have passed then run my frame, until the end. Would that be right? A tick is already at 20 fps, so like diesieben07 says you should use the tick method for consistency. You can check if 2 ticks have passed if you need 10fps. The frame rate is configurable and will depend on device and user settings, so you don't want to depend on that for timing. Oh, alright Ill try that.
  9. Oh. That isnt what I want.I actually want it at like 10 fps. I could just check whether 12 frames have passed then run my frame, until the end. Would that be right?
  10. Thank you and frames is what I want I think for animations. And Ill check out EnumChatFormatting.
  11. Hello guys. So Im making an animation for a gui and Im going to be changing the background every tick or so. Does drawscreen get called every tick? Also, kindve related question. How do you have text formating, like underlining. In the font renderer class it says, " Set if the "n" style (underlined)is active in currently rendering string." Where would I put the "n"?
  12. No its fine. I completely understand. I am patiently waiting!
  13. So I need to see which slot a mouse clicked in the inventory. So what I tried was getting the slot display x or y and comparing it to the mouse x or y. I thought it would work but the numbers were really random. And I couldnt find a good way to check. So is there some function that I can call in guiInventory to get whether a slot was clicked? Also, Im checking whether it is a middle click.
  14. It appears to me that the Slot.displayX(or y) is offsetted. For example, the first slot on the screen is around 240 pixels on the x. But the slot.displayX is saying the x is on 8, when 8 is all the way at the edge. It looks like to me it is offeseted. Does it start at the left side of the players inventory? And does the y start at the top of the inventory? If so, is there some equation that I can use to get the offset, since I know that the pixel lengths change when the gui size changes or its fullscreen or not.
  15. I am making a mod for a server and I do MinecraftServer.getServer.getFile("models/sword.obj"). Is it possible to turn that into a resource location, so I can use it for my renderer.
  16. Oh. Stupid me. Thanks for the help though.
  17. For some reason MouseInputEvent didnt call. It might be because Im not registering it on the right bus. It has no javadocs, so I was wondering whether any of you know. Also, im currently registering it on MinecraftForge.EVENT_BUS
  18. I should probably make a new thread for this but oh well. This is an open gl questions really. https://www.opengl.org/discussion_boards/showthread.php/185705-How-do-I-use-smoothing-groups-from-obj-files?p=1264468#post1264468 To summarize what I asked in that thread, how would I smooth a .obj model using the smoothiing groups?
  19. Sorry about not telling you guys. I figured it out. I just used the GUIOPEN event, though diesieben's method is much better. Anyway, now I have another question is there a good and efficient way to see which slot the player clicked? Edit: By the way, it has to be the middle click. And is using the lwjgl Mouse class x and y and then compare it to the x and y to all the slots in the inventory and see which was the closest a good idea?
  20. I looked through many of the players functions. But I cant find anything that tells you whether the inventory is open or not. How would I do this?
  21. Hmmm.. That might work. Ill try it out.
  22. Yeah. I want to draw a .png onto a GuiScreen.

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.