MultiLayerModel.java 文件源码

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

项目:CustomWorldGen 作者:
@Override
public MultiLayerModel process(ImmutableMap<String, String> customData)
{
    ImmutableMap.Builder<Optional<BlockRenderLayer>, ModelResourceLocation> builder = ImmutableMap.builder();
    for(String key : customData.keySet())
    {
        if("base".equals(key))
        {
            builder.put(Optional.<BlockRenderLayer>absent(), getLocation(customData.get(key)));
        }
        for(BlockRenderLayer layer : BlockRenderLayer.values())
        {
            if(layer.toString().equals(key))
            {
                builder.put(Optional.of(layer), getLocation(customData.get(key)));
            }
        }
    }
    ImmutableMap<Optional<BlockRenderLayer>, ModelResourceLocation> models = builder.build();
    if(models.isEmpty()) return INSTANCE;
    return new MultiLayerModel(models);
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号