Skip to content

Commit

Permalink
restore te3 recipe plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
progwml6 committed May 10, 2014
1 parent 546cc21 commit 63b740e
Show file tree
Hide file tree
Showing 11 changed files with 160 additions and 18 deletions.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
63 changes: 48 additions & 15 deletions src/main/java/tconstruct/common/TRecipes.java
Expand Up @@ -349,8 +349,10 @@ protected static void addRecipesForToolBuilder ()

ItemStack diamond = new ItemStack(Items.diamond);
tb.registerToolMod(new ModRepair());
tb.registerToolMod(new ModDurability(new ItemStack[] { diamond }, 0, 500, 0f, 3, StatCollector.translateToLocal("gui.modifier.diamond"), "\u00a7b" + StatCollector.translateToLocal("modifier.tool.diamond"), "\u00a7b"));
tb.registerToolMod(new ModDurability(new ItemStack[] { new ItemStack(Items.emerald) }, 1, 0, 0.5f, 2, StatCollector.translateToLocal("gui.modifier.emerald"), "\u00a72" + StatCollector.translateToLocal("modifier.tool.emerald"), "\u00a72"));
tb.registerToolMod(new ModDurability(new ItemStack[] { diamond }, 0, 500, 0f, 3, StatCollector.translateToLocal("gui.modifier.diamond"), "\u00a7b"
+ StatCollector.translateToLocal("modifier.tool.diamond"), "\u00a7b"));
tb.registerToolMod(new ModDurability(new ItemStack[] { new ItemStack(Items.emerald) }, 1, 0, 0.5f, 2, StatCollector.translateToLocal("gui.modifier.emerald"), "\u00a72"
+ StatCollector.translateToLocal("modifier.tool.emerald"), "\u00a72"));

TRepo.modFlux = new ModFlux();
tb.registerToolMod(TRepo.modFlux);
Expand All @@ -364,13 +366,17 @@ protected static void addRecipesForToolBuilder ()
TRepo.modLapis = new ModLapis(10, new ItemStack[] { lapisItem, lapisBlock }, new int[] { 1, 9 });
tb.registerToolMod(TRepo.modLapis);

tb.registerToolMod(new ModInteger(new ItemStack[] { new ItemStack(TRepo.materials, 1, 6) }, 4, StatCollector.translateToLocal("gui.modifier.moss"), 3, "\u00a72", StatCollector.translateToLocal("modifier.tool.moss")));
tb.registerToolMod(new ModInteger(new ItemStack[] { new ItemStack(TRepo.materials, 1, 6) }, 4, StatCollector.translateToLocal("gui.modifier.moss"), 3, "\u00a72", StatCollector
.translateToLocal("modifier.tool.moss")));
ItemStack blazePowder = new ItemStack(Items.blaze_powder);
tb.registerToolMod(new ModBlaze(7, new ItemStack[] { blazePowder }, new int[] { 1 }));
tb.registerToolMod(new ModAutoSmelt(new ItemStack[] { new ItemStack(TRepo.materials, 1, 7) }, 6, StatCollector.translateToLocal("gui.modifier.lava"), "\u00a74", StatCollector.translateToLocal("modifier.tool.lava")));
tb.registerToolMod(new ModInteger(new ItemStack[] { new ItemStack(TRepo.materials, 1, 8) }, 8, StatCollector.translateToLocal("gui.modifier.necro"), 1, "\u00a78", StatCollector.translateToLocal("modifier.tool.necro")));
tb.registerToolMod(new ModAutoSmelt(new ItemStack[] { new ItemStack(TRepo.materials, 1, 7) }, 6, StatCollector.translateToLocal("gui.modifier.lava"), "\u00a74", StatCollector
.translateToLocal("modifier.tool.lava")));
tb.registerToolMod(new ModInteger(new ItemStack[] { new ItemStack(TRepo.materials, 1, 8) }, 8, StatCollector.translateToLocal("gui.modifier.necro"), 1, "\u00a78", StatCollector
.translateToLocal("modifier.tool.necro")));

TRepo.modAttack = new ModAttack(StatCollector.translateToLocal("gui.modifier.quartz"), 11, new ItemStack[] { new ItemStack(Items.quartz), new ItemStack(Blocks.quartz_block, 1, Short.MAX_VALUE) }, new int[] { 1, 4 });
TRepo.modAttack = new ModAttack(StatCollector.translateToLocal("gui.modifier.quartz"), 11, new ItemStack[] { new ItemStack(Items.quartz),
new ItemStack(Blocks.quartz_block, 1, Short.MAX_VALUE) }, new int[] { 1, 4 });
tb.registerToolMod(TRepo.modAttack);

tb.registerToolMod(new ModExtraModifier(new ItemStack[] { diamond, new ItemStack(Blocks.gold_block) }, "Tier1Free"));
Expand All @@ -384,7 +390,8 @@ protected static void addRecipesForToolBuilder ()
ItemStack piston = new ItemStack(Blocks.piston);
tb.registerToolMod(new ModPiston(3, new ItemStack[] { piston }, new int[] { 1 }));

tb.registerToolMod(new ModInteger(new ItemStack[] { new ItemStack(Blocks.obsidian), new ItemStack(Items.ender_pearl) }, 13, StatCollector.translateToLocal("modifier.tool.beheading"), 1, "\u00a7d", StatCollector.translateToLocal("modifier.tool.beheading")));
tb.registerToolMod(new ModInteger(new ItemStack[] { new ItemStack(Blocks.obsidian), new ItemStack(Items.ender_pearl) }, 13, StatCollector.translateToLocal("modifier.tool.beheading"), 1,
"\u00a7d", StatCollector.translateToLocal("modifier.tool.beheading")));

ItemStack holySoil = new ItemStack(TRepo.craftedSoil, 1, 4);
tb.registerToolMod(new ModSmite(StatCollector.translateToLocal("modifier.tool.smite"), 14, new ItemStack[] { holySoil }, new int[] { 1 }));
Expand Down Expand Up @@ -566,6 +573,12 @@ protected static void addRecipesForFurnace ()
FurnaceRecipes.smelting().func_151394_a(new ItemStack(TRepo.oreGravel, 1, 4), new ItemStack(TRepo.materials, 1, 11), 0.2f);

FurnaceRecipes.smelting().func_151394_a(new ItemStack(TRepo.speedBlock, 1, 0), new ItemStack(TRepo.speedBlock, 1, 2), 0.2f);
FurnaceRecipes.smelting().func_151394_a(new ItemStack(TRepo.materials, 1, 38), new ItemStack(TRepo.materials, 1, 4), 0.2f);
FurnaceRecipes.smelting().func_151394_a(new ItemStack(TRepo.materials, 1, 39), new ItemStack(TRepo.materials, 1, 3), 0.2f);
FurnaceRecipes.smelting().func_151394_a(new ItemStack(TRepo.materials, 1, 40), new ItemStack(TRepo.materials, 1, 11), 0.2f);
FurnaceRecipes.smelting().func_151394_a(new ItemStack(TRepo.materials, 1, 41), new ItemStack(TRepo.materials, 1, 5), 0.2f);
FurnaceRecipes.smelting().func_151394_a(new ItemStack(TRepo.materials, 1, 42), new ItemStack(TRepo.materials, 1, 14), 0.2f);

}

protected static void addRecipesForCraftingTable ()
Expand Down Expand Up @@ -886,6 +899,10 @@ protected static void addRecipesForCraftingTable ()
new ItemStack(TRepo.strangeFood, 1, 1), new ItemStack(TRepo.strangeFood, 1, 1), new ItemStack(Items.redstone));
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(TRepo.slimeChannel, 1, 0), "slimeball", "slimeball", "slimeball", "slimeball", new ItemStack(Items.redstone)));
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(TRepo.slimePad, 1, 0), TRepo.slimeChannel, "slimeball"));

GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(TRepo.materials, 1, 41), "dustArdite", "dustCobalt"));
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(TRepo.materials, 4, 42), "dustAluminium", "dustCopper", "dustCopper", "dustCopper"));

}

protected static void addRecipesForDryingRack ()
Expand Down Expand Up @@ -1032,6 +1049,14 @@ public void oreRegistry ()
ensureOreIsRegistered("nuggetGold", new ItemStack(Items.gold_nugget));
OreDictionary.registerOre("nuggetPigIron", new ItemStack(TRepo.materials, 1, 35));

OreDictionary.registerOre("dustArdite", new ItemStack(TRepo.materials, 1, 38));
OreDictionary.registerOre("dustCobalt", new ItemStack(TRepo.materials, 1, 39));
OreDictionary.registerOre("dustAluminium", new ItemStack(TRepo.materials, 1, 40));
OreDictionary.registerOre("dustAluminum", new ItemStack(TRepo.materials, 1, 40));
OreDictionary.registerOre("dustManyullyn", new ItemStack(TRepo.materials, 1, 41));
OreDictionary.registerOre("dustAluminiumBrass", new ItemStack(TRepo.materials, 1, 42));
OreDictionary.registerOre("dustAluminumBrass", new ItemStack(TRepo.materials, 1, 42));

OreDictionary.registerOre("slabCloth", new ItemStack(TRepo.woolSlab1, 1, Short.MAX_VALUE));
OreDictionary.registerOre("slabCloth", new ItemStack(TRepo.woolSlab2, 1, Short.MAX_VALUE));

Expand All @@ -1045,10 +1070,11 @@ public void oreRegistry ()

String[] matNames = { "Wood", "Stone", "Iron", "Flint", "Cactus", "Bone", "Obsidian", "Netherrack", "Slime", "Paper", "Cobalt", "Ardite", "Manyullyn", "Copper", "Bronze", "Alumite", "Steel",
"Blueslime" };
for (int i = 0; i < matNames.length; i++){
for (int i = 0; i < matNames.length; i++)
{
//TODO 1.8 remove this ore dict entry as it's outdated(use materialRod instead)
OreDictionary.registerOre(matNames[i].toLowerCase() + "Rod", new ItemStack(TRepo.toolRod, 1, i));
OreDictionary.registerOre("rod" + matNames[i] , new ItemStack(TRepo.toolRod, 1, i));
OreDictionary.registerOre("rod" + matNames[i], new ItemStack(TRepo.toolRod, 1, i));
}
OreDictionary.registerOre("thaumiumRod", new ItemStack(TRepo.toolRod, 1, 31));

Expand Down Expand Up @@ -1197,33 +1223,33 @@ public void modRecipes ()
RecipeRemover.removeAnyRecipe(new ItemStack(Items.golden_hoe));
RecipeRemover.removeAnyRecipe(new ItemStack(Items.golden_sword));
}

