Jump to content

ADonkeyTaboggan

Members
  • Posts

    10
  • Joined

  • Last visited

Everything posted by ADonkeyTaboggan

  1. So I am trying to make something that exports all of the item and blocks textures by looping through GameData.getItemRegistery and GameData.getBlockRegistery. However I have two questions about how I would do this: How would I get from a resource location to a File object? Could I export a block textures as how they are rendered in game? Thanks.
  2. Oh whoops, I read his reply incorrectly. However it does sound like a great idea for rendering to all itemstacks easily. Also using GlStateManager.translate solved my problem with the text rendering.. Thanks everyone for their input.
  3. I can't seem to find a reference to this event?
  4. Thanks both of you for your help. I have briefly looked into ASM and I feel it's a little overkill for what I'm trying to achieve (Also past my Java knowledge) I decided to implement the feature on the GameOverlay: http://i.imgur.com/AduYrDh.png and it works great but with one problem. The text renders behind the items (You probably noticed that though). is there a way in the RenderGameOverlay to specify zIndex? And again, thanks for everybodys help. It will be really helpful in future if I want to implement something that requires ASM.
  5. Thanks for the detailed reply! So to sum up what I'm trying to do: I want to render the remaining durability "on top" of every item that the player has that has durability. I think making this work on EVERY gui is a little overkill for a small tweak (visually anyway) that this is, so I would probably be happy for it just to render when the player is looking at their own inventory. So the two situations would be: 1: Looking in your own inventory (not even player inventories attached to other guis). 2: Rendering the damage of items on the hotbar in the GameOverlay. For situation 2, I pretty much know how to achieve that, would handling situation 1 be the same as your 3rd method? Again, thanks for the time. Edit: Wording
  6. Hi there, Is it possible to render text on item textures like this: http://i.imgur.com/Y0k4yEN.png (made in paint.net). Would this just be the case of using RenderGameOverlay and scaling down the text and making the pos the current hotbar slot? or is there a better way. Thanks for your time. Edit: I'm pretty sure RenderGameOverlay won't work because if I opened my inventory, that guiscreen(I think thats what it is anyway) would be a "higher" "layer". I would also like to draw text on items in my main inventory (Not just hotbar). My guess/assumption is it could be done by overlaying text on the item texture? not sure though. Again, thanks if anyone checked out the thread.
  7. Thanks @Draco18s & @diesieben07! The fixed my issues. I didn't even know there were pre and post events, so I'm sure that will also help me in the future. However, that's a sign I need to do more reading! =p
  8. Now you see this is why I couldn't wrap my head around this issue. The result of your code has the experience bar stay in it's default position. I did try doing exactly what you suggested before, and I got the same result. I guess it's resetting the position when we popMatrix?
  9. So first off I should of clarified that my custom gui elements are not there so I don't add more confusion. The Experience bar is doing exactly as expected, and so is the rest of the HUD elements (Not hot bar is directly on the bottom of my game window) but the problem is it seems ALL other gui elements are also shifted upwards. I demonstrate that in the image from the fact I am apparently hovering over a slot when the gui is being shown above it. Edit: derp my mouse isnt in the screenshot... well take my word for it I guess
  10. So I'm drawing images to the hud using RenderGameOverlay. I want to shift around the normal gui to get better placement with my new additions, thus I am attempting to translate the vanilla gui based on what Element type the event is on. Problem is I can't seem to change the position of the experience bar without changing every element even though I'm checking if the ElementType is Experience. I tried to use push and pop matrix but that didn't seem to help things. Code: public void renderGameOverlay(RenderGameOverlayEvent event) { if(event.type == ElementType.EXPERIENCE) { GL11.glTranslatef(0.0F, (float)(-7), 0.0F); } else { GL11.glTranslatef(0.0F, (float)(0), 0.0F); } } Result: http://i.imgur.com/MyVDs66.png I'm probably not quite understanding something simple tbh =p
×
×
  • Create New...

Important Information

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