Class HTDeferredMenuType.OnHand

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final MenuProvider getProvider(InteractionHand hand, ItemStack stack) 指定されたhand, stackからMenuProviderを返します。
      final InteractionResult openMenu(Player player, InteractionHand hand, ItemStack stack) 指定されたplayer, hand, stackからGUIを開きます。
      • Methods inherited from class hiiragi283.core.common.registry.HTDeferredMenuType

        get, getResourceKey, getVanillaProvider
      • Methods inherited from class hiiragi283.core.api.resource.HTKeyLike

        getId
      • Methods inherited from class hiiragi283.core.api.resource.HTIdLike

        getNamespace, getPath
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • HTDeferredMenuType.OnHand

        HTDeferredMenuType.OnHand(ResourceKey<MenuType<?>> key)
      • HTDeferredMenuType.OnHand

        HTDeferredMenuType.OnHand(ResourceLocation id)
    • Method Detail

      • getProvider

         final MenuProvider getProvider(InteractionHand hand, ItemStack stack)

        指定されたhand, stackからMenuProviderを返します。

        Parameters:
        hand - このGUIを開くstackを持っているInteractionHand
        stack - このGUIを開くItemStack
        Returns:

        getの戻り値がItemStackを継承していない場合はnull

      • openMenu

         final InteractionResult openMenu(Player player, InteractionHand hand, ItemStack stack)

        指定されたplayer, hand, stackからGUIを開きます。

        Parameters:
        player - このGUIを開くPlayer
        hand - このGUIを開くstackを持っているInteractionHand
        stack - このGUIを開くItemStack
        Returns:

        クライアント側の場合はInteractionResult.SUCCESS,サーバー側の場合はGUIを開いたうえでInteractionResult.CONSUME, getProvidernullの場合はInteractionResult.FAIL