Created
August 6, 2018 18:53
-
-
Save ThomasAunvik/7ea2f880de4c7e416b108e19039e441c to your computer and use it in GitHub Desktop.
This file contains hidden or 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 class RegisterHandler { | |
@SubscribeEvent | |
public void RegisterItems(RegistryEvent.Register<Item> event) { | |
for(int itemIndex = 0; itemIndex < ModItems.items.size(); itemIndex++){ | |
Item item = ModItems.items.get(itemIndex); | |
event.getRegistry().register(item); | |
ModLogger.LogInfo("Item Registered: " + item.getUnlocalizedName()); | |
} | |
} | |
} | |
@Mod.EventHandler | |
public void preInit(FMLPreInitializationEvent event) | |
{ | |
ModLogger.InitializeLogger(event); | |
MinecraftForge.EVENT_BUS.register(RegisterHandler.class); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment