mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-19 03:49:29 +00:00
restore te3 recipe plugin
This commit is contained in:
1 parent
546cc2198e
commit
63b740eacd
11 files changed
+160
-18
No files matched your search
@@ -8,6 +8,8 @@ import tconstruct.plugins.imc.BuildcraftTransport;
|
||||
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
|
||||
{
|
||||
@@ -26,7 +28,8 @@ public class PluginController
|
||||
moduleLoader.registerModule(IC2.class);
|
||||
moduleLoader.registerModule(Thaumcraft.class);
|
||||
moduleLoader.registerModule(NotEnoughItems.class);
|
||||
|
||||
moduleLoader.registerModule(Waila.class);
|
||||
moduleLoader.registerModule(ThermalExpansion.class);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user