Class CrafterScreenHandler

java.lang.Object
net.minecraft.screen.ScreenHandler
net.minecraft.screen.CrafterScreenHandler
All Implemented Interfaces:
ScreenHandlerListener

public class CrafterScreenHandler extends ScreenHandler implements ScreenHandlerListener
Mappings:
Namespace Name
named net/minecraft/screen/CrafterScreenHandler
intermediary net/minecraft/class_8881
official ctr
  • Field Details

    • field_46781

      protected static final int field_46781
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named field_46781 Lnet/minecraft/screen/CrafterScreenHandler;field_46781:I
      intermediary field_46781 Lnet/minecraft/class_8881;field_46781:I
      official m Lctr;m:I
    • field_46782

      private static final int field_46782
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named field_46782 Lnet/minecraft/screen/CrafterScreenHandler;field_46782:I
      intermediary field_46782 Lnet/minecraft/class_8881;field_46782:I
      official n Lctr;n:I
    • field_46783

      private static final int field_46783
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named field_46783 Lnet/minecraft/screen/CrafterScreenHandler;field_46783:I
      intermediary field_46783 Lnet/minecraft/class_8881;field_46783:I
      official o Lctr;o:I
    • field_46784

      private static final int field_46784
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named field_46784 Lnet/minecraft/screen/CrafterScreenHandler;field_46784:I
      intermediary field_46784 Lnet/minecraft/class_8881;field_46784:I
      official p Lctr;p:I
    • field_46785

      private static final int field_46785
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named field_46785 Lnet/minecraft/screen/CrafterScreenHandler;field_46785:I
      intermediary field_46785 Lnet/minecraft/class_8881;field_46785:I
      official q Lctr;q:I
    • resultInventory

      private final CraftingResultInventory resultInventory
      Mappings:
      Namespace Name Mixin selector
      named resultInventory Lnet/minecraft/screen/CrafterScreenHandler;resultInventory:Lnet/minecraft/inventory/CraftingResultInventory;
      intermediary field_46780 Lnet/minecraft/class_8881;field_46780:Lnet/minecraft/class_1731;
      official r Lctr;r:Lcut;
    • propertyDelegate

      private final PropertyDelegate propertyDelegate
      Mappings:
      Namespace Name Mixin selector
      named propertyDelegate Lnet/minecraft/screen/CrafterScreenHandler;propertyDelegate:Lnet/minecraft/screen/PropertyDelegate;
      intermediary field_46786 Lnet/minecraft/class_8881;field_46786:Lnet/minecraft/class_3913;
      official s Lctr;s:Lctn;
    • player

      private final PlayerEntity player
      Mappings:
      Namespace Name Mixin selector
      named player Lnet/minecraft/screen/CrafterScreenHandler;player:Lnet/minecraft/entity/player/PlayerEntity;
      intermediary field_46787 Lnet/minecraft/class_8881;field_46787:Lnet/minecraft/class_1657;
      official t Lctr;t:Lcpw;
    • inputInventory

      private final RecipeInputInventory inputInventory
      Mappings:
      Namespace Name Mixin selector
      named inputInventory Lnet/minecraft/screen/CrafterScreenHandler;inputInventory:Lnet/minecraft/inventory/RecipeInputInventory;
      intermediary field_46788 Lnet/minecraft/class_8881;field_46788:Lnet/minecraft/class_8566;
      official u Lctr;u:Lctt;
  • Constructor Details

    • CrafterScreenHandler

      public CrafterScreenHandler(int syncId, PlayerInventory playerInventory)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/screen/CrafterScreenHandler;<init>(ILnet/minecraft/entity/player/PlayerInventory;)V
      intermediary <init> Lnet/minecraft/class_8881;<init>(ILnet/minecraft/class_1661;)V
      official <init> Lctr;<init>(ILcpv;)V
    • CrafterScreenHandler

      public CrafterScreenHandler(int syncId, PlayerInventory playerInventory, RecipeInputInventory inputInventory, PropertyDelegate propertyDelegate)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/screen/CrafterScreenHandler;<init>(ILnet/minecraft/entity/player/PlayerInventory;Lnet/minecraft/inventory/RecipeInputInventory;Lnet/minecraft/screen/PropertyDelegate;)V
      intermediary <init> Lnet/minecraft/class_8881;<init>(ILnet/minecraft/class_1661;Lnet/minecraft/class_8566;Lnet/minecraft/class_3913;)V
      official <init> Lctr;<init>(ILcpv;Lctt;Lctn;)V
  • Method Details

    • addSlots

      private void addSlots(PlayerInventory playerInventory)
      Mappings:
      Namespace Name Mixin selector
      named addSlots Lnet/minecraft/screen/CrafterScreenHandler;addSlots(Lnet/minecraft/entity/player/PlayerInventory;)V
      intermediary method_54459 Lnet/minecraft/class_8881;method_54459(Lnet/minecraft/class_1661;)V
      official a Lctr;a(Lcpv;)V
    • setSlotEnabled

      public void setSlotEnabled(int slot, boolean enabled)
      Mappings:
      Namespace Name Mixin selector
      named setSlotEnabled Lnet/minecraft/screen/CrafterScreenHandler;setSlotEnabled(IZ)V
      intermediary method_54458 Lnet/minecraft/class_8881;method_54458(IZ)V
      official a Lctr;a(IZ)V
    • isSlotDisabled

      public boolean isSlotDisabled(int slot)
      Mappings:
      Namespace Name Mixin selector
      named isSlotDisabled Lnet/minecraft/screen/CrafterScreenHandler;isSlotDisabled(I)Z
      intermediary method_54461 Lnet/minecraft/class_8881;method_54461(I)Z
      official e Lctr;e(I)Z
    • isTriggered

      public boolean isTriggered()
      Mappings:
      Namespace Name Mixin selector
      named isTriggered Lnet/minecraft/screen/CrafterScreenHandler;isTriggered()Z
      intermediary method_54462 Lnet/minecraft/class_8881;method_54462()Z
      official l Lctr;l()Z
    • quickMove

      public ItemStack quickMove(PlayerEntity player, int slot)
      Quick-moves the stack at slot to other slots of the screen handler that belong to a different inventory or another section of the same inventory. For example, items can be quick-moved between a chest's slots and the player inventory or between the main player inventory and the hotbar.

      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.

      Quick-moving is also known as "shift-clicking" since it's usually triggered using Shift+left click.

      Specified by:
      quickMove in class ScreenHandler
      Parameters:
      slot - the index of the slot to quick-move from
      Returns:
      ItemStack.EMPTY when no stack can be transferred, otherwise the original stack
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named quickMove Lnet/minecraft/screen/ScreenHandler;quickMove(Lnet/minecraft/entity/player/PlayerEntity;I)Lnet/minecraft/item/ItemStack;
      intermediary method_7601 Lnet/minecraft/class_1703;method_7601(Lnet/minecraft/class_1657;I)Lnet/minecraft/class_1799;
      official b Lctb;b(Lcpw;I)Lcxo;
    • 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
      named canUse Lnet/minecraft/screen/ScreenHandler;canUse(Lnet/minecraft/entity/player/PlayerEntity;)Z
      intermediary method_7597 Lnet/minecraft/class_1703;method_7597(Lnet/minecraft/class_1657;)Z
      official b Lctb;b(Lcpw;)Z
    • updateResult

      private void updateResult()
      Mappings:
      Namespace Name Mixin selector
      named updateResult Lnet/minecraft/screen/CrafterScreenHandler;updateResult()V
      intermediary method_54464 Lnet/minecraft/class_8881;method_54464()V
      official n Lctr;n()V
    • getInputInventory

      public Inventory getInputInventory()
      Mappings:
      Namespace Name Mixin selector
      named getInputInventory Lnet/minecraft/screen/CrafterScreenHandler;getInputInventory()Lnet/minecraft/inventory/Inventory;
      intermediary method_54463 Lnet/minecraft/class_8881;method_54463()Lnet/minecraft/class_1263;
      official m Lctr;m()Lbtb;
    • onSlotUpdate

      public void onSlotUpdate(ScreenHandler handler, int slotId, ItemStack stack)
      Specified by:
      onSlotUpdate in interface ScreenHandlerListener
      Mappings:
      Namespace Name Mixin selector
      named onSlotUpdate Lnet/minecraft/screen/ScreenHandlerListener;onSlotUpdate(Lnet/minecraft/screen/ScreenHandler;ILnet/minecraft/item/ItemStack;)V
      intermediary method_7635 Lnet/minecraft/class_1712;method_7635(Lnet/minecraft/class_1703;ILnet/minecraft/class_1799;)V
      official a Lctp;a(Lctb;ILcxo;)V
    • onPropertyUpdate

      public void onPropertyUpdate(ScreenHandler handler, int property, int value)
      Specified by:
      onPropertyUpdate in interface ScreenHandlerListener
      Mappings:
      Namespace Name Mixin selector
      named onPropertyUpdate Lnet/minecraft/screen/ScreenHandlerListener;onPropertyUpdate(Lnet/minecraft/screen/ScreenHandler;II)V
      intermediary method_7633 Lnet/minecraft/class_1712;method_7633(Lnet/minecraft/class_1703;II)V
      official a Lctp;a(Lctb;II)V