ModBlocks.java 文件源码

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

项目:Tutorial-1.11 作者:
/**
 * The client-side initializer. Here we handle model registration. Don't forget the @SideOnly annotation! This should
 * be called during init.
 */
@SideOnly(Side.CLIENT)
public static void initClient(ItemModelMesher mesher) {

  // We can only register models for Items, so get the item for the block. Maybe you could save a reference to the
  // ItemBlock in init? I haven't tried it, but we likely wouldn't use it anywhere else, so it's not worth doing.
  Item item = Item.getItemFromBlock(tutorialBlock);
  // Everything past this point is identical to registering models for items.
  ModelResourceLocation model = new ModelResourceLocation(
      Tutorial.RESOURCE_PREFIX + Names.TUTORIAL_BLOCK, "inventory");
  ModelLoader.registerItemVariants(item, model);
  mesher.register(item, 0, model);
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号