CJMinecraft

Registering Blocks, Items and Models

Jun 25th, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. @Mod.EventBusSubscriber
  2. public class Registerer {
  3.  
  4. @SubscribeEvent
  5. public static void onItemRegister(RegistryEvent.Register<Item> event) {
  6. event.getRegistry().register(ITEM); // Repeat this for every item
  7. }
  8.  
  9. @SubscribeEvent
  10. public static void onBlockRegister(RegistryEvent.Register<Block> event) {
  11. event.getRegistry().register(BLOCK); // Repeat this for every block
  12. }
  13.  
  14. @SubscribeEvent
  15. public static void onModelRegister(ModelRegistryEvent event) {
  16. // Register your models like you would normally
  17. }
  18.  
  19. }
Advertisement
Add Comment
Please, Sign In to add comment