Updates, and re added support
This commit is contained in:
parent
158f68c4a8
commit
e680f3fb1f
5 changed files with 93 additions and 87 deletions
|
@ -5,6 +5,8 @@ import java.util.ArrayList;
|
|||
import net.minecraftforge.fml.common.Loader;
|
||||
import techreborn.compat.minetweaker.MinetweakerCompat;
|
||||
import techreborn.compat.recipes.RecipesBiomesOPlenty;
|
||||
import techreborn.compat.recipes.RecipesBuildcraft;
|
||||
import techreborn.compat.recipes.RecipesThaumcraft;
|
||||
import techreborn.compat.waila.CompatModuleWaila;
|
||||
import techreborn.config.ConfigTechReborn;
|
||||
|
||||
|
@ -34,6 +36,8 @@ public class CompatManager {
|
|||
registerCompact(CompatModuleWaila.class, "Waila");
|
||||
registerCompact(MinetweakerCompat.class, "MineTweaker3");
|
||||
registerCompact(RecipesBiomesOPlenty.class, "BiomesOPlenty");
|
||||
registerCompact(RecipesBuildcraft.class, "BuildCraft|Builders");
|
||||
registerCompact(RecipesThaumcraft.class, "Thaumcraft");
|
||||
}
|
||||
|
||||
public void registerCompact(Class<?> moduleClass, Object... objs) {
|
||||
|
|
|
@ -0,0 +1,71 @@
|
|||
package techreborn.compat.recipes;
|
||||
|
||||
import buildcraft.BuildCraftBuilders;
|
||||
import buildcraft.api.fuels.IFuel;
|
||||
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
|
||||
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
|
||||
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
|
||||
import net.minecraftforge.fml.common.event.FMLServerStartingEvent;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import reborncore.api.fuel.FluidPowerManager;
|
||||
import reborncore.common.powerSystem.PowerSystem;
|
||||
import reborncore.common.util.CraftingHelper;
|
||||
import reborncore.common.util.RecipeRemover;
|
||||
import techreborn.Core;
|
||||
import techreborn.api.TechRebornAPI;
|
||||
import techreborn.compat.ICompatModule;
|
||||
|
||||
public class RecipesBuildcraft implements ICompatModule {
|
||||
|
||||
public static Block quarryBlock;
|
||||
|
||||
public static void removeRecipes() {
|
||||
RecipeRemover.removeAnyRecipe(new ItemStack(
|
||||
quarryBlock));
|
||||
}
|
||||
|
||||
public static void addRecipies() {
|
||||
Item drill = TechRebornAPI.recipeCompact.getItem("diamondDrill").getItem();
|
||||
ItemStack drillStack = new ItemStack(drill, 1, OreDictionary.WILDCARD_VALUE);
|
||||
//Quarry
|
||||
CraftingHelper.addShapedOreRecipe(new ItemStack(quarryBlock), new Object[]
|
||||
{
|
||||
"IAI", "GIG", "DED",
|
||||
'I', "gearIron",
|
||||
'G', "gearGold",
|
||||
'D', "gearDiamond",
|
||||
'A', TechRebornAPI.recipeCompact.getItem("advancedCircuit"),
|
||||
'E', drillStack
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preInit(FMLPreInitializationEvent event) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init(FMLInitializationEvent event) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void postInit(FMLPostInitializationEvent event) {
|
||||
Core.logHelper.info("Trying to change the quarry recipe");
|
||||
quarryBlock = BuildCraftBuilders.quarryBlock;
|
||||
removeRecipes();
|
||||
addRecipies();
|
||||
for (IFuel fuel : buildcraft.energy.fuels.FuelManager.INSTANCE.getFuels()) {
|
||||
FluidPowerManager.fluidPowerValues.put(fuel.getFluid(), (double) fuel.getPowerPerCycle() / PowerSystem.euPerRF);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void serverStarting(FMLServerStartingEvent event) {
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,53 @@
|
|||
package techreborn.compat.recipes;
|
||||
|
||||
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
|
||||
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
|
||||
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
|
||||
import net.minecraftforge.fml.common.event.FMLServerStartingEvent;
|
||||
import ic2.api.item.IC2Items;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fluids.FluidRegistry;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import techreborn.api.recipe.RecipeHandler;
|
||||
import techreborn.api.recipe.machines.IndustrialSawmillRecipe;
|
||||
import techreborn.compat.ICompatModule;
|
||||
import thaumcraft.api.blocks.BlocksTC;
|
||||
|
||||
public class RecipesThaumcraft implements ICompatModule {
|
||||
@Override
|
||||
public void preInit(FMLPreInitializationEvent event) {
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init(FMLInitializationEvent event) {
|
||||
ItemStack pulpStack = OreDictionary.getOres("pulpWood").get(0);
|
||||
//ItemStack greatWoodStack = BlocksTC.getBlock("blockWoodenDevice", 6);
|
||||
ItemStack greatWoodStack = null;
|
||||
//SOMEONE WHO KNOWS TC FIX THIS
|
||||
greatWoodStack.stackSize = 6;
|
||||
RecipeHandler.addRecipe(new IndustrialSawmillRecipe(new ItemStack(BlocksTC.log), null, new FluidStack(FluidRegistry.WATER, 1000), greatWoodStack, pulpStack, null, 200, 30, false));
|
||||
RecipeHandler.addRecipe(new IndustrialSawmillRecipe(new ItemStack(BlocksTC.log), IC2Items.getItem("waterCell"), null, greatWoodStack, pulpStack, IC2Items.getItem("cell"), 200, 30, false));
|
||||
RecipeHandler.addRecipe(new IndustrialSawmillRecipe(new ItemStack(BlocksTC.log), new ItemStack(Items.water_bucket), null, greatWoodStack, pulpStack, new ItemStack(Items.bucket), 200, 30, false));
|
||||
|
||||
//ItemStack silverWoodStack = ItemApi.getBlock("blockWoodenDevice", 7);
|
||||
ItemStack silverWoodStack = null;
|
||||
silverWoodStack.stackSize = 6;
|
||||
RecipeHandler.addRecipe(new IndustrialSawmillRecipe(new ItemStack(BlocksTC.log, 1), null, new FluidStack(FluidRegistry.WATER, 1000), silverWoodStack, pulpStack, null, 200, 30, false));
|
||||
RecipeHandler.addRecipe(new IndustrialSawmillRecipe(new ItemStack(BlocksTC.log, 1), IC2Items.getItem("waterCell"), null, silverWoodStack, pulpStack, IC2Items.getItem("cell"), 200, 30, false));
|
||||
RecipeHandler.addRecipe(new IndustrialSawmillRecipe(new ItemStack(BlocksTC.log, 1), new ItemStack(Items.water_bucket), null, silverWoodStack, pulpStack, new ItemStack(Items.bucket), 200, 30, false));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void postInit(FMLPostInitializationEvent event) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void serverStarting(FMLServerStartingEvent event) {
|
||||
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue