Posted January 29, 20214 yr Hey, I've been trying to make a bar for my tileEntity, which shows the energy storage percentage. I have seen that the Vanilla screens are using the blit() function to do this. Can someone explain me what exactly it does and what parameters i need. Thank you!
January 30, 20214 yr There are a couple, but the most used one in screens is the none static one that takes matrixstack, xpos, ypos, upos, vpos, uwidth, vheight. E.g. blit(stack, 10, 10, 1, 1, 15, 15) This will draw texture at (10, 10) on the screen with the texture position at (1, 1) to (16, 16), note that this one only accepts texture size of 256*256. Before drawing you need to bind the texture using TextureManager.bindTexture, the instance of the manager can be obtained from Minecraft.
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.