@SubscribeEvent public static void onCreateRegistry(NewRegistry event) { new RegistryBuilder<ICustomParticleFactory>() .setType(ICustomParticleFactory.class) .setName(new ResourceLocation(CommonReference.MOD_ID, "custom_particles")) .create(); }
@SubscribeEvent @SideOnly(Side.CLIENT) public static void createRegistries(RegistryEvent.NewRegistry event) { RegistryBuilder builder = new RegistryBuilder<CSReadedModel>(); builder.setName(new ResourceLocation(CraftStudioApi.API_ID, "cs_models")); builder.setType(CSReadedModel.class); builder.setIDRange(0, 4096); builder.create(); builder = new RegistryBuilder<CSReadedAnim>(); builder.setName(new ResourceLocation(CraftStudioApi.API_ID, "model_animations")); builder.setType(CSReadedAnim.class); builder.setIDRange(0, 4096); builder.create(); }
public static void init() { log.info("Loading Research Handler..."); RegistryBuilder<Research> builder = new RegistryBuilder<>(); builder.setName(loc); builder.setType(Research.class); builder.setIDRange(MIN_ID, MAX_ID); iResearchRegistry = (FMLControlledNamespacedRegistry<Research>) builder.create(); // iResearchRegistry = PersistentRegistryManager.createRegistry(loc, // Research.class, new ResourceLocation("invalid"), MIN_ID, MAX_ID, // true, ResearchCallbacks.INSTANCE, ResearchCallbacks.INSTANCE, // ResearchCallbacks.INSTANCE); }
@SubscribeEvent(priority = EventPriority.NORMAL) public static void registerRegistry(@Nonnull RegistryEvent.NewRegistry event) { REGISTRY = new RegistryBuilder<IIntegration>().setName(new ResourceLocation(EnderIO.DOMAIN, "integration")).setType(IIntegration.class) .setIDRange(0, Integer.MAX_VALUE - 1).create(); }
@SubscribeEvent(priority = EventPriority.NORMAL) public static void registerRegistry(@Nonnull RegistryEvent.NewRegistry event) { REGISTRY = new RegistryBuilder<IFertilizer>().setName(new ResourceLocation(EnderIO.DOMAIN, "fertilizer")).setType(IFertilizer.class) .setIDRange(0, Integer.MAX_VALUE - 1).create(); }
@SubscribeEvent(priority = EventPriority.NORMAL) public static void registerRegistry(@Nonnull RegistryEvent.NewRegistry event) { REGISTRY = new RegistryBuilder<IFarmerJoe>().setName(new ResourceLocation(EnderIO.DOMAIN, "farmers")).setType(IFarmerJoe.class) .setIDRange(0, Integer.MAX_VALUE - 1).addCallback(new RegistryCallbacks()).create(); }
@SubscribeEvent(priority = EventPriority.NORMAL) public static void registerRegistry(@Nonnull RegistryEvent.NewRegistry event) { REGISTRY = new RegistryBuilder<IDarkSteelUpgrade>().setName(new ResourceLocation(EnderIO.DOMAIN, "upgrades")).setType(IDarkSteelUpgrade.class) .setIDRange(0, Integer.MAX_VALUE - 1).create(); }