public static void addPulverizerRecipe(int energy, ItemStack input, ItemStack primaryOutput, ItemStack secondaryOutput, int secondaryChance) {
if (input == null || primaryOutput == null) {
return;
}
NBTTagCompound toSend = new NBTTagCompound();
toSend.setInteger("energy", energy);
toSend.setTag("input", new NBTTagCompound());
toSend.setTag("primaryOutput", new NBTTagCompound());
if (secondaryOutput != null) {
toSend.setTag("secondaryOutput", new NBTTagCompound());
}
input.writeToNBT(toSend.getCompoundTag("input"));
primaryOutput.writeToNBT(toSend.getCompoundTag("primaryOutput"));
if (secondaryOutput != null) {
secondaryOutput.writeToNBT(toSend.getCompoundTag("secondaryOutput"));
toSend.setInteger("secondaryChance", secondaryChance);
}
FMLInterModComms.sendMessage("ThermalExpansion", "PulverizerRecipe", toSend);
}