Skip to content

Commit

Permalink
Add FluidType when getting a melting-IMC. Melting IMCs should be sent…
Browse files Browse the repository at this point in the history
… before partcasting IMC for it to have the correct
  • Loading branch information
bonii-xx committed Feb 27, 2015
1 parent 6964434 commit ff0df97
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/main/java/tconstruct/util/IMCHandler.java
Expand Up @@ -185,7 +185,7 @@ else if(type.equals("addPartCastingMaterial"))
newRecipies.add(recipe);
}

FluidType ft = FluidType.getFluidType(liquid.getFluid().getName());
FluidType ft = FluidType.getFluidType(liquid.getFluid());
if(ft == null) {
ft = new FluidType(TinkerSmeltery.glueBlock, 0, 500, liquid.getFluid(), true);
FluidType.registerFluidType(liquid.getFluid().getName(), ft);
Expand Down Expand Up @@ -272,8 +272,11 @@ else if(type.equals("addSmelteryMelting")) {
ItemStack item = ItemStack.loadItemStackFromNBT(tag.getCompoundTag("Item"));
ItemStack block = ItemStack.loadItemStackFromNBT(tag.getCompoundTag("Block"));
int temperature = tag.getInteger("Temperature");

if(FluidType.getFluidType(liquid.getFluid()) == null)
FluidType.registerFluidType(liquid.getFluid().getName(), Block.getBlockFromItem(block.getItem()), block.getItemDamage(), temperature, liquid.getFluid(), false);

Smeltery.addMelting(item, Block.getBlockFromItem(block.getItem()), block.getItemDamage(), temperature, liquid);
Smeltery.addMelting(Block.getBlockFromItem(block.getItem()), block.getItemDamage(), temperature, liquid);
TConstruct.logger.debug("Smeltery IMC: Added melting: " + item.getDisplayName() + " to " + liquid.amount + "mb " + liquid.getLocalizedName());
}
else if(type.equals("addSmelteryFuel")) {
Expand Down

0 comments on commit ff0df97

Please sign in to comment.