Added some fuels to forestry's api, might write our own and import bc's and forest into ours.

This commit is contained in:
modmuss50 2015-09-08 13:26:24 +01:00
parent 9c5c016976
commit 72799a9474
4 changed files with 50 additions and 1 deletions

View file

@ -25,6 +25,7 @@ public class CompatManager {
registerCompact(RecipesBiomesOPlenty.class, "BiomesOPlenty");
registerCompact(RecipesThaumcraft.class, "Thaumcraft");
registerCompact(RecipesForestry.class, "Forestry");
registerCompact(FuelsNoForestry.class, "!Forestry");
registerCompact(MinetweakerCompat.class, "MineTweaker3");
}

View file

@ -0,0 +1,36 @@
package techreborn.compat.recipes;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.event.FMLServerStartingEvent;
import forestry.api.fuels.FuelManager;
import forestry.api.fuels.GeneratorFuel;
import net.minecraftforge.fluids.Fluid;
import techreborn.compat.ICompatModule;
import java.util.HashMap;
public class FuelsNoForestry implements ICompatModule {
@Override
public void preInit(FMLPreInitializationEvent event) {
if(FuelManager.generatorFuel == null){
FuelManager.generatorFuel = new HashMap<Fluid, GeneratorFuel>();
}
}
@Override
public void init(FMLInitializationEvent event) {
}
@Override
public void postInit(FMLPostInitializationEvent event) {
}
@Override
public void serverStarting(FMLServerStartingEvent event) {
}
}

View file

@ -1,15 +1,21 @@
package techreborn.compat.recipes;
import buildcraft.BuildCraftEnergy;
import buildcraft.api.core.BuildCraftAPI;
import buildcraft.api.fuels.BuildcraftFuelRegistry;
import buildcraft.core.Version;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.event.FMLServerStartingEvent;
import forestry.api.fuels.FuelManager;
import forestry.api.fuels.GeneratorFuel;
import ic2.api.item.IC2Items;
import net.minecraft.block.Block;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.oredict.OreDictionary;
import techreborn.compat.ICompatModule;
import techreborn.util.CraftingHelper;
@ -48,7 +54,9 @@ public class RecipesBuildcraft implements ICompatModule {
@Override
public void init(FMLInitializationEvent event) {
if(!FuelManager.generatorFuel.containsKey(BuildCraftEnergy.fluidFuel)){
FuelManager.generatorFuel.put(BuildCraftEnergy.fluidFuel, new GeneratorFuel(new FluidStack(BuildCraftEnergy.fluidFuel, 1000), 38400, 6000));
}
}
@Override

View file

@ -1,10 +1,13 @@
package techreborn.init;
import cpw.mods.fml.common.registry.GameRegistry;
import forestry.api.fuels.FuelManager;
import forestry.api.fuels.GeneratorFuel;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidRegistry;
import net.minecraftforge.fluids.FluidStack;
import techreborn.blocks.fluid.BlockFluidTechReborn;
import techreborn.lib.ModInfo;
@ -149,6 +152,7 @@ public class ModFluids {
BlockFluidNitrocoalfuel = new BlockFluidTechReborn(fluidNitrocoalfuel, Material.water, "techreborn.nitrocoalfuel");
GameRegistry.registerBlock(BlockFluidNitrocoalfuel, ModInfo.MOD_ID + "_" + BlockFluidNitrocoalfuel.getUnlocalizedName().substring(5));
fluidNitrocoalfuel.setUnlocalizedName(fluidNitrocoalfuel.getUnlocalizedName());
FuelManager.generatorFuel.put(fluidNitrocoalfuel, new GeneratorFuel(new FluidStack(fluidNitrocoalfuel, 1000), 48000, 6000));
FluidRegistry.registerFluid(fluidNitrofuel);
BlockFluidNitrofuel = new BlockFluidTechReborn(fluidNitrofuel, Material.water, "techreborn.nitrofuel");