WoodType.java 文件源码

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

项目:Alchemy 作者:
@Nullable
@SideOnly(Side.CLIENT)
public static String getTexture(ModelBlock modelBlock) {
    if (modelBlock == null)
        return null;
    if (modelBlock.textures == null)
        return getTexture(modelBlock.parent);
    String texture = modelBlock.textures.get("all");
    if (texture != null)
        return texture;
    texture = modelBlock.textures.get("side");
    if (texture != null)
        return texture;
    texture = modelBlock.textures.get("particle");
    if (texture != null)
        return texture;
    for (Entry<String, String> entry : modelBlock.textures.entrySet())
        if (!entry.getKey().equals("end") && !entry.getValue().contains("_top") && !entry.getValue().contains("top_"))
            return entry.getValue();
    return getTexture(modelBlock.parent);
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号