Skip to content

Commit

Permalink
Add IMC for smeltery fuel
Browse files Browse the repository at this point in the history
  • Loading branch information
bonii-xx committed Oct 14, 2014
1 parent a02db1c commit acd2a00
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/main/java/tconstruct/util/IMCHandler.java
Expand Up @@ -196,6 +196,29 @@ else if(type.equals("addSmelteryMelting")) {
Smeltery.addMelting(item, Block.getBlockFromItem(block.getItem()), block.getItemDamage(), temperature, liquid);
TConstruct.logger.info("Smeltery IMC: Added melting: " + item.getDisplayName() + " to " + liquid.amount + "mb " + liquid.getLocalizedName());
}
else if(type.equals("addSmelteryFuel")) {
if (!message.isNBTMessage()) {
logInvalidMessage(message);
continue;
}
NBTTagCompound tag = message.getNBTValue();

if (!checkRequiredTags("Smeltery", tag, "FluidName", "Temperature", "Duration"))
continue;

FluidStack liquid = FluidStack.loadFluidStackFromNBT(tag);
if(liquid == null) {
TConstruct.logger.error("Smeltery IMC: No fluid found");
continue;
}

int temperature = tag.getInteger("Temperature");
int duration = tag.getInteger("Duration");

Smeltery.addSmelteryFuel(liquid.getFluid(), temperature, duration);

TConstruct.logger.info("Smeltery IMC: Added fuel: " + liquid.getLocalizedName() + " (" + temperature + ", " + duration + ")");
}
}
}

Expand Down

0 comments on commit acd2a00

Please sign in to comment.