Posted November 2, 20195 yr 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?
November 2, 20195 yr 6 minutes ago, andGarrett said: but I don't know how. something like Let's take a step back what exactly are you trying to do. End user perspective thing. VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
November 2, 20195 yr Author 1 minute ago, Animefan8888 said: Let's take a step back what exactly are you trying to do. End user perspective thing. 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"?
November 2, 20195 yr 36 minutes ago, andGarrett said: instead of using itemstacks, I am instead creating my own custom buttons Since both blocks and therefore item blocks have 3D models and items can also be 3D; it would make more since for your buttons to hold an ItemStack and then render the ItemStack on top of the button. VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
November 2, 20195 yr Author 49 minutes ago, diesieben07 said: Why do you not want to use the ItemStack? 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.
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.