This commit is contained in:
Modmuss50 2015-04-17 19:42:47 +01:00
commit 314a9637b7
7 changed files with 117 additions and 3 deletions

View file

@ -2,6 +2,7 @@ package techreborn;
import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.event.FMLInitializationEvent; 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.FMLPreInitializationEvent;
import cpw.mods.fml.common.network.NetworkRegistry; import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.common.registry.GameRegistry;
@ -9,6 +10,7 @@ import net.minecraftforge.common.MinecraftForge;
import techreborn.achievement.TRAchievements; import techreborn.achievement.TRAchievements;
import techreborn.client.GuiHandler; import techreborn.client.GuiHandler;
import techreborn.compat.CompatManager; import techreborn.compat.CompatManager;
import techreborn.compat.recipes.RecipeManager;
import techreborn.config.ConfigTechReborn; import techreborn.config.ConfigTechReborn;
import techreborn.event.MultiblockEvent; import techreborn.event.MultiblockEvent;
import techreborn.init.ModBlocks; import techreborn.init.ModBlocks;
@ -46,6 +48,7 @@ public class Core {
ModItems.init(); ModItems.init();
// Recipes // Recipes
ModRecipes.init(); ModRecipes.init();
//Compat //Compat
CompatManager.init(event); CompatManager.init(event);
// WorldGen // WorldGen
@ -61,4 +64,10 @@ public class Core {
LogHelper.info("Initialization Compleate"); LogHelper.info("Initialization Compleate");
} }
@Mod.EventHandler
public void postinit(FMLPostInitializationEvent event)
{
RecipeManager.init();
}
} }

View file

