Search in sources :

Example 1 with ObservableStackHandler

use of com.codetaylor.mc.athenaeum.inventory.ObservableStackHandler in project artisan-worktables by codetaylor.

the class TileEntitySecondaryInputBase method initialize.

@Override
protected void initialize(EnumType type) {
    super.initialize(type);
    this.secondaryIngredientHandler = new ObservableStackHandler(this.getSecondaryInputSlotCount());
    this.secondaryIngredientHandler.addObserver((stackHandler, slotIndex) -> {
        this.markDirty();
        this.requiresRecipeUpdate = true;
    });
    this.wrapper = new MutuallyExclusiveStackHandlerWrapper(this.secondaryIngredientHandler);
}
Also used : MutuallyExclusiveStackHandlerWrapper(com.codetaylor.mc.artisanworktables.modules.worktables.tile.MutuallyExclusiveStackHandlerWrapper) ObservableStackHandler(com.codetaylor.mc.athenaeum.inventory.ObservableStackHandler)

Aggregations

MutuallyExclusiveStackHandlerWrapper (com.codetaylor.mc.artisanworktables.modules.worktables.tile.MutuallyExclusiveStackHandlerWrapper)1 ObservableStackHandler (com.codetaylor.mc.athenaeum.inventory.ObservableStackHandler)1