@SideOnly(Side.CLIENT)
@Override
public void initModel() {
Block block = FluidsRegistry.block_exp;
Item item = Item.getItemFromBlock(block);
ModelBakery.registerItemVariants(item);
final ModelResourceLocation modelResourceLocation = new ModelResourceLocation(Const.MODID + ":fluid", stack.getFluid().getName());
ModelLoader.setCustomModelResourceLocation(item, 0, modelResourceLocation);
ModelLoader.setCustomStateMapper(block, new StateMapperBase() {
@Override
protected ModelResourceLocation getModelResourceLocation(IBlockState bs) {
return modelResourceLocation;
}
});
}
BlockFluidExp.java 文件源码
java
阅读 25
收藏 0
点赞 0
评论 0
项目:Cyclic
作者:
评论列表
文章目录