Add IMC for smeltery fuel

This commit is contained in:
Bernhard Bonigl committed 2014-10-14 22:54:15 +02:00
1 parent a02db1ce73
commit acd2a00ade
1 file changed
+23
@@ -196,6 +196,29 @@ public final class IMCHandler {
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 + ")");
}
}
}