mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-25 14:24:35 +00:00
Move recipe registration to the Recipe Registry Event
This commit is contained in:
1 parent
704a9b50ae
commit
c042185eaa
3 files changed
+13
-14
No files matched your search
@@ -298,6 +298,8 @@ public class Mekanism {
|
||||
@SubscribeEvent
|
||||
public static void registerRecipes(RegistryEvent.Register<IRecipe> event) {
|
||||
event.getRegistry().register(new BinRecipe());
|
||||
addRecipes();
|
||||
OreDictManager.init();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -912,8 +914,6 @@ public class Mekanism {
|
||||
}
|
||||
|
||||
//Load this module
|
||||
addRecipes();
|
||||
OreDictManager.init();
|
||||
registerTileEntities();
|
||||
|
||||
//Integrate with Waila
|
||||
|
||||
@@ -24,6 +24,7 @@ import mekanism.generators.common.content.turbine.SynchronizedTurbineData;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
import net.minecraftforge.client.event.ModelRegistryEvent;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.event.RegistryEvent;
|
||||
@@ -102,13 +103,6 @@ public class MekanismGenerators implements IModule {
|
||||
proxy.registerRegularTileEntities();
|
||||
proxy.registerSpecialTileEntities();
|
||||
|
||||
addRecipes();
|
||||
|
||||
for (ItemStack ore : OreDictionary.getOres("dustGold")) {
|
||||
RecipeHandler.addMetallurgicInfuserRecipe(InfuseRegistry.get("CARBON"), 10, MekanismUtils.size(ore, 4),
|
||||
GeneratorsItems.Hohlraum.getEmptyItem());
|
||||
}
|
||||
|
||||
//Finalization
|
||||
Mekanism.logger.info("Loaded MekanismGenerators module.");
|
||||
}
|
||||
@@ -128,10 +122,16 @@ public class MekanismGenerators implements IModule {
|
||||
}
|
||||
}
|
||||
|
||||
public void addRecipes() {
|
||||
@SubscribeEvent
|
||||
public static void registerRecipes(RegistryEvent.Register<IRecipe> event) {
|
||||
FuelHandler.addGas(MekanismFluids.Ethene, general.ETHENE_BURN_TIME, general.FROM_H2
|
||||
+ generators.bioGeneration * 2
|
||||
* general.ETHENE_BURN_TIME); //1mB hydrogen + 2*bioFuel/tick*200ticks/100mB * 20x efficiency bonus
|
||||
|
||||
for (ItemStack ore : OreDictionary.getOres("dustGold")) {
|
||||
RecipeHandler.addMetallurgicInfuserRecipe(InfuseRegistry.get("CARBON"), 10, MekanismUtils.size(ore, 4),
|
||||
GeneratorsItems.Hohlraum.getEmptyItem());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -17,6 +17,7 @@ import net.minecraft.item.Item;
|
||||
import net.minecraft.item.Item.ToolMaterial;
|
||||
import net.minecraft.item.ItemArmor.ArmorMaterial;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
import net.minecraftforge.client.event.ModelRegistryEvent;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.common.util.EnumHelper;
|
||||
@@ -102,9 +103,6 @@ public class MekanismTools implements IModule {
|
||||
//Load the proxy
|
||||
proxy.loadConfiguration();
|
||||
|
||||
//Load this module
|
||||
addRecipes();
|
||||
|
||||
//Finalization
|
||||
Mekanism.logger.info("Loaded MekanismTools module.");
|
||||
}
|
||||
@@ -328,7 +326,8 @@ public class MekanismTools implements IModule {
|
||||
ToolsItems.setHarvestLevels();
|
||||
}
|
||||
|
||||
public void addRecipes() {
|
||||
@SubscribeEvent
|
||||
public static void registerRecipes(RegistryEvent.Register<IRecipe> event) {
|
||||
//Furnace Recipes
|
||||
GameRegistry.addSmelting(ToolsItems.IronPaxel, new ItemStack(Items.IRON_NUGGET), 0.1F);
|
||||
GameRegistry.addSmelting(ToolsItems.GoldPaxel, new ItemStack(Items.GOLD_NUGGET), 0.1F);
|
||||
|
||||
Reference in new issue
Block a user