if (PHConstruct.labotimizeVanillaTools)
{
Items.wooden_pickaxe.setMaxDamage(1);
Items.wooden_axe.setMaxDamage(1);
Items.wooden_shovel.setMaxDamage(1);
Items.wooden_hoe.setMaxDamage(1);
Items.wooden_sword.setMaxDamage(1);

Items.stone_pickaxe.setMaxDamage(1);
Items.stone_axe.setMaxDamage(1);
Items.stone_shovel.setMaxDamage(1);
Items.stone_hoe.setMaxDamage(1);
Items.stone_sword.setMaxDamage(1);

Items.iron_pickaxe.setMaxDamage(1);
Items.iron_axe.setMaxDamage(1);
Items.iron_shovel.setMaxDamage(1);
Items.iron_hoe.setMaxDamage(1);
Items.iron_sword.setMaxDamage(1);

Items.diamond_pickaxe.setMaxDamage(1);
Items.diamond_axe.setMaxDamage(1);
Items.diamond_shovel.setMaxDamage(1);
Items.diamond_hoe.setMaxDamage(1);
Items.diamond_sword.setMaxDamage(1);

Items.golden_pickaxe.setMaxDamage(1);
Items.golden_axe.setMaxDamage(1);
Items.golden_shovel.setMaxDamage(1);
Expand Down Expand Up @@ -1362,6 +1388,12 @@ protected static void addRecipesForSmeltery ()
Smeltery.addMelting(FluidType.Iron, new ItemStack(Items.shears), 0, TConstruct.ingotLiquidValue * 2);
Smeltery.addMelting(FluidType.Emerald, new ItemStack(Items.emerald), -50, 640);

Smeltery.addMelting(FluidType.Ardite, new ItemStack(TRepo.materials, 1, 38), 0, TConstruct.ingotLiquidValue);
Smeltery.addMelting(FluidType.Cobalt, new ItemStack(TRepo.materials, 1, 39), 0, TConstruct.ingotLiquidValue);
Smeltery.addMelting(FluidType.Aluminum, new ItemStack(TRepo.materials, 1, 40), 0, TConstruct.ingotLiquidValue);
Smeltery.addMelting(FluidType.Manyullyn, new ItemStack(TRepo.materials, 1, 41), 0, TConstruct.ingotLiquidValue);
Smeltery.addMelting(FluidType.AluminumBrass, new ItemStack(TRepo.materials, 1, 42), 0, TConstruct.ingotLiquidValue);

// Blocks melt as themselves!
// Ore
Smeltery.addMelting(Blocks.iron_ore, 0, 600, new FluidStack(TRepo.moltenIronFluid, TConstruct.ingotLiquidValue * 2));
Expand Down Expand Up @@ -1484,7 +1516,8 @@ public void modIntegration ()
TRepo.thaumcraftAvailable = true;
TConstructClientRegistry.addMaterialRenderMapping(31, "tinker", "thaumium", true);
TConstructRegistry.addToolMaterial(31, "Thaumium", 3, 400, 700, 2, 1.3F, 0, 0f, "\u00A75", StatCollector.translateToLocal("materialtraits.thaumic"));
PatternBuilder.instance.registerFullMaterial(new ItemStack((Item) obj, 1, 2), 2, StatCollector.translateToLocal("gui.partbuilder.material.thaumium"), new ItemStack(TRepo.toolShard, 1, 31), new ItemStack(TRepo.toolRod, 1, 31), 31);
PatternBuilder.instance.registerFullMaterial(new ItemStack((Item) obj, 1, 2), 2, StatCollector.translateToLocal("gui.partbuilder.material.thaumium"),
new ItemStack(TRepo.toolShard, 1, 31), new ItemStack(TRepo.toolRod, 1, 31), 31);
for (int meta = 0; meta < TRepo.patternOutputs.length; meta++)
{
if (TRepo.patternOutputs[meta] != null)
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/tconstruct/items/MaterialItem.java
Expand Up @@ -27,10 +27,11 @@ private static String[] getTextures ()
static String[] materialNames = new String[] { "PaperStack", "SlimeCrystal", "SearedBrick", "CobaltIngot", "ArditeIngot", "ManyullynIngot", "Mossball", "LavaCrystal", "NecroticBone",
"CopperIngot", "TinIngot", "AluminumIngot", "RawAluminum", "BronzeIngot", "AluBrassIngot", "AlumiteIngot", "SteelIngot", "BlueSlimeCrystal", "ObsidianIngot", "IronNugget", "CopperNugget",
"TinNugget", "AluminumNugget", "EssenceCrystal", "AluBrassNugget", "SilkyCloth", "SilkyJewel", "ObsidianNugget", "CobaltNugget", "ArditeNugget", "ManyullynNugget", "BronzeNugget",
"AlumiteNugget", "SteelNugget", "PigIronIngot", "PigIronNugget", "GlueBall", "SearedBrick" };
"AlumiteNugget", "SteelNugget", "PigIronIngot", "PigIronNugget", "GlueBall", "SearedBrick", "ArditeDust", "CobaltDust", "AluminumDust", "ManyullynDust", "AluBrassDust" };

static String[] craftingTextures = new String[] { "paperstack", "slimecrystal", "searedbrick", "cobaltingot", "arditeingot", "manyullyningot", "mossball", "lavacrystal", "necroticbone",
"copperingot", "tiningot", "aluminumingot", "aluminumraw", "bronzeingot", "alubrassingot", "alumiteingot", "steelingot", "blueslimecrystal", "obsidianingot", "nugget_iron",
"nugget_copper", "nugget_tin", "nugget_aluminum", "", "nugget_alubrass", "silkycloth", "silkyjewel", "nugget_obsidian", "nugget_cobalt", "nugget_ardite", "nugget_manyullyn",
"nugget_bronze", "nugget_alumite", "nugget_steel", "pigironingot", "nugget_pigiron", "glueball", "searedbrick_nether" };
"nugget_bronze", "nugget_alumite", "nugget_steel", "pigironingot", "nugget_pigiron", "glueball", "searedbrick_nether", "ardite_dust", "cobalt_dust", "aluminium_dust", "manyullyn_dust",
"alubrass_dust" };
}
5 changes: 4 additions & 1 deletion src/main/java/tconstruct/plugins/PluginController.java
Expand Up @@ -8,6 +8,8 @@
import tconstruct.plugins.imc.Mystcraft;
import tconstruct.plugins.imc.Thaumcraft;
import tconstruct.plugins.nei.NotEnoughItems;
import tconstruct.plugins.te3.ThermalExpansion;
import tconstruct.plugins.waila.Waila;

public class PluginController
{
Expand All @@ -26,7 +28,8 @@ public static void registerModules()
moduleLoader.registerModule(IC2.class);
moduleLoader.registerModule(Thaumcraft.class);
moduleLoader.registerModule(NotEnoughItems.class);

moduleLoader.registerModule(Waila.class);
moduleLoader.registerModule(ThermalExpansion.class);
}

}
62 changes: 62 additions & 0 deletions src/main/java/tconstruct/plugins/te3/TE3Helper.java
@@ -0,0 +1,62 @@
package tconstruct.plugins.te3;

import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import cpw.mods.fml.common.event.FMLInterModComms;

