aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/common/tileentities/machines/IRecipeProcessingAwareHatch.java
blob: c7a97ce9696b7330dd1ba1349c130e16a46cd7c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package gregtech.common.tileentities.machines;

import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase;
import gregtech.api.recipe.check.CheckRecipeResult;

/**
 * Implement this interface for {@link gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch}
 * if it does special stuff while multiblock controller is processing recipe.
 */
public interface IRecipeProcessingAwareHatch {

    /**
     * Called when multiblock controller starts processing.
     * {@link #endRecipeProcessing} is called on the same tick.
     */
    void startRecipeProcessing();

    /**
     * Called when multiblock controller ends processing. {@link #startRecipeProcessing} is called on the same tick.
     *
     * @param controller Caller of this method.
     * @return Result of the process of this method. {@code !wasSuccessful()} means the returned result should
     *         overwrite the result calculated on multiblock whatever the reason is.
     */
    CheckRecipeResult endRecipeProcessing(GT_MetaTileEntity_MultiBlockBase controller);
}