Search in sources :

Example 1 with ChemistJournalActiveItemMessage

use of minechem.network.message.ChemistJournalActiveItemMessage in project Minechem by iopleke.

the class ChemistJournalGui method showRecipesForStack.

public void showRecipesForStack(ItemStack itemstack) {
    currentItemStack = itemstack;
    MinechemItemsRegistration.journal.setActiveStack(itemstack, journalStack);
    ChemistJournalActiveItemMessage message = new ChemistJournalActiveItemMessage(itemstack, player);
    MessageHandler.INSTANCE.sendToServer(message);
    SynthesisRecipe synthesisRecipe = SynthesisRecipeHandler.instance.getRecipeFromOutput(itemstack);
    DecomposerRecipe decomposerRecipe = DecomposerRecipeHandler.instance.getRecipe(itemstack);
    synthesisSlots = new GuiFakeSlot[9];
    decomposerSlots = new GuiFakeSlot[9];
    currentSynthesisRecipe = null;
    currentDecomposerRecipe = null;
    if (synthesisRecipe != null) {
        showSynthesisRecipe(synthesisRecipe);
        currentSynthesisRecipe = synthesisRecipe;
    }
    if (decomposerRecipe != null) {
        showDecomposerRecipe(decomposerRecipe);
        currentDecomposerRecipe = decomposerRecipe;
    }
}
Also used : SynthesisRecipe(minechem.tileentity.synthesis.SynthesisRecipe) DecomposerRecipe(minechem.tileentity.decomposer.DecomposerRecipe) ChemistJournalActiveItemMessage(minechem.network.message.ChemistJournalActiveItemMessage)

Aggregations

ChemistJournalActiveItemMessage (minechem.network.message.ChemistJournalActiveItemMessage)1 DecomposerRecipe (minechem.tileentity.decomposer.DecomposerRecipe)1 SynthesisRecipe (minechem.tileentity.synthesis.SynthesisRecipe)1