java minecraftmodexample.example000_009.e000_basic_block.InitCommon.java

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了java minecraftmodexample.example000_009.e000_basic_block.InitCommon.java相关的知识,希望对你有一定的参考价值。

package net.nyagosu.minecraftmodexample.example000_009.e000_basic_block;

import net.minecraft.item.ItemBlock;
import net.minecraftforge.fml.common.registry.GameRegistry;

public class InitCommon {

	public static BlockBasicBlock blockBasicBlock;
	public static ItemBlock itemBlockBasicBlock;

	public static void preInitCommon()
	{
		//ブロックのインスタンスの生成。
		blockBasicBlock = (BlockBasicBlock)(new BlockBasicBlock().setUnlocalizedName("e000_basic_block"));
		blockBasicBlock.setRegistryName("e000_basic_block");
		GameRegistry.register(blockBasicBlock);
		
		//ブロックをアイテムとして登録。
		itemBlockBasicBlock = new ItemBlock(blockBasicBlock);
		itemBlockBasicBlock.setRegistryName(blockBasicBlock.getRegistryName());
		GameRegistry.register(itemBlockBasicBlock);
	}

	public static void initCommon()
	{

	}

	public static void postInitCommon()
	{

	}
}

以上是关于java minecraftmodexample.example000_009.e000_basic_block.InitCommon.java的主要内容,如果未能解决你的问题,请参考以下文章

java minecraftmodexample.example000_009.e004_damage_block.BlockDamageBlock.java

java minecraftmodexample.example000_009.e000_basic_block.InitClient.java

java minecraftmodexample.example000_009.e000_basic_block.InitCommon.java

java minecraftmodexample.example000_009.e000_basic_block.BlockBasicBlock.java

java net.nyagosu.minecraftmodexample.example000-009.e003_fragile_block.BlockFragileBlock.java

java net.nyagosu.minecraftmodexample.example000-009.e001_hardest_block.BlockGlowBlock.java