Load recipes a bit earlier to fix some issues with crafttweaker, hopefully this doesnt break anything thing else. Fixes #1520

This commit is contained in:
modmuss50 2018-05-20 16:01:58 +01:00
parent 66bb38543e
commit d2f6f89838
No known key found for this signature in database
GPG key ID: 773D17BE8BF49C82

View file

@ -25,14 +25,17 @@
package techreborn;
import net.minecraft.block.BlockDispenser;
import net.minecraft.item.crafting.IRecipe;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.gen.structure.MapGenStructureIO;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.RegistryEvent;
import net.minecraftforge.fluids.FluidRegistry;
import net.minecraftforge.fml.common.Loader;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.SidedProxy;
import net.minecraftforge.fml.common.event.*;
import net.minecraftforge.fml.common.eventhandler.EventPriority;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.network.NetworkRegistry;
import net.minecraftforge.fml.common.registry.EntityRegistry;
@ -121,10 +124,15 @@ public class Core {
logHelper.info("PreInitialization Complete");
}
@Mod.EventHandler
public void init(FMLInitializationEvent event) throws IllegalAccessException, InstantiationException {
@SubscribeEvent(priority = EventPriority.LOW)//LOW is used as we want it to load as late as possible, but before crafttweaker
public void registerRecipes(RegistryEvent.Register<IRecipe> event){
//Register ModRecipes
ModRecipes.init();
}
@Mod.EventHandler
public void init(FMLInitializationEvent event) throws IllegalAccessException, InstantiationException {
// Registers Chest Loot
// ModLoot.init();
// Sounds