Interface IMenuItem
public interface IMenuItem
Implemented on Item objects, to return objects used to manage, and interact with the contents.
-
Method Summary
Modifier and TypeMethodDescription@Nullable ItemMenuHostgetMenuHost(net.minecraft.world.entity.player.Player player, int inventorySlot, net.minecraft.world.item.ItemStack stack, @Nullable net.minecraft.core.BlockPos pos)
-
Method Details
-
getMenuHost
@Nullable @Nullable ItemMenuHost getMenuHost(net.minecraft.world.entity.player.Player player, int inventorySlot, net.minecraft.world.item.ItemStack stack, @Nullable @Nullable net.minecraft.core.BlockPos pos) - Parameters:
player- The player opening the menu.inventorySlot- The slot in the player's inventory the item is in.stack- The item used to open the menu.pos- If the item was used on a block in the world, has that block's position. Null if no block was targeted.- Returns:
- Null if no menu host is available.
-