Posted November 27, 20222 yr Hi there, Is there a way I can get texture atlases ResourceLocation in Minecraft 1.18.2 forge? Or something like it, because on startup game log has these lines: [15:15:23] [Render thread/INFO] [minecraft/TextureAtlas]: Created: 4096x2048x4 minecraft:textures/atlas/blocks.png-atlas [15:15:23] [Render thread/INFO] [minecraft/TextureAtlas]: Created: 512x256x4 minecraft:textures/atlas/signs.png-atlas [15:15:23] [Render thread/INFO] [minecraft/TextureAtlas]: Created: 1024x1024x4 minecraft:textures/atlas/banner_patterns.png-atlas [15:15:23] [Render thread/INFO] [minecraft/TextureAtlas]: Created: 1024x1024x4 minecraft:textures/atlas/shield_patterns.png-atlas [15:15:23] [Render thread/INFO] [minecraft/TextureAtlas]: Created: 512x512x4 minecraft:textures/atlas/chest.png-atlas [15:15:23] [Render thread/INFO] [minecraft/TextureAtlas]: Created: 1024x512x4 minecraft:textures/atlas/beds.png-atlas [15:15:23] [Render thread/INFO] [minecraft/TextureAtlas]: Created: 1024x512x4 minecraft:textures/atlas/shulker_boxes.png-atlas [15:15:30] [Render thread/INFO] [minecraft/TextureAtlas]: Created: 1024x1024x0 minecraft:textures/atlas/particles.png-atlas [15:15:30] [Render thread/INFO] [minecraft/TextureAtlas]: Created: 1024x1024x0 minecraft:textures/atlas/paintings.png-atlas [15:15:30] [Render thread/INFO] [minecraft/TextureAtlas]: Created: 256x256x0 minecraft:textures/atlas/mob_effects.png-atlas This means somewhere there is ResourceLocation that holds these files. I can get, for example, minecraft:textures/atlas/blocks.png-atlas via this code TextureManager textureManager = Minecraft.getInstance().getTextureManager(); TextureAtlas textureAtlas = (TextureAtlas) textureManager.getTexture(new ResourceLocation("textures/atlas/blocks.png")); but what if, for example, some mod has added new atlas? I want to get whole list of those, via something like this Collection<ResourceLocation> resourceLocations = Minecraft.getInstance().getResourceManager().listResources( "textures/atlas", res -> res.chars().noneMatch(i -> Character.isLetter(i) && Character.isUpperCase(i))); but this approach sadly is not working. Edited November 29, 20222 yr by Sireous
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.