Interface IMenuItem


public interface IMenuItem
Implemented on Item objects, to return objects used to manage, and interact with the contents.
  • Method Summary

    Modifier and Type
    Method
    Description
    @Nullable ItemMenuHost<?>
    getMenuHost(net.minecraft.world.entity.player.Player player, appeng.menu.locator.ItemMenuHostLocator locator, @Nullable net.minecraft.world.phys.BlockHitResult hitResult)
     
  • Method Details

    • getMenuHost

      @Nullable @Nullable ItemMenuHost<?> getMenuHost(net.minecraft.world.entity.player.Player player, appeng.menu.locator.ItemMenuHostLocator locator, @Nullable @Nullable net.minecraft.world.phys.BlockHitResult hitResult)
      Parameters:
      player - The player opening the menu.
      locator - The locator the item can be found with.
      hitResult - The hit testing result if the item was used on a block to open the menu. May be null.
      Returns:
      Null if no menu host is available.