Posted July 28, 20223 yr So this is kind of odd, but I'm trying to make a mod a 256x256 image is downloaded and set to the texture of an item. It doesn't need to be updated during the game, but on launch. I have it downloading the image and putting it in the game directory (a PNG) and then importing it into the game as a NativeImage, but I'm having trouble getting from the NativeImage to the texture on the item itself. Edited July 28, 20223 yr by ZachT112
August 2, 20223 yr Author I'm trying to get the texture stitched into the block atlas. I feel like it should be relatively simple but I've been trying to use the TextureStitchEvent.Pre to somehow figure out how to register the sprite to be stitched into the atlas, but the only method is addSprite, which tells the atlas that there is a model file somewhere, it doesn't take a texture.
August 3, 20223 yr The method #addSprite requies a ResourceLocation, and the ResourceLocation should contains your mod id (namspace) and the path to the texture. You should be able to do this.
August 3, 20223 yr Author 7 hours ago, Luis_ST said: The method #addSprite requies a ResourceLocation, and the ResourceLocation should contains your mod id (namspace) and the path to the texture. I've tried #addSprite, but that tries to pull a png file from the assets folder. I have a native image that I am trying to use, not a file within the assets folder. The texture is generated at runtime, and therefore is not in the assets folder.
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.