private void loadSprites() { final Set<ResourceLocation> set = this.getVariantsTextureLocations(); set.addAll(this.getItemsTextureLocations()); set.remove(TextureMap.LOCATION_MISSING_TEXTURE); IIconCreator iiconcreator = new IIconCreator() { public void registerSprites(TextureMap iconRegistry) { for (ResourceLocation resourcelocation : set) { TextureAtlasSprite textureatlassprite = iconRegistry.registerSprite(resourcelocation); ModelBakery.this.sprites.put(resourcelocation, textureatlassprite); } } }; this.textureMap.loadSprites(this.resourceManager, iiconcreator); this.sprites.put(new ResourceLocation("missingno"), this.textureMap.getMissingSprite()); }
@Override public void initTexAtlas() { Minecraft mc = Minecraft.getMinecraft(); toolTexAtlas = new TextureMap("textures/tools", new IIconCreator() { public void registerSprites(TextureMap map) { for (ToolPage page : WigMod.Pages) { for (Tool tool : page) { tool.registerIcons(map, false); } } for (ToolPage page : WigMod.Pages) { for (Tool tool : page) { tool.registerIcons(map, true); } } } }, false); toolTexAtlas.setMipmapLevels(mc.gameSettings.mipmapLevels); mc.renderEngine.loadTickableTexture(WigMod.ToolAtlas, toolTexAtlas); toolTexAtlas.setBlurMipmapDirect(true, mc.gameSettings.mipmapLevels > 0); }