ExPStateMappers.java 文件源码

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

项目:ExPetrum 作者:
@Override
protected ModelResourceLocation getModelResourceLocation(IBlockState state)
{
    switch (state.getValue(ExPBlockProperties.SHRUBBERY_TYPE))
    {
        case TROPICAL:
        {
            return new ModelResourceLocation("exp:tropical_shrubbery", String.format("color=%s,leaf=%d", state.getValue(BlockGenericShrubbery.BLOOM_COLOR).getName(), state.getValue(BlockGenericShrubbery.TROPIC_PLANT_LEAF)));
        }

        case FLOWER:
        {
            return new ModelResourceLocation("exp:flower_shrubbery", String.format("color=%s", state.getValue(BlockGenericShrubbery.BLOOM_COLOR).getName()));
        }

        case SMALL_SHRUB:
        {
            return new ModelResourceLocation("exp:small_shrubbery", String.format("color=%s", state.getValue(BlockGenericShrubbery.BLOOM_COLOR).getName()));
        }

        case MUSHROOM:
        {
            return new ModelResourceLocation("exp:mushroom_shrubbery", String.format("color=%s", state.getValue(BlockGenericShrubbery.BLOOM_COLOR).getName()));
        }

        default:
        {
            return new ModelResourceLocation(b.getRegistryName(), "normal");
        }
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号