List of usage examples for net.minecraftforge.common.crafting CraftingHelper register
public static <T extends Ingredient> IIngredientSerializer<T> register(ResourceLocation key, IIngredientSerializer<T> serializer)
From source file:com.buuz135.industrial.proxy.CommonProxy.java
License:Open Source License
public void preInit(FMLPreInitializationEvent event) { configFolder = event.getModConfigurationDirectory(); LaserDrillEntry.addOreFile(new ResourceLocation(Reference.MOD_ID, "default_ores.json")); IFRegistries.poke();// w w w . j av a 2 s. c o m CraftingHelper.register(new ResourceLocation(Reference.MOD_ID, "configuration_value"), new ConfigurationConditionFactory()); random = new Random(); FluidsRegistry.registerFluids(); BlockRegistry.poke(); ItemRegistry.poke(); MinecraftForge.EVENT_BUS.register(new BlockRegistry()); MinecraftForge.EVENT_BUS.register(new ItemRegistry()); MinecraftForge.EVENT_BUS.register(new StrawRegistry()); MinecraftForge.EVENT_BUS.register(new ConveyorRegistry()); MinecraftForge.EVENT_BUS.register(new MeatFeederTickHandler()); MinecraftForge.EVENT_BUS.register(new MobDeathHandler()); MinecraftForge.EVENT_BUS.register(new WorldTickHandler()); MinecraftForge.EVENT_BUS.register(new PlantRecollectableRegistryHandler()); MinecraftForge.EVENT_BUS.register(new FakePlayerRideEntityHandler()); MinecraftForge.EVENT_BUS.register(new PlantInteractorHarvestDropsHandler()); MinecraftForge.EVENT_BUS.register(new SkullHandler()); NetworkRegistry.INSTANCE.registerGuiHandler(IndustrialForegoing.instance, new GuiHandler()); int id = 0; IndustrialForegoing.NETWORK.registerMessage(ConveyorButtonInteractMessage.Handler.class, ConveyorButtonInteractMessage.class, ++id, Side.SERVER); IndustrialForegoing.NETWORK.registerMessage(ConveyorSplittingSyncEntityMessage.Handler.class, ConveyorSplittingSyncEntityMessage.class, ++id, Side.CLIENT); IndustrialForegoing.NETWORK.registerMessage(SpecialParticleMessage.Handler.class, SpecialParticleMessage.class, ++id, Side.CLIENT); CustomConfiguration.config = new Configuration(event.getSuggestedConfigurationFile()); CustomConfiguration.config.load(); CustomConfiguration.sync(); CustomConfiguration.configValues = new HashMap<>(); CustomConfiguration.configValues.put("useTEFrames", CustomConfiguration.config.getBoolean("useTEFrames", Configuration.CATEGORY_GENERAL, true, "Adds recipes using Thermal Expansion frames")); CustomConfiguration.configValues.put("useEnderIOFrames", CustomConfiguration.config.getBoolean( "useEnderIOFrames", Configuration.CATEGORY_GENERAL, true, "Adds recipes using EnderIO frames")); CustomConfiguration.configValues.put("useOriginalFrames", CustomConfiguration.config.getBoolean("useOriginalFrames", Configuration.CATEGORY_GENERAL, true, "Adds recipes using TeslaCoreLib frames")); CustomConfiguration.configValues.put("useMekanismFrames", CustomConfiguration.config.getBoolean("useMekanismFrames", Configuration.CATEGORY_GENERAL, true, "Adds recipes using Mekanism Steel Casing")); CustomConfiguration.configValues.put("machines.wither_builder.HCWither", CustomConfiguration.config.getBoolean("HCWither", "machines.wither_builder", false, "If enabled, only the wither builder will be able to place wither skulls. That means that players won't be able to place wither skulls. The recipe will change, but that will need a restart.")); if (Loader.isModLoaded("crafttweaker")) CraftTweakerHelper.register(); if (Loader.isModLoaded("baubles")) MinecraftForge.EVENT_BUS.register(new MeatFeederBauble.Event()); EntityRegistry.registerModEntity(new ResourceLocation(Reference.MOD_ID, "pink_slime"), EntityPinkSlime.class, "pink_slime", 135135, IndustrialForegoing.instance, 32, 1, false, 10485860, 16777215); PINK_SLIME_LOOT = LootTableList.register(new ResourceLocation(Reference.MOD_ID, "entities/pink_slime")); try { new JsonParser().parse(readUrl(CONTRIBUTORS_FILE)).getAsJsonObject().get("uuid").getAsJsonArray() .forEach(jsonElement -> CONTRIBUTORS.add(jsonElement.getAsString())); } catch (Exception e) { e.printStackTrace(); } }