Created
September 19, 2017 05:01
-
-
Save Dockter/a3de1023a6ba281f5095ce6500642541 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
public <ITEM extends Item> ITEM addItem(ITEM item, String name) { | |
String qualName = assetKey + ":" + name; | |
item.setUnlocalizedName(qualName); | |
item.setRegistryName(assetKey, name); | |
ForgeRegistries.ITEMS.register(item); | |
System.out.printf("BaseMod.addItem: Registered %s as %s\n", item, name); | |
if (debugBlockRegistration) | |
if (creativeTab != null) { | |
if (debugCreativeTabs) | |
System.out.printf("BaseMod.addItem: Setting creativeTab of %s to %s\n", name, creativeTab); | |
item.setCreativeTab(creativeTab); | |
} | |
registeredItems.add(item); | |
return item; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment