Search in sources :

Example 1 with BrewingCraftingType

use of com.minecolonies.coremod.recipes.BrewingCraftingType in project minecolonies by Minecolonies.

the class ModCraftingTypesInitializer method init.

public static void init(final RegistryEvent.Register<CraftingType> event) {
    final IForgeRegistry<CraftingType> reg = event.getRegistry();
    ModCraftingTypes.SMALL_CRAFTING = new RecipeCraftingType<>(ModCraftingTypes.SMALL_CRAFTING_ID, IRecipeType.CRAFTING, r -> r.canCraftInDimensions(2, 2));
    reg.register(ModCraftingTypes.SMALL_CRAFTING);
    ModCraftingTypes.LARGE_CRAFTING = new RecipeCraftingType<>(ModCraftingTypes.LARGE_CRAFTING_ID, IRecipeType.CRAFTING, r -> r.canCraftInDimensions(3, 3) && !r.canCraftInDimensions(2, 2));
    reg.register(ModCraftingTypes.LARGE_CRAFTING);
    ModCraftingTypes.SMELTING = new RecipeCraftingType<>(ModCraftingTypes.SMELTING_ID, IRecipeType.SMELTING, null);
    reg.register(ModCraftingTypes.SMELTING);
    ModCraftingTypes.BREWING = new BrewingCraftingType();
    reg.register(ModCraftingTypes.BREWING);
}
Also used : RecipeCraftingType(com.minecolonies.api.crafting.RecipeCraftingType) BrewingCraftingType(com.minecolonies.coremod.recipes.BrewingCraftingType) RegistryEvent(net.minecraftforge.event.RegistryEvent) CraftingType(com.minecolonies.api.crafting.registry.CraftingType) IForgeRegistry(net.minecraftforge.registries.IForgeRegistry) ModCraftingTypes(com.minecolonies.api.crafting.ModCraftingTypes) IRecipeType(net.minecraft.item.crafting.IRecipeType) RecipeCraftingType(com.minecolonies.api.crafting.RecipeCraftingType) BrewingCraftingType(com.minecolonies.coremod.recipes.BrewingCraftingType) CraftingType(com.minecolonies.api.crafting.registry.CraftingType) BrewingCraftingType(com.minecolonies.coremod.recipes.BrewingCraftingType)

Aggregations

ModCraftingTypes (com.minecolonies.api.crafting.ModCraftingTypes)1 RecipeCraftingType (com.minecolonies.api.crafting.RecipeCraftingType)1 CraftingType (com.minecolonies.api.crafting.registry.CraftingType)1 BrewingCraftingType (com.minecolonies.coremod.recipes.BrewingCraftingType)1 IRecipeType (net.minecraft.item.crafting.IRecipeType)1 RegistryEvent (net.minecraftforge.event.RegistryEvent)1 IForgeRegistry (net.minecraftforge.registries.IForgeRegistry)1