java类net.minecraft.client.renderer.texture.IIconCreator的实例源码

ModelBakery.java 文件源码 项目:DecompiledMinecraft 阅读 18 收藏 0 点赞 0 评论 0
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());
}
ModelBakery.java 文件源码 项目:BaseClient 阅读 19 收藏 0 点赞 0 评论 0
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());
}
ModelBakery.java 文件源码 项目:BaseClient 阅读 19 收藏 0 点赞 0 评论 0
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());
}
ClientProxy.java 文件源码 项目:wig 阅读 21 收藏 0 点赞 0 评论 0
@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);
}


问题


面经


文章

微信
公众号

扫码关注公众号