Class GhostIngredientHandler<T extends GhostItemContainer<?>>

java.lang.Object
com.simibubi.create.compat.jei.GhostIngredientHandler<T>
All Implemented Interfaces:
mezz.jei.api.gui.handlers.IGhostIngredientHandler<AbstractSimiContainerScreen<T>>

@ParametersAreNonnullByDefault public class GhostIngredientHandler<T extends GhostItemContainer<?>> extends Object implements mezz.jei.api.gui.handlers.IGhostIngredientHandler<AbstractSimiContainerScreen<T>>
  • Constructor Details

    • GhostIngredientHandler

      public GhostIngredientHandler()
  • Method Details

    • getTargets

      public <I> List<mezz.jei.api.gui.handlers.IGhostIngredientHandler.Target<I>> getTargets(AbstractSimiContainerScreen<T> gui, I ingredient, boolean doStart)
      Description copied from interface: mezz.jei.api.gui.handlers.IGhostIngredientHandler
      Called when a player wants to drag an ingredient on to your gui. Return the targets that can accept the ingredient. This is called when a player hovers over an ingredient with doStart=false, and called again when they pick up the ingredient with doStart=true.
      Specified by:
      getTargets in interface mezz.jei.api.gui.handlers.IGhostIngredientHandler<T extends GhostItemContainer<?>>
    • onComplete

      public void onComplete()
      Description copied from interface: mezz.jei.api.gui.handlers.IGhostIngredientHandler
      Called when the player is done dragging an ingredient. If the drag succeeded, IGhostIngredientHandler.Target.accept(Object) was called before this. Otherwise, the player failed to drag an ingredient to a IGhostIngredientHandler.Target.
      Specified by:
      onComplete in interface mezz.jei.api.gui.handlers.IGhostIngredientHandler<T extends GhostItemContainer<?>>
    • shouldHighlightTargets

      public boolean shouldHighlightTargets()
      Specified by:
      shouldHighlightTargets in interface mezz.jei.api.gui.handlers.IGhostIngredientHandler<T extends GhostItemContainer<?>>
      Returns:
      true if JEI should highlight the targets for the player. false to handle highlighting yourself.