Class CreativeInventoryScreen.CreativeScreenHandler

java.lang.Object
net.minecraft.screen.ScreenHandler
net.minecraft.client.gui.screen.ingame.CreativeInventoryScreen.CreativeScreenHandler
Enclosing class:
CreativeInventoryScreen

@Environment(CLIENT) public static class CreativeInventoryScreen.CreativeScreenHandler extends ScreenHandler
Mappings:
Namespace Name
official eqd$b
intermediary net/minecraft/class_481$class_483
named net/minecraft/client/gui/screen/ingame/CreativeInventoryScreen$CreativeScreenHandler
  • Field Details

    • itemList

      public final DefaultedList<ItemStack> itemList
      Mappings:
      Namespace Name Mixin selector
      official k Leqd$b;k:Lhi;
      intermediary field_2897 Lnet/minecraft/class_481$class_483;field_2897:Lnet/minecraft/class_2371;
      named itemList Lnet/minecraft/client/gui/screen/ingame/CreativeInventoryScreen$CreativeScreenHandler;itemList:Lnet/minecraft/util/collection/DefaultedList;
    • parent

      private final ScreenHandler parent
      Mappings:
      Namespace Name Mixin selector
      official l Leqd$b;l:Lbyv;
      intermediary field_29349 Lnet/minecraft/class_481$class_483;field_29349:Lnet/minecraft/class_1703;
      named parent Lnet/minecraft/client/gui/screen/ingame/CreativeInventoryScreen$CreativeScreenHandler;parent:Lnet/minecraft/screen/ScreenHandler;
  • Constructor Details

    • CreativeScreenHandler

      public CreativeScreenHandler(PlayerEntity player)
      Mappings:
      Namespace Name Mixin selector
      official <init> Leqd$b;<init>(Lbwe;)V
      intermediary <init> Lnet/minecraft/class_481$class_483;<init>(Lnet/minecraft/class_1657;)V
      named <init> Lnet/minecraft/client/gui/screen/ingame/CreativeInventoryScreen$CreativeScreenHandler;<init>(Lnet/minecraft/entity/player/PlayerEntity;)V
  • Method Details

    • canUse

      public boolean canUse(PlayerEntity player)
      Returns whether the screen handler can be used.

      Subclasses should call #canUse(ScreenHandlerContext, PlayerEntity, Block)} or implement the check itself. The implementation should check that the player is near the screen handler's source position (e.g. block position) and that the source (e.g. block) is not destroyed.

      Specified by:
      canUse in class ScreenHandler
      Returns:
      whether the screen handler can be used
      Mappings:
      Namespace Name Mixin selector
      official a Lbyv;a(Lbwe;)Z
      intermediary method_7597 Lnet/minecraft/class_1703;method_7597(Lnet/minecraft/class_1657;)Z
      named canUse Lnet/minecraft/screen/ScreenHandler;canUse(Lnet/minecraft/entity/player/PlayerEntity;)Z
    • method_47428

      protected int method_47428()
      Mappings:
      Namespace Name Mixin selector
      official l Leqd$b;l()I
      intermediary method_47428 Lnet/minecraft/class_481$class_483;method_47428()I
      named method_47428 Lnet/minecraft/client/gui/screen/ingame/CreativeInventoryScreen$CreativeScreenHandler;method_47428()I
    • method_47425

      protected int method_47425(float float2)
      Mappings:
      Namespace Name Mixin selector
      official a Leqd$b;a(F)I
      intermediary method_47425 Lnet/minecraft/class_481$class_483;method_47425(F)I
      named method_47425 Lnet/minecraft/client/gui/screen/ingame/CreativeInventoryScreen$CreativeScreenHandler;method_47425(F)I
    • method_47427

      protected float method_47427(int int2)
      Mappings:
      Namespace Name Mixin selector
      official e Leqd$b;e(I)F
      intermediary method_47427 Lnet/minecraft/class_481$class_483;method_47427(I)F
      named method_47427 Lnet/minecraft/client/gui/screen/ingame/CreativeInventoryScreen$CreativeScreenHandler;method_47427(I)F
    • method_47426

      protected float method_47426(float float2, double double2)
      Mappings:
      Namespace Name Mixin selector
      official a Leqd$b;a(FD)F
      intermediary method_47426 Lnet/minecraft/class_481$class_483;method_47426(FD)F
      named method_47426 Lnet/minecraft/client/gui/screen/ingame/CreativeInventoryScreen$CreativeScreenHandler;method_47426(FD)F
    • scrollItems

      public void scrollItems(float position)
      Mappings:
      Namespace Name Mixin selector
      official b Leqd$b;b(F)V
      intermediary method_2473 Lnet/minecraft/class_481$class_483;method_2473(F)V
      named scrollItems Lnet/minecraft/client/gui/screen/ingame/CreativeInventoryScreen$CreativeScreenHandler;scrollItems(F)V
    • shouldShowScrollbar

      public boolean shouldShowScrollbar()
      Mappings:
      Namespace Name Mixin selector
      official m Leqd$b;m()Z
      intermediary method_2474 Lnet/minecraft/class_481$class_483;method_2474()Z
      named shouldShowScrollbar Lnet/minecraft/client/gui/screen/ingame/CreativeInventoryScreen$CreativeScreenHandler;shouldShowScrollbar()Z
    • transferSlot

      public ItemStack transferSlot(PlayerEntity player, int index)
      Transfers (or "quick-moves") the stack at slot index to other slots of the screen handler that belong to a different inventory.

      Subclasses should call ScreenHandler.insertItem(net.minecraft.item.ItemStack, int, int, boolean), and if the insertion was successful, clear the slot (if the stack is exhausted) or mark it as dirty. See the vanilla subclasses for basic implementation.

      Specified by:
      transferSlot in class ScreenHandler
      Returns:
      ItemStack.EMPTY when no stack can be transferred, otherwise the original stack
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official a Lbyv;a(Lbwe;I)Lcdi;
      intermediary method_7601 Lnet/minecraft/class_1703;method_7601(Lnet/minecraft/class_1657;I)Lnet/minecraft/class_1799;
      named transferSlot Lnet/minecraft/screen/ScreenHandler;transferSlot(Lnet/minecraft/entity/player/PlayerEntity;I)Lnet/minecraft/item/ItemStack;
    • canInsertIntoSlot

      public boolean canInsertIntoSlot(ItemStack stack, Slot slot)
      Returns whether stack can be inserted to slot.

      Subclasses should override this to return false if the slot is used for output.

      Overrides:
      canInsertIntoSlot in class ScreenHandler
      Returns:
      whether stack can be inserted to slot
      Mappings:
      Namespace Name Mixin selector
      official a Lbyv;a(Lcdi;Lcam;)Z
      intermediary method_7613 Lnet/minecraft/class_1703;method_7613(Lnet/minecraft/class_1799;Lnet/minecraft/class_1735;)Z
      named canInsertIntoSlot Lnet/minecraft/screen/ScreenHandler;canInsertIntoSlot(Lnet/minecraft/item/ItemStack;Lnet/minecraft/screen/slot/Slot;)Z
    • canInsertIntoSlot

      public boolean canInsertIntoSlot(Slot slot)
      Overrides:
      canInsertIntoSlot in class ScreenHandler
      Mappings:
      Namespace Name Mixin selector
      official b Lbyv;b(Lcam;)Z
      intermediary method_7615 Lnet/minecraft/class_1703;method_7615(Lnet/minecraft/class_1735;)Z
      named canInsertIntoSlot Lnet/minecraft/screen/ScreenHandler;canInsertIntoSlot(Lnet/minecraft/screen/slot/Slot;)Z
    • getCursorStack

      public ItemStack getCursorStack()
      Overrides:
      getCursorStack in class ScreenHandler
      Mappings:
      Namespace Name Mixin selector
      official g Lbyv;g()Lcdi;
      intermediary method_34255 Lnet/minecraft/class_1703;method_34255()Lnet/minecraft/class_1799;
      named getCursorStack Lnet/minecraft/screen/ScreenHandler;getCursorStack()Lnet/minecraft/item/ItemStack;
    • setCursorStack

      public void setCursorStack(ItemStack stack)
      Overrides:
      setCursorStack in class ScreenHandler
      Mappings:
      Namespace Name Mixin selector
      official b Lbyv;b(Lcdi;)V
      intermediary method_34254 Lnet/minecraft/class_1703;method_34254(Lnet/minecraft/class_1799;)V
      named setCursorStack Lnet/minecraft/screen/ScreenHandler;setCursorStack(Lnet/minecraft/item/ItemStack;)V