Jump to content
Search In
  • More options...
Find results that contain...
Find results in...


  • Posts

  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

andGarrett's Achievements

Creeper Killer

Creeper Killer (4/8)



  1. so, hypothetically, something like ForgeRegistries.ITEMS.getValue(new ResourceLocation("minecraft:polished_diorite")); done a hundred times isn't a problem? actually, now that I've gone through the code again, it isn't all that much.
  2. I would have to do it a LOT given my current code.
  3. lol, the "key" in "ForgeRegistries.ITEMS.getValue(key)" is the ResourceLocation I mentioned here: unfortunately for me, I didn't write my code in such a way as to work well with converting the registry names into resource locations. I would have to create new ResourceLocations too often to be considered efficient. I may need to rethink some of my code.
  4. how? I tried "ForgeRegistries.ITEMS", but I can't find a way to get an item by it's registry name. It's possible to get an item by it's resource location, but I would much rather get it by registry name as I have a lot of code already written using the registry names.
  5. slot.putStack(new ItemStack(???); I'm trying to create an ItemStack using itemRegistryNames. I want to use a list of itemRegistryNames to fill 12 inventory slots. I know how to set a slot to empty "slot.putStack(ItemStack.EMPTY);", but not how to actually create an itemStack to put in the slots. Please help.
  6. it's more complicated using itemstacks, and I prefer to write my own code for things when possible. oh well, guess I'll be doing a rewrite.
  7. I have a store block that has a screen for buying items. it will have a randomized list of items for sale. instead of using itemstacks, I am instead creating my own custom buttons that will have an image of whatever item is being sold in that slot. when clicked on, the button will spawn a popup that will allow the player to buy some of the item in question. to accomplish this, I'm creating a static list of all the resource locations for the item and block images. This can then be referenced instead of creating a new resource location each time the image is drawn like:minecraft.getTextureManager().bindTexture(new ResourceLocation("textures/item/gold_ingot.png"));. Is this what you meant by "End user perspective thing"?
  8. I need to create a static arraylist of all the resource locations of item and block images, but I don't know how. something like: for (String item: assets.minecraft.textures.item) { recourceList.add(new ResourceLocation(item)); } for (String block: assets.minecraft.textures.block) { recourceList.add(new ResourceLocation(block)); } clearly this is incorrect and wouldn't work. how might I do this correctly?
  9. here's a version of blit that makes the most sense to me and works perfectly for what I'm doing: blit( int xPos, // x position relative to the screen image below it (not the entire screen). int yPos, // y position relative to the screen image below it (not the entire screen). int blitOffset, // z position (blitOffSet) float textureX, // x position on the texture image to draw from float textureY, // y position on the texture image to draw from int imgSizeX, // x image size to display (like crop in PS) int imgSizeY, // y image size to display (like crop in PS) int scaleY, // y image size (will scale image to fit) int scalex) // x image size (will scale image to fit) it's still a little confusing to use the first time. if you have something like: blit(10, 10, 10, 0F, 0F, 64, 64, 64, 64); you will end up with an image that is 64x64 that contains the entire image scaled to fit 64x64 of you do something like: blit(10, 10, 10, 0F, 0F, 64, 64, 32, 32); you get an image that is 64x64 but that contains 4 copies of your image in a 2x2 grid that are all 32x32.
  10. this is currently for testing purposes. once I get things working would this not be acceptable for something that would change? would I need to create a non-static field to store the changing data? you mentioned other versions of blit in another post of mine, but I have been unable to figure out how they work.
  11. is there a way to scale with blit, or do I need to use something else? here's what I'm trying to scale: minecraft.getTextureManager().bindTexture(new ResourceLocation("textures/item/gold_ingot.png")); blit(10, 10, 0, 0, 256, 256); [SOLUTION]
  12. Thanks, I decided to write an inner class that does what you described in your first reply. I figured out a few things that make it much easier than I had originally thought.
  13. can there only be one active "screen" at any given time?
  14. I created my own popup window class that extends "Screen", but it seems to replace the original screen that spawns it. is it possible to have the popup on top of the original screen? I could do what you said about just drawing the popup over the main screen, but then I would have to find a way to disable all mouse click events on the main screen, and that seems tedious.
  15. I'm thinking about adding a popup window in one of my container screens. would I need to have a screen within a screen, and if so how?
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.