ModelBakery.java 文件源码

java
阅读 22 收藏 0 点赞 0 评论 0

项目:BaseClient 作者:
private Set<ResourceLocation> getVariantsTextureLocations()
{
    Set<ResourceLocation> set = Sets.<ResourceLocation>newHashSet();
    List<ModelResourceLocation> list = Lists.newArrayList(this.variants.keySet());
    Collections.sort(list, new Comparator<ModelResourceLocation>()
    {
        public int compare(ModelResourceLocation p_compare_1_, ModelResourceLocation p_compare_2_)
        {
            return p_compare_1_.toString().compareTo(p_compare_2_.toString());
        }
    });

    for (ModelResourceLocation modelresourcelocation : list)
    {
        ModelBlockDefinition.Variants modelblockdefinition$variants = (ModelBlockDefinition.Variants)this.variants.get(modelresourcelocation);

        for (ModelBlockDefinition.Variant modelblockdefinition$variant : modelblockdefinition$variants.getVariants())
        {
            ModelBlock modelblock = (ModelBlock)this.models.get(modelblockdefinition$variant.getModelLocation());

            if (modelblock == null)
            {
                LOGGER.warn("Missing model for: " + modelresourcelocation);
            }
            else
            {
                set.addAll(this.getTextureLocations(modelblock));
            }
        }
    }

    set.addAll(LOCATIONS_BUILTIN_TEXTURES);
    return set;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号