Java 类net.minecraftforge.fml.common.registry.RegistryBuilder 实例源码

项目:ShearMadness    文件:RegistryEventHandler.java   
@SubscribeEvent
public static void onCreateRegistry(NewRegistry event) {
    new RegistryBuilder<ICustomParticleFactory>()
            .setType(ICustomParticleFactory.class)
            .setName(new ResourceLocation(CommonReference.MOD_ID, "custom_particles"))
            .create();
}
项目:CraftStudioAPI    文件:CraftStudioApi.java   
@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();
}
项目:Toms-Mod    文件:ResearchHandler.java   
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);
}
项目:EnderIO    文件:IntegrationRegistry.java   
@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();
}
项目:EnderIO    文件:Fertilizer.java   
@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();
}
项目:EnderIO    文件:Registry.java   
@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();
}
项目:EnderIO    文件:UpgradeRegistry.java   
@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();
}