Search in sources :

Example 1 with ICraftingWatcher

use of appeng.api.networking.crafting.ICraftingWatcher in project PneumaticCraft by MineMaarten.

the class SemiBlockRequester method updateProvidingItems.

@Optional.Method(modid = ModIds.AE2)
private void updateProvidingItems(ICraftingProviderHelper cHelper) {
    IStackWatcher sWatcher = (IStackWatcher) stackWatcher;
    ICraftingWatcher cWatcher = (ICraftingWatcher) craftingWatcher;
    if (sWatcher != null)
        sWatcher.clear();
    if (cWatcher != null)
        cWatcher.clear();
    for (IAEItemStack stack : getProvidingItems()) {
        if (sWatcher != null)
            sWatcher.add(stack);
        if (cWatcher != null)
            cWatcher.add(stack);
        if (cHelper != null)
            cHelper.setEmitable(stack);
    }
}
Also used : IAEItemStack(appeng.api.storage.data.IAEItemStack) IStackWatcher(appeng.api.networking.storage.IStackWatcher) ICraftingWatcher(appeng.api.networking.crafting.ICraftingWatcher)

Aggregations

ICraftingWatcher (appeng.api.networking.crafting.ICraftingWatcher)1 IStackWatcher (appeng.api.networking.storage.IStackWatcher)1 IAEItemStack (appeng.api.storage.data.IAEItemStack)1