BaseBlock.java 文件源码

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

项目:Firma 作者:
public void registerRender() {
    int i = 0;
    Item item = Item.getItemFromBlock(this);
    ResourceLocation[] list = new ResourceLocation[getVariantNames().size()];
    for (String s : getVariantNames()) {

        String loc = this.getRegistryName().toString();// +"#variants="+s;
        ResourceLocation res = new ResourceLocation(loc);
        ModelResourceLocation mrl = new ModelResourceLocation(loc, "variants=" + s);
        ModelLoader.setCustomModelResourceLocation(item, i, mrl);
        list[i] = res;
        i++;
    }
    ModelBakery.registerItemVariants(Item.getItemFromBlock(this), list);
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号