@ -6,8 +6,10 @@ import techreborn.compat.waila.CompatModuleWaila;
public class CompatManager { public class CompatManager {
public static void init(FMLInitializationEvent event) { public static void init(FMLInitializationEvent event)
if (Loader.isModLoaded("Waila")) { {
if (Loader.isModLoaded("Waila"))
{
new CompatModuleWaila().init(event); new CompatModuleWaila().init(event);
} }
} }

View file

@ -0,0 +1,16 @@
package techreborn.compat.recipes;
import techreborn.compat.waila.CompatModuleWaila;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.event.FMLInitializationEvent;
public class RecipeManager {
public static void init()
{
if (Loader.isModLoaded("BuildCraft|Factory"))
{
RecipesBuildcraft.init();
}
}
}

View file

@ -0,0 +1,25 @@
package techreborn.compat.recipes;
import net.minecraft.item.ItemStack;
import buildcraft.BuildCraftFactory;
import techreborn.util.RecipeRemover;
public class RecipesBuildcraft {
public static void init()
{
removeRecipes();
addRecipies();
}
public static void removeRecipes()
{
RecipeRemover.removeAnyRecipe(new ItemStack(BuildCraftFactory.quarryBlock));
}
public static void addRecipies()
{
}
}

View file

@ -1,6 +1,6 @@
package techreborn.compat.recipes; package techreborn.compat.recipes;
public class ThermalExpansion { public class RecipesThermalExpansion {
//TODO remove basic machine frame recipe //TODO remove basic machine frame recipe
//TODO replace iron in recipe to steel //TODO replace iron in recipe to steel

View file

@ -16,6 +16,11 @@ public class ConfigTechReborn {
public static boolean RubyOreTrue; public static boolean RubyOreTrue;
public static boolean SapphireOreTrue; public static boolean SapphireOreTrue;
public static boolean BauxiteOreTrue; public static boolean BauxiteOreTrue;
public static boolean CopperOreTrue;
public static boolean TinOreTrue;
public static boolean LeadOreTrue;
public static boolean SilverOreTrue;
public static boolean PyriteOreTrue; public static boolean PyriteOreTrue;
public static boolean CinnabarOreTrue; public static boolean CinnabarOreTrue;
public static boolean SphaleriteOreTrue; public static boolean SphaleriteOreTrue;
@ -105,6 +110,22 @@ public class ConfigTechReborn {
"Allow BauxiteOre", true, "Allow BauxiteOre", true,
"Allow BauxiteOre to be generated in your world.") "Allow BauxiteOre to be generated in your world.")
.getBoolean(true); .getBoolean(true);
CopperOreTrue = config.get(CATEGORY_WORLD,
"Allow CopperOre", true,
"Allow CopperOre to be generated in your world.")
.getBoolean(true);
TinOreTrue = config.get(CATEGORY_WORLD,
"Allow TinOre", true,
"Allow TinOre to be generated in your world.")
.getBoolean(true);
LeadOreTrue = config.get(CATEGORY_WORLD,
"Allow LeadOre", true,
"Allow LeadOre to be generated in your world.")
.getBoolean(true);
SilverOreTrue = config.get(CATEGORY_WORLD,
"Allow LeadOre", true,
"Allow LeadOre to be generated in your world.")
.getBoolean(true);
PyriteOreTrue = config.get(CATEGORY_WORLD, PyriteOreTrue = config.get(CATEGORY_WORLD,
"Allow PyriteOre", true, "Allow PyriteOre", true,
"Allow PyriteOre to be generated in your world.") "Allow PyriteOre to be generated in your world.")

View file

@ -26,6 +26,10 @@ public class TROreGen implements IWorldGenerator {
WorldGenMinable oreSheldonite; WorldGenMinable oreSheldonite;
WorldGenMinable oreOlivine; WorldGenMinable oreOlivine;
WorldGenMinable oreSodalite; WorldGenMinable oreSodalite;
WorldGenMinable oreCopper;
WorldGenMinable oreTin;
WorldGenMinable oreLead;
WorldGenMinable oreSilver;
public TROreGen() { public TROreGen() {
//World //World
@ -34,6 +38,11 @@ public class TROreGen implements IWorldGenerator {
oreRuby = new WorldGenMinable(ModBlocks.ore, 2, 8, Blocks.stone); oreRuby = new WorldGenMinable(ModBlocks.ore, 2, 8, Blocks.stone);
oreSapphire = new WorldGenMinable(ModBlocks.ore, 3, 8, Blocks.stone); oreSapphire = new WorldGenMinable(ModBlocks.ore, 3, 8, Blocks.stone);
oreBauxite = new WorldGenMinable(ModBlocks.ore, 4, 8, Blocks.stone); oreBauxite = new WorldGenMinable(ModBlocks.ore, 4, 8, Blocks.stone);
oreCopper = new WorldGenMinable(ModBlocks.ore, 12, 8, Blocks.stone);
oreTin = new WorldGenMinable(ModBlocks.ore, 13, 8, Blocks.stone);
oreLead = new WorldGenMinable(ModBlocks.ore, 14, 8, Blocks.stone);
oreSilver = new WorldGenMinable(ModBlocks.ore, 15, 8, Blocks.stone);
//Nether //Nether
orePyrite = new WorldGenMinable(ModBlocks.ore, 5, 8, Blocks.netherrack); orePyrite = new WorldGenMinable(ModBlocks.ore, 5, 8, Blocks.netherrack);
oreCinnabar = new WorldGenMinable(ModBlocks.ore, 6, 8, Blocks.netherrack); oreCinnabar = new WorldGenMinable(ModBlocks.ore, 6, 8, Blocks.netherrack);
@ -100,6 +109,38 @@ public class TROreGen implements IWorldGenerator {
oreBauxite.generate(world, random, xPos, yPos, zPos); oreBauxite.generate(world, random, xPos, yPos, zPos);
} }
} }
if (config.CopperOreTrue) {
for (int i = 0; i <= 16; i++) {
xPos = xChunk + random.nextInt(16);
yPos = 60 + random.nextInt(60 - 20);
zPos = zChunk + random.nextInt(16);
oreCopper.generate(world, random, xPos, yPos, zPos);
}
}
if (config.TinOreTrue) {
for (int i = 0; i <= 16; i++) {
xPos = xChunk + random.nextInt(16);
yPos = 60 + random.nextInt(60 - 20);
zPos = zChunk + random.nextInt(16);
oreTin.generate(world, random, xPos, yPos, zPos);
}
}
if (config.LeadOreTrue) {
for (int i = 0; i <= 16; i++) {
xPos = xChunk + random.nextInt(16);
yPos = 60 + random.nextInt(60 - 20);
zPos = zChunk + random.nextInt(16);
oreLead.generate(world, random, xPos, yPos, zPos);
}
}
if (config.SilverOreTrue) {
for (int i = 0; i <= 16; i++) {
xPos = xChunk + random.nextInt(16);
yPos = 60 + random.nextInt(60 - 20);
zPos = zChunk + random.nextInt(16);
oreSilver.generate(world, random, xPos, yPos, zPos);
}
}
} }
void generateHellOres(Random random, int xChunk, int zChunk, World world) { void generateHellOres(Random random, int xChunk, int zChunk, World world) {