mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-28 07:56:01 +00:00
Toolparts melting & NEI Smeltery fix
This commit is contained in:
1 parent
49b9d09fd8
commit
9a31ca5774
9 files changed
+835
-1569
No files matched your search
@@ -75,7 +75,7 @@ block.brick.stone.refined.name=Polierter Steinziegel
|
||||
block.brick.redstone.name=Redstoneziegel
|
||||
block.brick.bone.name=Knochenziegel
|
||||
block.brick.slime.name=Schleimziegel
|
||||
block.brick.blueslime.name=Blauer Schleimziegel
|
||||
block.brick.blueslime.name=Blauschleimziegel
|
||||
block.brick.endstone.name=Enderziegel
|
||||
block.brick.obsidian.ingot.name=Obsidianziegel
|
||||
|
||||
@@ -90,7 +90,7 @@ block.fancybrick.stone.refined.name=Polierter schöner Steinziegel
|
||||
block.fancybrick.redstone.name=Schöner Redstoneziegel
|
||||
block.fancybrick.bone.name=Schöner Knochenziegel
|
||||
block.fancybrick.slime.name=Schöner Schleimziegel
|
||||
block.fancybrick.blueslime.name=Schöner blauer Schleimziegel
|
||||
block.fancybrick.blueslime.name=Schöner Blauschleimziegel
|
||||
block.fancybrick.endstone.name=Schöner Enderziegel
|
||||
block.fancybrick.obsidian.ingot.name=Schöner Obsidianziegel
|
||||
block.fancybrick.stone.road.name=Steinstraße
|
||||
@@ -219,7 +219,7 @@ item.tconstruct.Materials.BronzeIngot.name=Bronzebarren
|
||||
item.tconstruct.Materials.AluBrassIngot.name=Duraluminiumbarren
|
||||
item.tconstruct.Materials.AlumiteIngot.name=Alumitbarren
|
||||
item.tconstruct.Materials.SteelIngot.name=Stahlbarren
|
||||
item.tconstruct.Materials.BlueSlimeCrystal.name=Blauer Schleimkristall
|
||||
item.tconstruct.Materials.BlueSlimeCrystal.name=Blauschleimkristall
|
||||
item.tconstruct.Materials.ObsidianIngot.name=Obsidianbarren
|
||||
item.tconstruct.Materials.IronNugget.name=Eisenklumpen
|
||||
item.tconstruct.Materials.CopperNugget.name=Kupferklumpen
|
||||
@@ -356,17 +356,17 @@ block.soil.slab.dirt.name=Erdstufe
|
||||
block.soil.slab.mycelium.name=Myzelstufe
|
||||
block.soil.slab.slime.name=Schleimige Matschstufe
|
||||
block.soil.slab.grout.name=Mörtelstufe
|
||||
block.soil.slab.blueslime.name=Schleimige Matschstufe (blau)
|
||||
block.soil.slab.blueslime.name=Schleimige Matschstufe (Blau)
|
||||
block.soil.slab.graveyardsoil.name=Friedhofserdenstufe
|
||||
block.soil.slab.consecratedsoil.name=Gesegnete Erdstufe
|
||||
|
||||
block.slime.soil.blue.name=Blaue Schleimerde
|
||||
block.slime.soil.blue.name=Blauschleimerde
|
||||
block.slime.leaves.blue.name=Schleimige Blätter
|
||||
block.slime.sapling.bluegreen.name=Schleimiger Setzling
|
||||
block.slime.grass.blue.name=Schleimiges Gras
|
||||
block.slime.grass.dirt.name=Schleimiges Gras
|
||||
block.slime.tallgrass.name=Schleimiges Gras
|
||||
block.slime.congealed.blue.name=Erstarrter Blauer Schleim
|
||||
block.slime.congealed.blue.name=Erstarrter Blauschleim
|
||||
block.slime.congealed.green.name=Erstarrter Grüner Schleim
|
||||
|
||||
item.tconstruct.storage.knapsack.name=Rucksack
|
||||
@@ -438,6 +438,7 @@ tile.metal.molten.shiny.name=Geschmolzenes Platin
|
||||
tile.metal.molten.invar.name=Geschmolzenes Invar
|
||||
tile.metal.molten.Electrum.name=Geschmolzenes Elektrum
|
||||
tile.fluid.ender.name=Verflüssigtes Ender
|
||||
tile.liquid.slime.name=Verflüssigter Schleim
|
||||
|
||||
LiquidMetal.Iron.name=Geschmolzenes Eisen
|
||||
LiquidMetal.Gold.name=Geschmolzenes Gold
|
||||
@@ -475,7 +476,7 @@ SearedBlock.Table.name=Gusstisch
|
||||
SearedBlock.Faucet.name=Zapfhahn
|
||||
SearedBlock.Basin.name=Gussbecken
|
||||
|
||||
entity.TConstruct.EdibleSlime.name=Blauer Schleim
|
||||
entity.TConstruct.EdibleSlime.name=Blauschleim
|
||||
entity.TConstruct.KingSlime.name=Königsschleim
|
||||
entity.TConstruct.Gardeslime.name=Guardeschleim
|
||||
entity.TConstruct.MiniGardy.name=Guardeschleim
|
||||
@@ -562,3 +563,4 @@ fluid.platinum.molten=Geschmolzenes Platin
|
||||
fluid.invar=Geschmolzenes Invar
|
||||
fluid.electrum=Geschmolzenes Elektrum
|
||||
fluid.ender=Flüssiges Ender
|
||||
fluid.slime.blue=Flüssiger Blauschleim
|
||||
@@ -439,6 +439,7 @@ tile.metal.molten.shiny.name=Molten Shiny
|
||||
tile.metal.molten.invar.name=Molten Invar
|
||||
tile.metal.molten.Electrum.name=Molten Electrum
|
||||
tile.fluid.ender.name=Liquified Ender
|
||||
tile.liquid.slime.name=Liquified Slime
|
||||
|
||||
LiquidMetal.Iron.name=Molten Iron
|
||||
LiquidMetal.Gold.name=Molten Gold
|
||||
@@ -563,3 +564,4 @@ fluid.platinum.molten=Molten Platinum
|
||||
fluid.invar=Molten Invar
|
||||
fluid.shiny=Molten Shiny
|
||||
fluid.ender=Liquid Ender
|
||||
fluid.slime.blue=Liquid Blueslime
|
||||
@@ -7,6 +7,9 @@ import cpw.mods.fml.common.event.*;
|
||||
import cpw.mods.fml.common.network.*;
|
||||
import cpw.mods.fml.common.registry.*;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import net.minecraft.crash.CallableMinecraftVersion;
|
||||
import net.minecraft.world.gen.structure.MapGenStructureIO;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
@@ -23,10 +26,6 @@ import tconstruct.util.player.TPlayerHandler;
|
||||
import tconstruct.worldgen.*;
|
||||
import tconstruct.worldgen.village.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
/** TConstruct, the tool mod.
|
||||
* Craft your tools with style, then modify until the original is gone!
|
||||
* @author mDiyo
|
||||
@@ -38,6 +37,11 @@ public class TConstruct
|
||||
{
|
||||
/** The value of one ingot in millibuckets */
|
||||
public static final int ingotLiquidValue = 144;
|
||||
public static final int oreLiquidValue = ingotLiquidValue * 2;
|
||||
public static final int blockLiquidValue = ingotLiquidValue * 9;
|
||||
public static final int chunkLiquidValue = ingotLiquidValue / 2;
|
||||
public static final int nuggetLiquidValue = ingotLiquidValue / 9;
|
||||
|
||||
public static final int liquidUpdateAmount = 6;
|
||||
|
||||
// Shared mod logger
|
||||
@@ -83,7 +87,6 @@ public class TConstruct
|
||||
content = new TContent();
|
||||
|
||||
events = new TEventHandler();
|
||||
events.unfuxOreDictionary();
|
||||
MinecraftForge.EVENT_BUS.register(events);
|
||||
content.oreRegistry();
|
||||
|
||||
@@ -148,7 +151,7 @@ public class TConstruct
|
||||
Behavior.registerBuiltInBehaviors();
|
||||
SpecialStackHandler.registerBuiltInStackHandlers();
|
||||
content.modIntegration();
|
||||
TContent.modRecipes();
|
||||
content.addOreDictionarySmelteryRecipes();
|
||||
content.createEntities();
|
||||
content.modRecipes();
|
||||
}
|
||||
|
||||
+599
-490
File diff suppressed because it is too large.
Load diff
@@ -2,12 +2,11 @@ package tconstruct.items;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import tconstruct.common.TContent;
|
||||
import tconstruct.library.util.IToolPart;
|
||||
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import tconstruct.common.TContent;
|
||||
import tconstruct.library.util.IToolPart;
|
||||
|
||||
public class ToolPart extends CraftingItem implements IToolPart
|
||||
{
|
||||
@@ -29,7 +28,7 @@ public class ToolPart extends CraftingItem implements IToolPart
|
||||
name = name.replaceAll("%%material", material);
|
||||
|
||||
return name;
|
||||
|
||||
|
||||
/*StringBuilder builder = new StringBuilder();
|
||||
builder.append(StatCollector.translateToLocal("parttype." + toolTextureNames[par1ItemStack.getItemDamage()])).append(" ").append(StatCollector.translateToLocal("toolpart." + partName));
|
||||
return builder.toString();
|
||||
@@ -64,9 +63,10 @@ public class ToolPart extends CraftingItem implements IToolPart
|
||||
public static final String[] toolTextureNames = new String[] { "wood", "stone", "iron", "flint", "cactus", "bone", "obsidian", "netherrack", "slime", "paper", "cobalt", "ardite", "manyullyn",
|
||||
"copper", "bronze", "alumite", "steel", "blueslime", "", "", "", "", "", "", "", "", "", "", "", "", "", "thaumium" };
|
||||
|
||||
@Override
|
||||
public void getSubItems (int id, CreativeTabs tab, List list)
|
||||
{
|
||||
for (int i = 0; i < 17; i++)
|
||||
for (int i = 0; i < 18; i++)
|
||||
list.add(new ItemStack(id, 1, i));
|
||||
|
||||
if (TContent.thaumcraftAvailable)
|
||||
|
||||
@@ -0,0 +1,92 @@
|
||||
package tconstruct.library.crafting;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraftforge.fluids.*;
|
||||
import tconstruct.common.TContent;
|
||||
|
||||
public enum FluidType
|
||||
{
|
||||
/** Vanilla Water Smelting **/
|
||||
Water(Block.snow.blockID, 0, 20, FluidRegistry.getFluid("water")),
|
||||
/** Iron Smelting **/
|
||||
Iron(Block.oreIron.blockID, 0, 600, TContent.moltenIronFluid),
|
||||
/** Gold Smelting **/
|
||||
Gold(Block.oreGold.blockID, 0, 400, TContent.moltenGoldFluid),
|
||||
/** Tin Smelting **/
|
||||
Tin(TContent.oreSlag.blockID, 4, 400, TContent.moltenTinFluid),
|
||||
/** Copper Smelting **/
|
||||
Copper(TContent.oreSlag.blockID, 3, 550, TContent.moltenCopperFluid),
|
||||
/** Aluminum Smelting **/
|
||||
Aluminum(TContent.oreSlag.blockID, 5, 350, TContent.moltenAluminumFluid), NaturalAluminum(TContent.oreSlag.blockID, 5, 350, TContent.moltenAluminumFluid),
|
||||
/** Cobalt Smelting **/
|
||||
Cobalt(TContent.oreSlag.blockID, 1, 650, TContent.moltenCobaltFluid),
|
||||
/** Ardite Smelting **/
|
||||
Ardite(TContent.oreSlag.blockID, 2, 650, TContent.moltenArditeFluid),
|
||||
/** AluminumBrass Smelting **/
|
||||
AluminumBrass(TContent.metalBlock.blockID, 7, 350, TContent.moltenAlubrassFluid),
|
||||
/** Alumite Smelting **/
|
||||
Alumite(TContent.metalBlock.blockID, 0, 800, TContent.moltenAlumiteFluid),
|
||||
/** Manyullyn Smelting **/
|
||||
Manyullyn(TContent.metalBlock.blockID, 2, 750, TContent.moltenManyullynFluid),
|
||||
/** Bronze Smelting **/
|
||||
Bronze(TContent.metalBlock.blockID, 4, 500, TContent.moltenBronzeFluid),
|
||||
/** Steel Smelting **/
|
||||
Steel(TContent.metalBlock.blockID, 9, 700, TContent.moltenSteelFluid),
|
||||
/** Nickel Smelting **/
|
||||
Nickel(TContent.metalBlock.blockID, 0, 400, TContent.moltenNickelFluid),
|
||||
/** Lead Smelting **/
|
||||
Lead(TContent.metalBlock.blockID, 0, 400, TContent.moltenLeadFluid),
|
||||
/** Silver Smelting **/
|
||||
Silver(TContent.metalBlock.blockID, 0, 400, TContent.moltenSilverFluid),
|
||||
/** Platinum Smelting **/
|
||||
Platinum(TContent.metalBlock.blockID, 0, 400, TContent.moltenShinyFluid),
|
||||
/** Invar Smelting **/
|
||||
Invar(TContent.metalBlock.blockID, 0, 400, TContent.moltenInvarFluid),
|
||||
/** Electrum Smelting **/
|
||||
Electrum(TContent.metalBlock.blockID, 0, 400, TContent.moltenElectrumFluid),
|
||||
/** Obsidian Smelting **/
|
||||
Obsidian(Block.obsidian.blockID, 0, 750, TContent.moltenObsidianFluid),
|
||||
/** Ender Smelting **/
|
||||
Ender(TContent.metalBlock.blockID, 10, 500, TContent.moltenEnderFluid),
|
||||
/** Glass Smelting **/
|
||||
Glass(Block.glass.blockID, 0, 625, TContent.moltenGlassFluid),
|
||||
/** Stone Smelting **/
|
||||
Stone(Block.stone.blockID, 0, 800, TContent.moltenStoneFluid),
|
||||
/** Emerald Smelting **/
|
||||
Emerald(Block.oreEmerald.blockID, 0, 575, TContent.moltenEmeraldFluid),
|
||||
/** Slime Smelting **/
|
||||
Slime(TContent.slimeGel.blockID, 0, 250, TContent.blueSlimeFluid);
|
||||
|
||||
public final int renderBlockID;
|
||||
public final int renderMeta;
|
||||
public final int baseTemperature;
|
||||
public final Fluid fluid;
|
||||
|
||||
FluidType(int blockID, int meta, int baseTemperature, Fluid fluid)
|
||||
{
|
||||
this.renderBlockID = blockID;
|
||||
this.renderMeta = meta;
|
||||
this.baseTemperature = baseTemperature;
|
||||
this.fluid = fluid;
|
||||
}
|
||||
|
||||
public static FluidType getFluidType (Fluid searchedFluid)
|
||||
{
|
||||
for (FluidType ft : values())
|
||||
{
|
||||
if (ft.fluid.getBlockID() == searchedFluid.getBlockID())
|
||||
return ft;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static int getTemperatureByFluid (Fluid searchedFluid)
|
||||
{
|
||||
for (FluidType ft : values())
|
||||
{
|
||||
if (ft.fluid.getBlockID() == searchedFluid.getBlockID())
|
||||
return ft.baseTemperature;
|
||||
}
|
||||
return 800;
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,7 @@
|
||||
package tconstruct.library.crafting;
|
||||
|
||||
import tconstruct.library.client.FluidRenderProperties.Applications;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import tconstruct.library.client.FluidRenderProperties;
|
||||
@@ -11,7 +10,17 @@ import tconstruct.library.client.FluidRenderProperties;
|
||||
public class LiquidCasting
|
||||
{
|
||||
//public static LiquidCasting instance = new LiquidCasting();
|
||||
private ArrayList<CastingRecipe> casts = new ArrayList<CastingRecipe>();
|
||||
private final ArrayList<CastingRecipe> casts = new ArrayList<CastingRecipe>();
|
||||
|
||||
private boolean contains (CastingRecipe recipe)
|
||||
{
|
||||
for (CastingRecipe c : casts)
|
||||
{
|
||||
if (c.matches(recipe.castingMetal, recipe.cast))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/** Adds a casting recipe
|
||||
*
|
||||
@@ -22,10 +31,13 @@ public class LiquidCasting
|
||||
* @param delay Time to cast in ticks
|
||||
* @param props The rendering properties for the casting fluid (may be null)
|
||||
*/
|
||||
public void addCastingRecipe (ItemStack output, FluidStack metal, ItemStack cast, boolean consume, int delay, FluidRenderProperties props){
|
||||
casts.add(new CastingRecipe(output, metal, cast, consume, delay, props));
|
||||
public void addCastingRecipe (ItemStack output, FluidStack metal, ItemStack cast, boolean consume, int delay, FluidRenderProperties props)
|
||||
{
|
||||
CastingRecipe cr = new CastingRecipe(output, metal, cast, consume, delay, props);
|
||||
if (!contains(cr))
|
||||
casts.add(cr);
|
||||
}
|
||||
|
||||
|
||||
/** Adds a casting recipe
|
||||
*
|
||||
* @param output Result of the cast
|
||||
@@ -34,7 +46,8 @@ public class LiquidCasting
|
||||
* @param consume Whether the item should be consumed while casting
|
||||
* @param delay Time to cast in ticks
|
||||
*/
|
||||
public void addCastingRecipe (ItemStack output, FluidStack metal, ItemStack cast, boolean consume, int delay){
|
||||
public void addCastingRecipe (ItemStack output, FluidStack metal, ItemStack cast, boolean consume, int delay)
|
||||
{
|
||||
addCastingRecipe(output, metal, cast, consume, delay, null);
|
||||
}
|
||||
|
||||
@@ -46,10 +59,11 @@ public class LiquidCasting
|
||||
* @param delay Time to cast in ticks
|
||||
* @param props The rendering properties for the casting fluid (may be null)
|
||||
*/
|
||||
public void addCastingRecipe (ItemStack output, FluidStack metal, ItemStack cast, int delay, FluidRenderProperties props){
|
||||
public void addCastingRecipe (ItemStack output, FluidStack metal, ItemStack cast, int delay, FluidRenderProperties props)
|
||||
{
|
||||
addCastingRecipe(output, metal, cast, false, delay, props);
|
||||
}
|
||||
|
||||
|
||||
/** Adds a casting recipe. Does not consume the cast
|
||||
*
|
||||
* @param output Result of the cast
|
||||
@@ -57,7 +71,8 @@ public class LiquidCasting
|
||||
* @param cast The empty item to cast with. ex Ingot Cast
|
||||
* @param delay Time to cast in ticks
|
||||
*/
|
||||
public void addCastingRecipe (ItemStack output, FluidStack metal, ItemStack cast, int delay){
|
||||
public void addCastingRecipe (ItemStack output, FluidStack metal, ItemStack cast, int delay)
|
||||
{
|
||||
addCastingRecipe(output, metal, cast, false, delay, null);
|
||||
}
|
||||
|
||||
@@ -68,17 +83,19 @@ public class LiquidCasting
|
||||
* @param delay Time to cast in ticks
|
||||
* @param props The rendering properties for the casting fluid (may be null)
|
||||
*/
|
||||
public void addCastingRecipe (ItemStack output, FluidStack metal, int delay, FluidRenderProperties props){
|
||||
public void addCastingRecipe (ItemStack output, FluidStack metal, int delay, FluidRenderProperties props)
|
||||
{
|
||||
addCastingRecipe(output, metal, null, false, delay, props);
|
||||
}
|
||||
|
||||
|
||||
/** Adds a casting recipe. Does not consume the cast or have an item to cast against
|
||||
*
|
||||
* @param output Result of the cast
|
||||
* @param metal Liquid to be used in casting. This also decides how much metal is consumed
|
||||
* @param delay Time to cast in ticks
|
||||
*/
|
||||
public void addCastingRecipe (ItemStack output, FluidStack metal, int delay){
|
||||
public void addCastingRecipe (ItemStack output, FluidStack metal, int delay)
|
||||
{
|
||||
addCastingRecipe(output, metal, null, false, delay, null);
|
||||
}
|
||||
|
||||
@@ -87,21 +104,24 @@ public class LiquidCasting
|
||||
casts.add(recipe);
|
||||
}
|
||||
|
||||
public int getCastingDelay (FluidStack metal, ItemStack cast){
|
||||
public int getCastingDelay (FluidStack metal, ItemStack cast)
|
||||
{
|
||||
CastingRecipe recipe = getCastingRecipe(metal, cast);
|
||||
if (recipe != null)
|
||||
return recipe.coolTime;
|
||||
return -1;
|
||||
}
|
||||
|
||||
public int getCastingAmount (FluidStack metal, ItemStack cast){
|
||||
public int getCastingAmount (FluidStack metal, ItemStack cast)
|
||||
{
|
||||
CastingRecipe recipe = getCastingRecipe(metal, cast);
|
||||
if (recipe != null)
|
||||
return recipe.castingMetal.amount;
|
||||
return 0;
|
||||
}
|
||||
|
||||
public CastingRecipe getCastingRecipe (FluidStack metal, ItemStack cast){
|
||||
public CastingRecipe getCastingRecipe (FluidStack metal, ItemStack cast)
|
||||
{
|
||||
for (CastingRecipe recipe : casts)
|
||||
{
|
||||
if (recipe.matches(metal, cast))
|
||||
@@ -111,7 +131,8 @@ public class LiquidCasting
|
||||
}
|
||||
|
||||
//Getter for public viewing
|
||||
public ArrayList<CastingRecipe> getCastingRecipes (){
|
||||
public ArrayList<CastingRecipe> getCastingRecipes ()
|
||||
{
|
||||
return casts;
|
||||
}
|
||||
}
|
||||
@@ -1,23 +1,21 @@
|
||||
package tconstruct.library.crafting;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
/** Melting and hacking, churn and burn */
|
||||
public class Smeltery
|
||||
{
|
||||
public static Smeltery instance = new Smeltery();
|
||||
|
||||
private HashMap<List<Integer>, FluidStack> smeltingList = new HashMap<List<Integer>, FluidStack>();
|
||||
private HashMap<List<Integer>, Integer> temperatureList = new HashMap<List<Integer>, Integer>();
|
||||
private HashMap<List<Integer>, ItemStack> renderIndex = new HashMap<List<Integer>, ItemStack>();
|
||||
private ArrayList<AlloyMix> alloys = new ArrayList<AlloyMix>();
|
||||
private final HashMap<List<Integer>, FluidStack> smeltingList = new HashMap<List<Integer>, FluidStack>();
|
||||
private final HashMap<List<Integer>, Integer> temperatureList = new HashMap<List<Integer>, Integer>();
|
||||
private final HashMap<List<Integer>, ItemStack> renderIndex = new HashMap<List<Integer>, ItemStack>();
|
||||
private final ArrayList<AlloyMix> alloys = new ArrayList<AlloyMix>();
|
||||
|
||||
/** Adds mappings between an itemstack and an output liquid
|
||||
* Example: Smeltery.addMelting(Block.oreIron, 0, 600, new FluidStack(liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 2, 0));
|
||||
@@ -114,7 +112,7 @@ public class Smeltery
|
||||
if (item == null)
|
||||
return null;
|
||||
|
||||
FluidStack stack = (FluidStack) instance.smeltingList.get(Arrays.asList(item.itemID, item.getItemDamage()));
|
||||
FluidStack stack = instance.smeltingList.get(Arrays.asList(item.itemID, item.getItemDamage()));
|
||||
if (stack == null)
|
||||
return null;
|
||||
return stack.copy();
|
||||
@@ -127,7 +125,7 @@ public class Smeltery
|
||||
*/
|
||||
public static FluidStack getSmelteryResult (int blockID, int metadata)
|
||||
{
|
||||
FluidStack stack = (FluidStack) instance.smeltingList.get(Arrays.asList(blockID, metadata));
|
||||
FluidStack stack = instance.smeltingList.get(Arrays.asList(blockID, metadata));
|
||||
if (stack == null)
|
||||
return null;
|
||||
return stack.copy();
|
||||
@@ -169,4 +167,39 @@ public class Smeltery
|
||||
{
|
||||
return instance.alloys;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a mapping between FluidType and ItemStack
|
||||
*
|
||||
* @author samtrion
|
||||
*
|
||||
* @param type Type of Fluid
|
||||
* @param input The item to liquify
|
||||
* @param temperatureDifference Difference between FluidType BaseTemperature
|
||||
* @param fluidAmount Amount of Fluid
|
||||
*/
|
||||
public static void addMelting (FluidType type, ItemStack input, int temperatureDifference, int fluidAmount)
|
||||
{
|
||||
int temp = type.baseTemperature + temperatureDifference;
|
||||
if (temp <= 20)
|
||||
temp = type.baseTemperature;
|
||||
|
||||
addMelting(input, type.renderBlockID, type.renderMeta, type.baseTemperature + temperatureDifference, new FluidStack(type.fluid, fluidAmount));
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds all Items to the Smeltery based on the oreDictionary Name
|
||||
*
|
||||
* @author samtrion
|
||||
*
|
||||
* @param oreName oreDictionary name e.g. oreIron
|
||||
* @param type Type of Fluid
|
||||
* @param temperatureDifference Difference between FluidType BaseTemperature
|
||||
* @param fluidAmount Amount of Fluid
|
||||
*/
|
||||
public static void addDictionaryMelting (String oreName, FluidType type, int temperatureDifference, int fluidAmount)
|
||||
{
|
||||
for (ItemStack is : OreDictionary.getOres(oreName))
|
||||
addMelting(type, is, temperatureDifference, fluidAmount);
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user