Package net.minecraft

Class class_9521


public class class_9521 extends ScreenHandler
Mappings:
Namespace Name
official cqu
intermediary net/minecraft/class_9521
named net/minecraft/class_9521
  • Field Details

    • field_50548

      public static final int field_50548
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official k Lcqu;k:I
      intermediary field_50548 Lnet/minecraft/class_9521;field_50548:I
      named field_50548 Lnet/minecraft/class_9521;field_50548:I
    • field_50549

      public static final int field_50549
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official l Lcqu;l:I
      intermediary field_50549 Lnet/minecraft/class_9521;field_50549:I
      named field_50549 Lnet/minecraft/class_9521;field_50549:I
    • field_50553

      private static final int field_50553
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official p Lcqu;p:I
      intermediary field_50553 Lnet/minecraft/class_9521;field_50553:I
      named field_50553 Lnet/minecraft/class_9521;field_50553:I
    • field_50554

      private static final int field_50554
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official q Lcqu;q:I
      intermediary field_50554 Lnet/minecraft/class_9521;field_50554:I
      named field_50554 Lnet/minecraft/class_9521;field_50554:I
    • field_50555

      private static final int field_50555
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official r Lcqu;r:I
      intermediary field_50555 Lnet/minecraft/class_9521;field_50555:I
      named field_50555 Lnet/minecraft/class_9521;field_50555:I
    • field_50556

      private static final int field_50556
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official s Lcqu;s:I
      intermediary field_50556 Lnet/minecraft/class_9521;field_50556:I
      named field_50556 Lnet/minecraft/class_9521;field_50556:I
    • field_50557

      private final ScreenHandlerContext field_50557
      Mappings:
      Namespace Name Mixin selector
      official t Lcqu;t:Lcpr;
      intermediary field_50557 Lnet/minecraft/class_9521;field_50557:Lnet/minecraft/class_3914;
      named field_50557 Lnet/minecraft/class_9521;field_50557:Lnet/minecraft/screen/ScreenHandlerContext;
    • field_50558

      private final Property field_50558
      Mappings:
      Namespace Name Mixin selector
      official u Lcqu;u:Lcpy;
      intermediary field_50558 Lnet/minecraft/class_9521;field_50558:Lnet/minecraft/class_3915;
      named field_50558 Lnet/minecraft/class_9521;field_50558:Lnet/minecraft/screen/Property;
    • field_50559

      private final World field_50559
      Mappings:
      Namespace Name Mixin selector
      official v Lcqu;v:Ldca;
      intermediary field_50559 Lnet/minecraft/class_9521;field_50559:Lnet/minecraft/class_1937;
      named field_50559 Lnet/minecraft/class_9521;field_50559:Lnet/minecraft/world/World;
    • field_50560

      private List<RecipeEntry<class_9541>> field_50560
      Mappings:
      Namespace Name Mixin selector
      official w Lcqu;w:Ljava/util/List;
      intermediary field_50560 Lnet/minecraft/class_9521;field_50560:Ljava/util/List;
      named field_50560 Lnet/minecraft/class_9521;field_50560:Ljava/util/List;
    • field_50561

      private ItemStack field_50561
      Mappings:
      Namespace Name Mixin selector
      official x Lcqu;x:Lcuh;
      intermediary field_50561 Lnet/minecraft/class_9521;field_50561:Lnet/minecraft/class_1799;
      named field_50561 Lnet/minecraft/class_9521;field_50561:Lnet/minecraft/item/ItemStack;
    • field_50562

      long field_50562
      Mappings:
      Namespace Name Mixin selector
      official y Lcqu;y:J
      intermediary field_50562 Lnet/minecraft/class_9521;field_50562:J
      named field_50562 Lnet/minecraft/class_9521;field_50562:J
    • field_50550

      final Slot field_50550
      Mappings:
      Namespace Name Mixin selector
      official m Lcqu;m:Lcre;
      intermediary field_50550 Lnet/minecraft/class_9521;field_50550:Lnet/minecraft/class_1735;
      named field_50550 Lnet/minecraft/class_9521;field_50550:Lnet/minecraft/screen/slot/Slot;
    • field_50551

      final Slot field_50551
      Mappings:
      Namespace Name Mixin selector
      official n Lcqu;n:Lcre;
      intermediary field_50551 Lnet/minecraft/class_9521;field_50551:Lnet/minecraft/class_1735;
      named field_50551 Lnet/minecraft/class_9521;field_50551:Lnet/minecraft/screen/slot/Slot;
    • field_50563

      Runnable field_50563
      Mappings:
      Namespace Name Mixin selector
      official z Lcqu;z:Ljava/lang/Runnable;
      intermediary field_50563 Lnet/minecraft/class_9521;field_50563:Ljava/lang/Runnable;
      named field_50563 Lnet/minecraft/class_9521;field_50563:Ljava/lang/Runnable;
    • field_50552

      public final Inventory field_50552
      Mappings:
      Namespace Name Mixin selector
      official o Lcqu;o:Lbpt;
      intermediary field_50552 Lnet/minecraft/class_9521;field_50552:Lnet/minecraft/class_1263;
      named field_50552 Lnet/minecraft/class_9521;field_50552:Lnet/minecraft/inventory/Inventory;
    • field_50547

      final CraftingResultInventory field_50547
      Mappings:
      Namespace Name Mixin selector
      official A Lcqu;A:Lcqz;
      intermediary field_50547 Lnet/minecraft/class_9521;field_50547:Lnet/minecraft/class_1731;
      named field_50547 Lnet/minecraft/class_9521;field_50547:Lnet/minecraft/inventory/CraftingResultInventory;
  • Constructor Details

  • Method Details

    • method_59012

      public int method_59012()
      Mappings:
      Namespace Name Mixin selector
      official l Lcqu;l()I
      intermediary method_59012 Lnet/minecraft/class_9521;method_59012()I
      named method_59012 Lnet/minecraft/class_9521;method_59012()I
    • method_59013

      public List<RecipeEntry<class_9541>> method_59013()
      Mappings:
      Namespace Name Mixin selector
      official m Lcqu;m()Ljava/util/List;
      intermediary method_59013 Lnet/minecraft/class_9521;method_59013()Ljava/util/List;
      named method_59013 Lnet/minecraft/class_9521;method_59013()Ljava/util/List;
    • method_59014

      public int method_59014()
      Mappings:
      Namespace Name Mixin selector
      official n Lcqu;n()I
      intermediary method_59014 Lnet/minecraft/class_9521;method_59014()I
      named method_59014 Lnet/minecraft/class_9521;method_59014()I
    • method_59015

      public boolean method_59015()
      Mappings:
      Namespace Name Mixin selector
      official o Lcqu;o()Z
      intermediary method_59015 Lnet/minecraft/class_9521;method_59015()Z
      named method_59015 Lnet/minecraft/class_9521;method_59015()Z
    • 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 Lcpg;a(Lcly;)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
    • onButtonClick

      public boolean onButtonClick(PlayerEntity player, int id)
      Called when player clicks a button with id.

      "Button click" is an abstract concept; it does not have to be triggered by a button. Examples of button clicks include selecting a recipe for a stonecutter, turning a page of a lectern's book, or selecting an enchantment on an enchanting table. Buttons are identified by an integer.

      Overrides:
      onButtonClick in class ScreenHandler
      Returns:
      whether the button click is handled successfully
      Mappings:
      Namespace Name Mixin selector
      official b Lcpg;b(Lcly;I)Z
      intermediary method_7604 Lnet/minecraft/class_1703;method_7604(Lnet/minecraft/class_1657;I)Z
      named onButtonClick Lnet/minecraft/screen/ScreenHandler;onButtonClick(Lnet/minecraft/entity/player/PlayerEntity;I)Z
    • method_59011

      private boolean method_59011(int int2)
      Mappings:
      Namespace Name Mixin selector
      official e Lcqu;e(I)Z
      intermediary method_59011 Lnet/minecraft/class_9521;method_59011(I)Z
      named method_59011 Lnet/minecraft/class_9521;method_59011(I)Z
    • onContentChanged

      public void onContentChanged(Inventory inventory)
      Called when a slot's content has changed.

      This is not called by default; subclasses that override this method should also use a custom Inventory whose markDirty method is overridden to call this method as a backing inventory of the slot.

      This can be used to update the output slot when input changes.

      Overrides:
      onContentChanged in class ScreenHandler
      Mappings:
      Namespace Name Mixin selector
      official a Lcpg;a(Lbpt;)V
      intermediary method_7609 Lnet/minecraft/class_1703;method_7609(Lnet/minecraft/class_1263;)V
      named onContentChanged Lnet/minecraft/screen/ScreenHandler;onContentChanged(Lnet/minecraft/inventory/Inventory;)V
    • method_59008

      private void method_59008(Inventory inventory, ItemStack itemStack)
      Mappings:
      Namespace Name Mixin selector
      official a Lcqu;a(Lbpt;Lcuh;)V
      intermediary method_59008 Lnet/minecraft/class_9521;method_59008(Lnet/minecraft/class_1263;Lnet/minecraft/class_1799;)V
      named method_59008 Lnet/minecraft/class_9521;method_59008(Lnet/minecraft/inventory/Inventory;Lnet/minecraft/item/ItemStack;)V
    • method_59016

      void method_59016()
      Mappings:
      Namespace Name Mixin selector
      official p Lcqu;p()V
      intermediary method_59016 Lnet/minecraft/class_9521;method_59016()V
      named method_59016 Lnet/minecraft/class_9521;method_59016()V
    • getType

      public ScreenHandlerType<?> getType()
      Returns the screen handler type.

      A screen handler must have associated screen handler type to open it.

      Overrides:
      getType in class ScreenHandler
      Returns:
      the screen handler type
      Mappings:
      Namespace Name Mixin selector
      official a Lcpg;a()Lcqo;
      intermediary method_17358 Lnet/minecraft/class_1703;method_17358()Lnet/minecraft/class_3917;
      named getType Lnet/minecraft/screen/ScreenHandler;getType()Lnet/minecraft/screen/ScreenHandlerType;
    • method_59010

      public void method_59010(Runnable runnable)
      Mappings:
      Namespace Name Mixin selector
      official a Lcqu;a(Ljava/lang/Runnable;)V
      intermediary method_59010 Lnet/minecraft/class_9521;method_59010(Ljava/lang/Runnable;)V
      named method_59010 Lnet/minecraft/class_9521;method_59010(Ljava/lang/Runnable;)V
    • 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 Lcpg;a(Lcuh;Lcre;)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
    • 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
      official a Lcpg;a(Lcly;I)Lcuh;
      intermediary method_7601 Lnet/minecraft/class_1703;method_7601(Lnet/minecraft/class_1657;I)Lnet/minecraft/class_1799;
      named quickMove Lnet/minecraft/screen/ScreenHandler;quickMove(Lnet/minecraft/entity/player/PlayerEntity;I)Lnet/minecraft/item/ItemStack;
    • onClosed

      public void onClosed(PlayerEntity player)
      Called when this screen handler is closed.

      To close a screen handler, call PlayerEntity.closeHandledScreen() on the server instead of this method.

      This drops the cursor stack by default. Subclasses that have slots not backed by a persistent inventory should call ScreenHandler.dropInventory(net.minecraft.entity.player.PlayerEntity, net.minecraft.inventory.Inventory) to drop the stacks.

      Overrides:
      onClosed in class ScreenHandler
      Mappings:
      Namespace Name Mixin selector
      official b Lcpg;b(Lcly;)V
      intermediary method_7595 Lnet/minecraft/class_1703;method_7595(Lnet/minecraft/class_1657;)V
      named onClosed Lnet/minecraft/screen/ScreenHandler;onClosed(Lnet/minecraft/entity/player/PlayerEntity;)V