mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-19 03:49:29 +00:00
Fix JABBA-related issues with crafting station slots (#54)
* Fix shift-merging tools voiding items fixes <https://github.com/GTNewHorizons/GT-New-Horizons-Modpack/issues/11392> * Change 0-sized ItemStacks into null stacks in crafting station attached slots Fixes <https://github.com/GTNewHorizons/GT-New-Horizons-Modpack/issues/10425> * Update buildscript * spotlessApply
This commit is contained in:
1 parent
18bfeaff32
commit
39be06c23b
571 files changed
+25959
-28223
No files matched your search
@@ -8,14 +8,11 @@ import net.minecraftforge.fluids.FluidStack;
|
||||
/**
|
||||
* Taken from CoFHLib
|
||||
*/
|
||||
public class TE4Helper
|
||||
{
|
||||
public class TE4Helper {
|
||||
|
||||
public static void addFurnaceRecipe (int energy, ItemStack input, ItemStack output)
|
||||
{
|
||||
public static void addFurnaceRecipe(int energy, ItemStack input, ItemStack output) {
|
||||
|
||||
if (input == null || output == null)
|
||||
{
|
||||
if (input == null || output == null) {
|
||||
return;
|
||||
}
|
||||
NBTTagCompound toSend = new NBTTagCompound();
|
||||
@@ -29,23 +26,21 @@ public class TE4Helper
|
||||
FMLInterModComms.sendMessage("ThermalExpansion", "FurnaceRecipe", toSend);
|
||||
}
|
||||
|
||||
public static void addPulverizerRecipe (int energy, ItemStack input, ItemStack primaryOutput)
|
||||
{
|
||||
public static void addPulverizerRecipe(int energy, ItemStack input, ItemStack primaryOutput) {
|
||||
|
||||
addPulverizerRecipe(energy, input, primaryOutput, null, 0);
|
||||
}
|
||||
|
||||
public static void addPulverizerRecipe (int energy, ItemStack input, ItemStack primaryOutput, ItemStack secondaryOutput)
|
||||
{
|
||||
public static void addPulverizerRecipe(
|
||||
int energy, ItemStack input, ItemStack primaryOutput, ItemStack secondaryOutput) {
|
||||
|
||||
addPulverizerRecipe(energy, input, primaryOutput, secondaryOutput, 100);
|
||||
}
|
||||
|
||||
public static void addPulverizerRecipe (int energy, ItemStack input, ItemStack primaryOutput, ItemStack secondaryOutput, int secondaryChance)
|
||||
{
|
||||
public static void addPulverizerRecipe(
|
||||
int energy, ItemStack input, ItemStack primaryOutput, ItemStack secondaryOutput, int secondaryChance) {
|
||||
|
||||
if (input == null || primaryOutput == null || secondaryOutput == null)
|
||||
{
|
||||
if (input == null || primaryOutput == null || secondaryOutput == null) {
|
||||
return;
|
||||
}
|
||||
NBTTagCompound toSend = new NBTTagCompound();
|
||||
@@ -63,23 +58,21 @@ public class TE4Helper
|
||||
FMLInterModComms.sendMessage("ThermalExpansion", "PulverizerRecipe", toSend);
|
||||
}
|
||||
|
||||
public static void addSawmillRecipe (int energy, ItemStack input, ItemStack primaryOutput)
|
||||
{
|
||||
public static void addSawmillRecipe(int energy, ItemStack input, ItemStack primaryOutput) {
|
||||
|
||||
addSawmillRecipe(energy, input, primaryOutput, null, 0);
|
||||
}
|
||||
|
||||
public static void addSawmillRecipe (int energy, ItemStack input, ItemStack primaryOutput, ItemStack secondaryOutput)
|
||||
{
|
||||
public static void addSawmillRecipe(
|
||||
int energy, ItemStack input, ItemStack primaryOutput, ItemStack secondaryOutput) {
|
||||
|
||||
addSawmillRecipe(energy, input, primaryOutput, secondaryOutput, 100);
|
||||
}
|
||||
|
||||
public static void addSawmillRecipe (int energy, ItemStack input, ItemStack primaryOutput, ItemStack secondaryOutput, int secondaryChance)
|
||||
{
|
||||
public static void addSawmillRecipe(
|
||||
int energy, ItemStack input, ItemStack primaryOutput, ItemStack secondaryOutput, int secondaryChance) {
|
||||
|
||||
if (input == null || primaryOutput == null || secondaryOutput == null)
|
||||
{
|
||||
if (input == null || primaryOutput == null || secondaryOutput == null) {
|
||||
return;
|
||||
}
|
||||
NBTTagCompound toSend = new NBTTagCompound();
|
||||
@@ -97,23 +90,31 @@ public class TE4Helper
|
||||
FMLInterModComms.sendMessage("ThermalExpansion", "SawmillRecipe", toSend);
|
||||
}
|
||||
|
||||
public static void addSmelterRecipe (int energy, ItemStack primaryInput, ItemStack secondaryInput, ItemStack primaryOutput)
|
||||
{
|
||||
public static void addSmelterRecipe(
|
||||
int energy, ItemStack primaryInput, ItemStack secondaryInput, ItemStack primaryOutput) {
|
||||
|
||||
addSmelterRecipe(energy, primaryInput, secondaryInput, primaryOutput, null, 0);
|
||||
}
|
||||
|
||||
public static void addSmelterRecipe (int energy, ItemStack primaryInput, ItemStack secondaryInput, ItemStack primaryOutput, ItemStack secondaryOutput)
|
||||
{
|
||||
public static void addSmelterRecipe(
|
||||
int energy,
|
||||
ItemStack primaryInput,
|
||||
ItemStack secondaryInput,
|
||||
ItemStack primaryOutput,
|
||||
ItemStack secondaryOutput) {
|
||||
|
||||
addSmelterRecipe(energy, primaryInput, secondaryInput, primaryOutput, secondaryOutput, 100);
|
||||
}
|
||||
|
||||
public static void addSmelterRecipe (int energy, ItemStack primaryInput, ItemStack secondaryInput, ItemStack primaryOutput, ItemStack secondaryOutput, int secondaryChance)
|
||||
{
|
||||
public static void addSmelterRecipe(
|
||||
int energy,
|
||||
ItemStack primaryInput,
|
||||
ItemStack secondaryInput,
|
||||
ItemStack primaryOutput,
|
||||
ItemStack secondaryOutput,
|
||||
int secondaryChance) {
|
||||
|
||||
if (primaryInput == null || secondaryInput == null || primaryOutput == null || secondaryOutput == null)
|
||||
{
|
||||
if (primaryInput == null || secondaryInput == null || primaryOutput == null || secondaryOutput == null) {
|
||||
return;
|
||||
}
|
||||
NBTTagCompound toSend = new NBTTagCompound();
|
||||
@@ -141,8 +142,7 @@ public class TE4Helper
|
||||
*
|
||||
* @param oreType
|
||||
*/
|
||||
public static void addSmelterBlastOre (String oreType)
|
||||
{
|
||||
public static void addSmelterBlastOre(String oreType) {
|
||||
|
||||
NBTTagCompound toSend = new NBTTagCompound();
|
||||
|
||||
@@ -151,11 +151,9 @@ public class TE4Helper
|
||||
FMLInterModComms.sendMessage("ThermalExpansion", "SmelterBlastOreType", toSend);
|
||||
}
|
||||
|
||||
public static void addCrucibleRecipe (int energy, ItemStack input, FluidStack output)
|
||||
{
|
||||
public static void addCrucibleRecipe(int energy, ItemStack input, FluidStack output) {
|
||||
|
||||
if (input == null || output == null)
|
||||
{
|
||||
if (input == null || output == null) {
|
||||
return;
|
||||
}
|
||||
NBTTagCompound toSend = new NBTTagCompound();
|
||||
@@ -170,11 +168,10 @@ public class TE4Helper
|
||||
FMLInterModComms.sendMessage("ThermalExpansion", "CrucibleRecipe", toSend);
|
||||
}
|
||||
|
||||
public static void addTransposerFill (int energy, ItemStack input, ItemStack output, FluidStack fluid, boolean reversible)
|
||||
{
|
||||
public static void addTransposerFill(
|
||||
int energy, ItemStack input, ItemStack output, FluidStack fluid, boolean reversible) {
|
||||
|
||||
if (input == null || output == null || fluid == null)
|
||||
{
|
||||
if (input == null || output == null || fluid == null) {
|
||||
return;
|
||||
}
|
||||
NBTTagCompound toSend = new NBTTagCompound();
|
||||
@@ -192,11 +189,10 @@ public class TE4Helper
|
||||
FMLInterModComms.sendMessage("ThermalExpansion", "TransposerFillRecipe", toSend);
|
||||
}
|
||||
|
||||
public static void addTransposerExtract (int energy, ItemStack input, ItemStack output, FluidStack fluid, int chance, boolean reversible)
|
||||
{
|
||||
public static void addTransposerExtract(
|
||||
int energy, ItemStack input, ItemStack output, FluidStack fluid, int chance, boolean reversible) {
|
||||
|
||||
if (input == null || output == null || fluid == null)
|
||||
{
|
||||
if (input == null || output == null || fluid == null) {
|
||||
return;
|
||||
}
|
||||
NBTTagCompound toSend = new NBTTagCompound();
|
||||
@@ -215,8 +211,7 @@ public class TE4Helper
|
||||
FMLInterModComms.sendMessage("ThermalExpansion", "TransposerExtractRecipe", toSend);
|
||||
}
|
||||
|
||||
public static void addMagmaticFuel (String fluidName, int energy)
|
||||
{
|
||||
public static void addMagmaticFuel(String fluidName, int energy) {
|
||||
|
||||
NBTTagCompound toSend = new NBTTagCompound();
|
||||
|
||||
@@ -226,8 +221,7 @@ public class TE4Helper
|
||||
FMLInterModComms.sendMessage("ThermalExpansion", "MagmaticFuel", toSend);
|
||||
}
|
||||
|
||||
public static void addCompressionFuel (String fluidName, int energy)
|
||||
{
|
||||
public static void addCompressionFuel(String fluidName, int energy) {
|
||||
|
||||
NBTTagCompound toSend = new NBTTagCompound();
|
||||
|
||||
@@ -237,8 +231,7 @@ public class TE4Helper
|
||||
FMLInterModComms.sendMessage("ThermalExpansion", "CompressionFuel", toSend);
|
||||
}
|
||||
|
||||
public static void addReactantFuel (String fluidName, int energy)
|
||||
{
|
||||
public static void addReactantFuel(String fluidName, int energy) {
|
||||
|
||||
NBTTagCompound toSend = new NBTTagCompound();
|
||||
|
||||
@@ -248,8 +241,7 @@ public class TE4Helper
|
||||
FMLInterModComms.sendMessage("ThermalExpansion", "ReactantFuel", toSend);
|
||||
}
|
||||
|
||||
public static void addCoolant (String fluidName, int energy)
|
||||
{
|
||||
public static void addCoolant(String fluidName, int energy) {
|
||||
|
||||
NBTTagCompound toSend = new NBTTagCompound();
|
||||
|
||||
|
||||
@@ -18,30 +18,79 @@ import tconstruct.tools.TinkerTools;
|
||||
import tconstruct.world.TinkerWorld;
|
||||
|
||||
@ObjectHolder(TConstruct.modID)
|
||||
@Pulse(id = "Tinkers TE4 Compatibility", description = "Tinkers Construct compatibility for Thermal Expansion", modsRequired = "ThermalExpansion", forced = true)
|
||||
public class TinkerTE4
|
||||
{
|
||||
@Pulse(
|
||||
id = "Tinkers TE4 Compatibility",
|
||||
description = "Tinkers Construct compatibility for Thermal Expansion",
|
||||
modsRequired = "ThermalExpansion",
|
||||
forced = true)
|
||||
public class TinkerTE4 {
|
||||
@Handler
|
||||
public void init ()
|
||||
{
|
||||
public void init() {
|
||||
TConstruct.logger.info("Thermal Expansion detected. Adding Pulverizer & Induction Smelter recipes");
|
||||
ItemStack crystalCinnabar = OreDictionary.getOres("crystalCinnabar").get(0);
|
||||
|
||||
TE4Helper.addPulverizerRecipe(1000, new ItemStack(TinkerTools.materials, 1, 11), new ItemStack(TinkerTools.materials, 1, 40), null, 0);
|
||||
TE4Helper.addPulverizerRecipe(1000, new ItemStack(TinkerTools.materials, 1, 3), new ItemStack(TinkerTools.materials, 1, 39), null, 0);
|
||||
TE4Helper.addPulverizerRecipe(1000, new ItemStack(TinkerTools.materials, 1, 4), new ItemStack(TinkerTools.materials, 1, 38), null, 0);
|
||||
TE4Helper.addPulverizerRecipe(
|
||||
1000,
|
||||
new ItemStack(TinkerTools.materials, 1, 11),
|
||||
new ItemStack(TinkerTools.materials, 1, 40),
|
||||
null,
|
||||
0);
|
||||
TE4Helper.addPulverizerRecipe(
|
||||
1000, new ItemStack(TinkerTools.materials, 1, 3), new ItemStack(TinkerTools.materials, 1, 39), null, 0);
|
||||
TE4Helper.addPulverizerRecipe(
|
||||
1000, new ItemStack(TinkerTools.materials, 1, 4), new ItemStack(TinkerTools.materials, 1, 38), null, 0);
|
||||
|
||||
TE4Helper.addPulverizerRecipe(12000, new ItemStack(TinkerWorld.oreSlag, 1, 1), new ItemStack(TinkerTools.materials, 2, 39), GameRegistry.findItemStack("ThermalExpansion", "dustIron", 1), 10);
|
||||
TE4Helper.addSmelterRecipe(12000, new ItemStack(TinkerWorld.oreSlag, 1, 1), crystalCinnabar.copy(), new ItemStack(TinkerTools.materials, 3, 3), new ItemStack(Items.iron_ingot), 100);
|
||||
TE4Helper.addPulverizerRecipe(12000, new ItemStack(TinkerWorld.oreSlag, 1, 2), new ItemStack(TinkerTools.materials, 2, 38), GameRegistry.findItemStack("ThermalExpansion", "dustGold", 1), 10);
|
||||
TE4Helper.addSmelterRecipe(12000, new ItemStack(TinkerWorld.oreSlag, 1, 2), crystalCinnabar.copy(), new ItemStack(TinkerTools.materials, 3, 4), new ItemStack(Items.gold_ingot), 100);
|
||||
TE4Helper.addPulverizerRecipe(
|
||||
12000,
|
||||
new ItemStack(TinkerWorld.oreSlag, 1, 1),
|
||||
new ItemStack(TinkerTools.materials, 2, 39),
|
||||
GameRegistry.findItemStack("ThermalExpansion", "dustIron", 1),
|
||||
10);
|
||||
TE4Helper.addSmelterRecipe(
|
||||
12000,
|
||||
new ItemStack(TinkerWorld.oreSlag, 1, 1),
|
||||
crystalCinnabar.copy(),
|
||||
new ItemStack(TinkerTools.materials, 3, 3),
|
||||
new ItemStack(Items.iron_ingot),
|
||||
100);
|
||||
TE4Helper.addPulverizerRecipe(
|
||||
12000,
|
||||
new ItemStack(TinkerWorld.oreSlag, 1, 2),
|
||||
new ItemStack(TinkerTools.materials, 2, 38),
|
||||
GameRegistry.findItemStack("ThermalExpansion", "dustGold", 1),
|
||||
10);
|
||||
TE4Helper.addSmelterRecipe(
|
||||
12000,
|
||||
new ItemStack(TinkerWorld.oreSlag, 1, 2),
|
||||
crystalCinnabar.copy(),
|
||||
new ItemStack(TinkerTools.materials, 3, 4),
|
||||
new ItemStack(Items.gold_ingot),
|
||||
100);
|
||||
|
||||
TE4Helper.addSmelterRecipe(4000, new ItemStack(TinkerTools.materials, 1, 4), new ItemStack(TinkerTools.materials, 1, 3), new ItemStack(TinkerTools.materials, 1, 5), null, 0);
|
||||
TE4Helper.addSmelterRecipe(4000, new ItemStack(TinkerTools.materials, 1, 9), new ItemStack(TinkerTools.materials, 3, 11), new ItemStack(TinkerTools.materials, 4, 14), null, 0);
|
||||
TE4Helper.addSmelterRecipe(
|
||||
4000,
|
||||
new ItemStack(TinkerTools.materials, 1, 4),
|
||||
new ItemStack(TinkerTools.materials, 1, 3),
|
||||
new ItemStack(TinkerTools.materials, 1, 5),
|
||||
null,
|
||||
0);
|
||||
TE4Helper.addSmelterRecipe(
|
||||
4000,
|
||||
new ItemStack(TinkerTools.materials, 1, 9),
|
||||
new ItemStack(TinkerTools.materials, 3, 11),
|
||||
new ItemStack(TinkerTools.materials, 4, 14),
|
||||
null,
|
||||
0);
|
||||
|
||||
// Dust Recipes
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(TinkerTools.materials, 1, 41), "dustArdite", "dustCobalt"));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(TinkerTools.materials, 4, 42), "dustAluminum", "dustAluminum", "dustAluminum", "dustCopper"));
|
||||
GameRegistry.addRecipe(
|
||||
new ShapelessOreRecipe(new ItemStack(TinkerTools.materials, 1, 41), "dustArdite", "dustCobalt"));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(
|
||||
new ItemStack(TinkerTools.materials, 4, 42),
|
||||
"dustAluminum",
|
||||
"dustAluminum",
|
||||
"dustAluminum",
|
||||
"dustCopper"));
|
||||
}
|
||||
|
||||
@Handler
|
||||
@@ -52,40 +101,47 @@ public class TinkerTE4
|
||||
|
||||
// selected fluid transposer recipies
|
||||
// tesseract
|
||||
ItemStack tesseractEmpty = GameRegistry.findItemStack("ThermalExpansion", "frameTesseractEmpty" ,1);
|
||||
ItemStack tesseractFull = GameRegistry.findItemStack("ThermalExpansion", "frameTesseractFull" ,1);
|
||||
TConstructRegistry.getBasinCasting().addCastingRecipe(tesseractFull, new FluidStack(enderFluid, 1000), tesseractEmpty, true, 300);
|
||||
ItemStack tesseractEmpty = GameRegistry.findItemStack("ThermalExpansion", "frameTesseractEmpty", 1);
|
||||
ItemStack tesseractFull = GameRegistry.findItemStack("ThermalExpansion", "frameTesseractFull", 1);
|
||||
TConstructRegistry.getBasinCasting()
|
||||
.addCastingRecipe(tesseractFull, new FluidStack(enderFluid, 1000), tesseractEmpty, true, 300);
|
||||
|
||||
// redstone energy cell
|
||||
ItemStack cellFrameEmpty = GameRegistry.findItemStack("ThermalExpansion", "frameCellReinforcedEmpty", 1);
|
||||
ItemStack cellFrameFull = GameRegistry.findItemStack("ThermalExpansion", "frameCellReinforcedFull", 1);
|
||||
TConstructRegistry.getBasinCasting().addCastingRecipe(cellFrameFull, new FluidStack(redstoneFluid, 4000), cellFrameEmpty, true, 100);
|
||||
TConstructRegistry.getBasinCasting()
|
||||
.addCastingRecipe(cellFrameFull, new FluidStack(redstoneFluid, 4000), cellFrameEmpty, true, 100);
|
||||
|
||||
cellFrameEmpty = GameRegistry.findItemStack("ThermalExpansion", "frameCellResonantEmpty", 1);
|
||||
if(cellFrameEmpty != null) {
|
||||
if (cellFrameEmpty != null) {
|
||||
cellFrameFull = GameRegistry.findItemStack("ThermalExpansion", "frameCellResonantFull", 1);
|
||||
TConstructRegistry.getBasinCasting().addCastingRecipe(cellFrameFull, new FluidStack(redstoneFluid, 4000), cellFrameEmpty, true, 100);
|
||||
TConstructRegistry.getBasinCasting()
|
||||
.addCastingRecipe(cellFrameFull, new FluidStack(redstoneFluid, 4000), cellFrameEmpty, true, 100);
|
||||
}
|
||||
|
||||
// glowstone illuminator
|
||||
ItemStack illuminatorEmpty = GameRegistry.findItemStack("ThermalExpansion", "frameIlluminator" ,1);
|
||||
ItemStack illuminator = GameRegistry.findItemStack("ThermalExpansion", "illuminator" ,1);
|
||||
TConstructRegistry.getBasinCasting().addCastingRecipe(illuminator, new FluidStack(glowstoneFluid, 1000), illuminatorEmpty, true, 300);
|
||||
ItemStack illuminatorEmpty = GameRegistry.findItemStack("ThermalExpansion", "frameIlluminator", 1);
|
||||
ItemStack illuminator = GameRegistry.findItemStack("ThermalExpansion", "illuminator", 1);
|
||||
TConstructRegistry.getBasinCasting()
|
||||
.addCastingRecipe(illuminator, new FluidStack(glowstoneFluid, 1000), illuminatorEmpty, true, 300);
|
||||
|
||||
// plates
|
||||
ItemStack plate = GameRegistry.findItemStack("ThermalExpansion", "plateFrame" ,1);
|
||||
ItemStack plateRedstone = GameRegistry.findItemStack("ThermalExpansion", "plateSignal" ,1);
|
||||
ItemStack plateGlowstone = GameRegistry.findItemStack("ThermalExpansion", "plateImpulse" ,1);
|
||||
ItemStack plateEnder = GameRegistry.findItemStack("ThermalExpansion", "plateTranslocate" ,1);
|
||||
ItemStack plate = GameRegistry.findItemStack("ThermalExpansion", "plateFrame", 1);
|
||||
ItemStack plateRedstone = GameRegistry.findItemStack("ThermalExpansion", "plateSignal", 1);
|
||||
ItemStack plateGlowstone = GameRegistry.findItemStack("ThermalExpansion", "plateImpulse", 1);
|
||||
ItemStack plateEnder = GameRegistry.findItemStack("ThermalExpansion", "plateTranslocate", 1);
|
||||
|
||||
TConstructRegistry.getTableCasting().addCastingRecipe(plateRedstone, new FluidStack(redstoneFluid, 1000), plate, true, 100);
|
||||
TConstructRegistry.getTableCasting().addCastingRecipe(plateGlowstone, new FluidStack(glowstoneFluid, 1000), plate, true, 100);
|
||||
TConstructRegistry.getTableCasting().addCastingRecipe(plateEnder, new FluidStack(enderFluid, 1000), plate, true, 100);
|
||||
TConstructRegistry.getTableCasting()
|
||||
.addCastingRecipe(plateRedstone, new FluidStack(redstoneFluid, 1000), plate, true, 100);
|
||||
TConstructRegistry.getTableCasting()
|
||||
.addCastingRecipe(plateGlowstone, new FluidStack(glowstoneFluid, 1000), plate, true, 100);
|
||||
TConstructRegistry.getTableCasting()
|
||||
.addCastingRecipe(plateEnder, new FluidStack(enderFluid, 1000), plate, true, 100);
|
||||
|
||||
// last but not least.. a really weird hardened glass recipe
|
||||
ItemStack hardenedGlass = GameRegistry.findItemStack("ThermalExpansion", "blockGlassHardened" ,1);
|
||||
ItemStack hardenedGlass = GameRegistry.findItemStack("ThermalExpansion", "blockGlassHardened", 1);
|
||||
ItemStack obsidian = new ItemStack(Blocks.obsidian);
|
||||
FluidStack lead = new FluidStack(TinkerSmeltery.moltenLeadFluid, TConstruct.ingotLiquidValue/2);
|
||||
FluidStack lead = new FluidStack(TinkerSmeltery.moltenLeadFluid, TConstruct.ingotLiquidValue / 2);
|
||||
TConstructRegistry.getBasinCasting().addCastingRecipe(hardenedGlass, lead, obsidian, true, 150);
|
||||
}
|
||||
}
|
||||
@@ -1,31 +1,29 @@
|
||||
package tconstruct.plugins.te4;
|
||||
|
||||
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.registry.GameRegistry;
|
||||
import mantle.pulsar.pulse.Handler;
|
||||
import mantle.pulsar.pulse.Pulse;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fluids.FluidRegistry;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import tconstruct.TConstruct;
|
||||
import tconstruct.library.TConstructRegistry;
|
||||
import tconstruct.library.crafting.FluidType;
|
||||
import tconstruct.library.crafting.LiquidCasting;
|
||||
import tconstruct.library.crafting.Smeltery;
|
||||
import tconstruct.smeltery.TinkerSmeltery;
|
||||
import tconstruct.world.TinkerWorld;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
@GameRegistry.ObjectHolder(TinkersThermalFoundation.TF_MOD_ID)
|
||||
@Pulse(id = "Tinkers Thermal Foundation Compatibility", description = "Tinkers Construct compatibility for Thermal Foundation", modsRequired = TinkersThermalFoundation.TF_MOD_ID, forced = true)
|
||||
@Pulse(
|
||||
id = "Tinkers Thermal Foundation Compatibility",
|
||||
description = "Tinkers Construct compatibility for Thermal Foundation",
|
||||
modsRequired = TinkersThermalFoundation.TF_MOD_ID,
|
||||
forced = true)
|
||||
public class TinkersThermalFoundation {
|
||||
static final String TF_MOD_ID = "ThermalFoundation";
|
||||
|
||||
@@ -52,32 +50,45 @@ public class TinkersThermalFoundation {
|
||||
Fluid glowstoneFluid = FluidRegistry.getFluid("glowstone");
|
||||
Fluid coalFluid = FluidRegistry.getFluid("coal");
|
||||
|
||||
//pyrotheum fuel
|
||||
// pyrotheum fuel
|
||||
// register pyrotheum if it's present
|
||||
Smeltery.addSmelteryFuel(pyrotheumFluid, 5000, 70); // pyrotheum lasts 3.5 seconds per 15 mb
|
||||
|
||||
// liquid redstone
|
||||
for(ItemStack stack : OreDictionary.getOres("blockRedstone"))
|
||||
Smeltery.addMelting(stack, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 3000, new FluidStack(redstoneFluid, 900));
|
||||
for(ItemStack stack : OreDictionary.getOres("dustRedstone"))
|
||||
Smeltery.addMelting(stack, Blocks.redstone_block, stack.getItemDamage(), 2500, new FluidStack(redstoneFluid, 100));
|
||||
for (ItemStack stack : OreDictionary.getOres("blockRedstone"))
|
||||
Smeltery.addMelting(
|
||||
stack,
|
||||
Block.getBlockFromItem(stack.getItem()),
|
||||
stack.getItemDamage(),
|
||||
3000,
|
||||
new FluidStack(redstoneFluid, 900));
|
||||
for (ItemStack stack : OreDictionary.getOres("dustRedstone"))
|
||||
Smeltery.addMelting(
|
||||
stack, Blocks.redstone_block, stack.getItemDamage(), 2500, new FluidStack(redstoneFluid, 100));
|
||||
|
||||
// liquid glowstone
|
||||
for(ItemStack stack : OreDictionary.getOres("glowstone"))
|
||||
Smeltery.addMelting(stack, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 3000, new FluidStack(glowstoneFluid, 1000));
|
||||
for(ItemStack stack : OreDictionary.getOres("dustGlowstone"))
|
||||
Smeltery.addMelting(stack, Blocks.glowstone, stack.getItemDamage(), 2500, new FluidStack(glowstoneFluid, 250));
|
||||
for (ItemStack stack : OreDictionary.getOres("glowstone"))
|
||||
Smeltery.addMelting(
|
||||
stack,
|
||||
Block.getBlockFromItem(stack.getItem()),
|
||||
stack.getItemDamage(),
|
||||
3000,
|
||||
new FluidStack(glowstoneFluid, 1000));
|
||||
for (ItemStack stack : OreDictionary.getOres("dustGlowstone"))
|
||||
Smeltery.addMelting(
|
||||
stack, Blocks.glowstone, stack.getItemDamage(), 2500, new FluidStack(glowstoneFluid, 250));
|
||||
|
||||
// liquid pyrotheum
|
||||
for(ItemStack stack : OreDictionary.getOres("dustPyrotheum"))
|
||||
Smeltery.addMelting(stack, Blocks.glowstone, stack.getItemDamage(), 1299, new FluidStack(pyrotheumFluid, 100));
|
||||
for (ItemStack stack : OreDictionary.getOres("dustPyrotheum"))
|
||||
Smeltery.addMelting(
|
||||
stack, Blocks.glowstone, stack.getItemDamage(), 1299, new FluidStack(pyrotheumFluid, 100));
|
||||
|
||||
// liquid cryotheum
|
||||
for(ItemStack stack : OreDictionary.getOres("dustCryotheum"))
|
||||
for (ItemStack stack : OreDictionary.getOres("dustCryotheum"))
|
||||
Smeltery.addMelting(stack, Blocks.snow, stack.getItemDamage(), 4000, new FluidStack(cryotheumFluid, 100));
|
||||
|
||||
// liquid coal
|
||||
for(ItemStack stack : OreDictionary.getOres("dustCoal"))
|
||||
for (ItemStack stack : OreDictionary.getOres("dustCoal"))
|
||||
Smeltery.addMelting(stack, Blocks.coal_block, stack.getItemDamage(), 4000, new FluidStack(coalFluid, 100));
|
||||
|
||||
// Alloying
|
||||
@@ -118,12 +129,11 @@ public class TinkersThermalFoundation {
|
||||
Smeltery.addAlloyMixing(result, part1, part2, part3, new FluidStack(TinkerSmeltery.moltenEnderFluid, 1000));
|
||||
}
|
||||
|
||||
|
||||
private void registerFluidType(String name, int temp, Fluid fluid) {
|
||||
ItemStack stack = GameRegistry.findItemStack(TF_MOD_ID, "block" + name, 1);
|
||||
if(stack == null || stack.getItem() == null)
|
||||
stack = new ItemStack(TinkerWorld.metalBlock);
|
||||
if (stack == null || stack.getItem() == null) stack = new ItemStack(TinkerWorld.metalBlock);
|
||||
|
||||
FluidType.registerFluidType(name, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), temp, fluid, false);
|
||||
FluidType.registerFluidType(
|
||||
name, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), temp, fluid, false);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user