public class TE3Helper {

public static void addInductionSmelterRecipe(int energy, ItemStack input1, ItemStack input2, ItemStack output1, ItemStack output2, int chance)
{
NBTTagCompound data = new NBTTagCompound();

data.setInteger("energy", energy);

NBTTagCompound input1Compound = new NBTTagCompound();
input1.writeToNBT(input1Compound);
data.setTag("primaryInput", input1Compound);

NBTTagCompound input2Compound = new NBTTagCompound();
input2.writeToNBT(input2Compound);
data.setTag("secondaryInput", input2Compound);

NBTTagCompound output1Compound = new NBTTagCompound();
output1.writeToNBT(output1Compound);
data.setTag("primaryOutput", output1Compound);

if (output2 != null) {
NBTTagCompound output2Compound = new NBTTagCompound();
output2.writeToNBT(output2Compound);
data.setTag("secondaryOutput", output2Compound);

data.setInteger("secondaryChance", chance);
}

FMLInterModComms.sendMessage("ThermalExpansion", "SmelterRecipe", data);
}

public static void addPulveriserRecipe(int energy, ItemStack input, ItemStack output, ItemStack bonus, int chance)
{
NBTTagCompound data = new NBTTagCompound();

data.setInteger("energy", energy);

NBTTagCompound inputCompound = new NBTTagCompound();
input.writeToNBT(inputCompound);
data.setTag("input", inputCompound);

NBTTagCompound outputCompound = new NBTTagCompound();
output.writeToNBT(outputCompound);
data.setTag("primaryOutput", outputCompound);

if (bonus != null) {
NBTTagCompound outputCompound2 = new NBTTagCompound();
bonus.writeToNBT(outputCompound2);
data.setTag("secondaryOutput", outputCompound2);

data.setInteger("secondaryChance", chance);
}

FMLInterModComms.sendMessage("ThermalExpansion", "PulverizerRecipe", data);
}
}
43 changes: 43 additions & 0 deletions src/main/java/tconstruct/plugins/te3/ThermalExpansion.java
@@ -0,0 +1,43 @@
package tconstruct.plugins.te3;

import tconstruct.common.TRepo;
import cpw.mods.fml.common.registry.GameRegistry;
import mantle.module.ILoadableModule;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraftforge.oredict.OreDictionary;

public class ThermalExpansion implements ILoadableModule
{

@SuppressWarnings("unused")
public static String modId = "ThermalExpansion";

@Override
public void preInit() {
// Nothing
}

@Override
public void init()
{
ItemStack crystalCinnabar = OreDictionary.getOres("crystalCinnabar").get(0);

TE3Helper.addPulveriserRecipe(1000, new ItemStack(TRepo.materials, 1, 11), new ItemStack(TRepo.materials, 1, 40), null, 0);
TE3Helper.addPulveriserRecipe(1000, new ItemStack(TRepo.materials, 1, 3), new ItemStack(TRepo.materials, 1, 39), null, 0);
TE3Helper.addPulveriserRecipe(1000, new ItemStack(TRepo.materials, 1, 4), new ItemStack(TRepo.materials, 1, 38), null, 0);

TE3Helper.addPulveriserRecipe(12000, new ItemStack(TRepo.oreSlag, 1, 1), new ItemStack(TRepo.materials, 2, 39), GameRegistry.findItemStack("ThermalExpansion", "dustIron", 1), 10);
TE3Helper.addInductionSmelterRecipe(12000, new ItemStack(TRepo.oreSlag, 1, 1), crystalCinnabar.copy(), new ItemStack(TRepo.materials, 3, 3), new ItemStack(Items.iron_ingot), 100);
TE3Helper.addPulveriserRecipe(12000, new ItemStack(TRepo.oreSlag, 1, 2), new ItemStack(TRepo.materials, 2, 38), GameRegistry.findItemStack("ThermalExpansion", "dustGold", 1), 10);
TE3Helper.addInductionSmelterRecipe(12000, new ItemStack(TRepo.oreSlag, 1, 2), crystalCinnabar.copy(), new ItemStack(TRepo.materials, 3, 4), new ItemStack(Items.gold_ingot), 100);

TE3Helper.addInductionSmelterRecipe(4000, new ItemStack(TRepo.materials, 1, 4), new ItemStack(TRepo.materials, 1, 3), new ItemStack(TRepo.materials, 1, 5), null, 0);
TE3Helper.addInductionSmelterRecipe(4000, new ItemStack(TRepo.materials, 1, 9), new ItemStack(TRepo.materials, 3, 11), new ItemStack(TRepo.materials, 4, 14), null, 0);
} @Override
public void postInit() {
// Nothing
}


}

0 comments on commit 63b740e

Please sign in to comment.