Created
January 18, 2014 06:35
-
-
Save ZornTaov/8487043 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@EventHandler | |
public void init(FMLPreInitializationEvent event) | |
{ | |
registerBlock(new BlockExample().func_149663_c("ExampleBlock").func_149647_a(CreativeTabs.tabBlock)); | |
registerItem(new Item().setUnlocalizedName("ExampleItem").setCreativeTab(CreativeTabs.tabMisc)); | |
} | |
public static void registerItem(Item item) | |
{ | |
GameRegistry.registerItem(item, item.getUnlocalizedName().replace("item.", "")); | |
//register name, this apperently does not work 3: | |
//LanguageRegistry.instance().addStringLocalization(item.getUnlocalizedName() + ".name", "en_US", item.getUnlocalizedName().replace("item.", "")); | |
} | |
public static void registerBlock(Block block) | |
{ | |
//TODO: getUnlocalizedName() | |
GameRegistry.registerBlock(block, block.func_149739_a().replace("tile.", "")); | |
//register name, this apperently does not work 3: | |
//LanguageRegistry.instance().addStringLocalization(block.func_149739_a() + ".name", "en_US", block.func_149739_a().replace("tile.", "")); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment