ShareText.Cn

Untitled
  1. package top.seraphjack.fastview;
  2.  
  3. import net.minecraft.item.Item;
  4. import net.minecraftforge.event.RegistryEvent;
  5. import net.minecraftforge.fml.common.FMLCommonHandler;
  6. import net.minecraftforge.fml.common.Mod;
  7. import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
  8. import net.minecraftforge.fml.relauncher.Side;
  9.  
  10. @Mod(modid = "fastview", acceptableRemoteVersions = "*")
  11. @Mod.EventBusSubscriber(modid = "fastview")
  12. public class FastView {
  13.     @SubscribeEvent
  14.     public static void onItemRegistry(RegistryEvent.Register<Item> event) {
  15.         if (FMLCommonHandler.instance().getSide() == Side.SERVER) {
  16.             event.getRegistry().register(
  17.                     new Item().setRegistryName("fastview", "random_item")
  18.             );
  19.         }
  20.     }
  21. }
  22.  
Parsed in 0.028 seconds