Class ForgingScreenHandler

java.lang.Object
net.minecraft.screen.ScreenHandler
net.minecraft.screen.ForgingScreenHandler
Direct Known Subclasses:
AnvilScreenHandler, class_8050, SmithingScreenHandler

public abstract class ForgingScreenHandler extends ScreenHandler
Mappings:
Namespace Name
official cbc
intermediary net/minecraft/class_4861
named net/minecraft/screen/ForgingScreenHandler
  • Field Details

    • field_41901

      private static final int field_41901
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official k Lcbc;k:I
      intermediary field_41901 Lnet/minecraft/class_4861;field_41901:I
      named field_41901 Lnet/minecraft/screen/ForgingScreenHandler;field_41901:I
    • field_41902

      private static final int field_41902
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official l Lcbc;l:I
      intermediary field_41902 Lnet/minecraft/class_4861;field_41902:I
      named field_41902 Lnet/minecraft/screen/ForgingScreenHandler;field_41902:I
    • context

      protected final ScreenHandlerContext context
      Mappings:
      Namespace Name Mixin selector
      official o Lcbc;o:Lcan;
      intermediary field_22481 Lnet/minecraft/class_4861;field_22481:Lnet/minecraft/class_3914;
      named context Lnet/minecraft/screen/ForgingScreenHandler;context:Lnet/minecraft/screen/ScreenHandlerContext;
    • player

      protected final PlayerEntity player
      Mappings:
      Namespace Name Mixin selector
      official p Lcbc;p:Lbxl;
      intermediary field_22482 Lnet/minecraft/class_4861;field_22482:Lnet/minecraft/class_1657;
      named player Lnet/minecraft/screen/ForgingScreenHandler;player:Lnet/minecraft/entity/player/PlayerEntity;
    • input

      protected final Inventory input
      Mappings:
      Namespace Name Mixin selector
      official q Lcbc;q:Lbcz;
      intermediary field_22480 Lnet/minecraft/class_4861;field_22480:Lnet/minecraft/class_1263;
      named input Lnet/minecraft/screen/ForgingScreenHandler;input:Lnet/minecraft/inventory/Inventory;
    • field_41903

      private final List<Integer> field_41903
      Mappings:
      Namespace Name Mixin selector
      official m Lcbc;m:Ljava/util/List;
      intermediary field_41903 Lnet/minecraft/class_4861;field_41903:Ljava/util/List;
      named field_41903 Lnet/minecraft/screen/ForgingScreenHandler;field_41903:Ljava/util/List;
    • output

      protected final CraftingResultInventory output
      Mappings:
      Namespace Name Mixin selector
      official r Lcbc;r:Lcbq;
      intermediary field_22479 Lnet/minecraft/class_4861;field_22479:Lnet/minecraft/class_1731;
      named output Lnet/minecraft/screen/ForgingScreenHandler;output:Lnet/minecraft/inventory/CraftingResultInventory;
    • field_41904

      private final int field_41904
      Mappings:
      Namespace Name Mixin selector
      official n Lcbc;n:I
      intermediary field_41904 Lnet/minecraft/class_4861;field_41904:I
      named field_41904 Lnet/minecraft/screen/ForgingScreenHandler;field_41904:I
  • Constructor Details

    • ForgingScreenHandler

      public ForgingScreenHandler(@Nullable @Nullable ScreenHandlerType<?> type, int syncId, PlayerInventory playerInventory, ScreenHandlerContext context)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lcbc;<init>(Lcbi;ILbxk;Lcan;)V
      intermediary <init> Lnet/minecraft/class_4861;<init>(Lnet/minecraft/class_3917;ILnet/minecraft/class_1661;Lnet/minecraft/class_3914;)V
      named <init> Lnet/minecraft/screen/ForgingScreenHandler;<init>(Lnet/minecraft/screen/ScreenHandlerType;ILnet/minecraft/entity/player/PlayerInventory;Lnet/minecraft/screen/ScreenHandlerContext;)V
  • Method Details

    • canTakeOutput

      protected abstract boolean canTakeOutput(PlayerEntity player, boolean present)
      Mappings:
      Namespace Name Mixin selector
      official a Lcbc;a(Lbxl;Z)Z
      intermediary method_24927 Lnet/minecraft/class_4861;method_24927(Lnet/minecraft/class_1657;Z)Z
      named canTakeOutput Lnet/minecraft/screen/ForgingScreenHandler;canTakeOutput(Lnet/minecraft/entity/player/PlayerEntity;Z)Z
    • onTakeOutput

      protected abstract void onTakeOutput(PlayerEntity player, ItemStack stack)
      Mappings:
      Namespace Name Mixin selector
      official a Lcbc;a(Lbxl;Lcer;)V
      intermediary method_24923 Lnet/minecraft/class_4861;method_24923(Lnet/minecraft/class_1657;Lnet/minecraft/class_1799;)V
      named onTakeOutput Lnet/minecraft/screen/ForgingScreenHandler;onTakeOutput(Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/item/ItemStack;)V
    • canUse

      protected abstract boolean canUse(BlockState state)
      Mappings:
      Namespace Name Mixin selector
      official a Lcbc;a(Ldab;)Z
      intermediary method_24925 Lnet/minecraft/class_4861;method_24925(Lnet/minecraft/class_2680;)Z
      named canUse Lnet/minecraft/screen/ForgingScreenHandler;canUse(Lnet/minecraft/block/BlockState;)Z
    • method_48354

      private void method_48354(class_8047 class_8047)
      Mappings:
      Namespace Name Mixin selector
      official a Lcbc;a(Lcbd;)V
      intermediary method_48354 Lnet/minecraft/class_4861;method_48354(Lnet/minecraft/class_8047;)V
      named method_48354 Lnet/minecraft/screen/ForgingScreenHandler;method_48354(Lnet/minecraft/class_8047;)V
    • method_48355

      private void method_48355(class_8047 class_8047)
      Mappings:
      Namespace Name Mixin selector
      official b Lcbc;b(Lcbd;)V
      intermediary method_48355 Lnet/minecraft/class_4861;method_48355(Lnet/minecraft/class_8047;)V
      named method_48355 Lnet/minecraft/screen/ForgingScreenHandler;method_48355(Lnet/minecraft/class_8047;)V
    • method_48353

      private void method_48353(PlayerInventory playerInventory)
      Mappings:
      Namespace Name Mixin selector
      official a Lcbc;a(Lbxk;)V
      intermediary method_48353 Lnet/minecraft/class_4861;method_48353(Lnet/minecraft/class_1661;)V
      named method_48353 Lnet/minecraft/screen/ForgingScreenHandler;method_48353(Lnet/minecraft/entity/player/PlayerInventory;)V
    • updateResult

      public abstract void updateResult()
      Mappings:
      Namespace Name Mixin selector
      official m Lcbc;m()V
      intermediary method_24928 Lnet/minecraft/class_4861;method_24928()V
      named updateResult Lnet/minecraft/screen/ForgingScreenHandler;updateResult()V
    • method_48352

      protected abstract class_8047 method_48352()
      Mappings:
      Namespace Name Mixin selector
      official l Lcbc;l()Lcbd;
      intermediary method_48352 Lnet/minecraft/class_4861;method_48352()Lnet/minecraft/class_8047;
      named method_48352 Lnet/minecraft/screen/ForgingScreenHandler;method_48352()Lnet/minecraft/class_8047;
    • method_48358

      private SimpleInventory method_48358(int int2)
      Mappings:
      Namespace Name Mixin selector
      official e Lcbc;e(I)Lbdl;
      intermediary method_48358 Lnet/minecraft/class_4861;method_48358(I)Lnet/minecraft/class_1277;
      named method_48358 Lnet/minecraft/screen/ForgingScreenHandler;method_48358(I)Lnet/minecraft/inventory/SimpleInventory;
    • 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 Lcac;a(Lbcz;)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
    • close

      public void close(PlayerEntity player)
      Closes this screen handler.

      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:
      close in class ScreenHandler
      Mappings:
      Namespace Name Mixin selector
      official b Lcac;b(Lbxl;)V
      intermediary method_7595 Lnet/minecraft/class_1703;method_7595(Lnet/minecraft/class_1657;)V
      named close Lnet/minecraft/screen/ScreenHandler;close(Lnet/minecraft/entity/player/PlayerEntity;)V
    • 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 Lcac;a(Lbxl;)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
    • 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 Lcac;a(Lbxl;I)Lcer;
      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;
    • method_48356

      protected boolean method_48356(ItemStack itemStack)
      Mappings:
      Namespace Name Mixin selector
      official c Lcbc;c(Lcer;)Z
      intermediary method_48356 Lnet/minecraft/class_4861;method_48356(Lnet/minecraft/class_1799;)Z
      named method_48356 Lnet/minecraft/screen/ForgingScreenHandler;method_48356(Lnet/minecraft/item/ItemStack;)Z
    • method_48357

      public int method_48357(ItemStack itemStack)
      Mappings:
      Namespace Name Mixin selector
      official d Lcbc;d(Lcer;)I
      intermediary method_48357 Lnet/minecraft/class_4861;method_48357(Lnet/minecraft/class_1799;)I
      named method_48357 Lnet/minecraft/screen/ForgingScreenHandler;method_48357(Lnet/minecraft/item/ItemStack;)I
    • method_48360

      public int method_48360()
      Mappings:
      Namespace Name Mixin selector
      official o Lcbc;o()I
      intermediary method_48360 Lnet/minecraft/class_4861;method_48360()I
      named method_48360 Lnet/minecraft/screen/ForgingScreenHandler;method_48360()I
    • method_48359

      private int method_48359()
      Mappings:
      Namespace Name Mixin selector
      official n Lcbc;n()I
      intermediary method_48359 Lnet/minecraft/class_4861;method_48359()I
      named method_48359 Lnet/minecraft/screen/ForgingScreenHandler;method_48359()I
    • method_48361

      private int method_48361()
      Mappings:
      Namespace Name Mixin selector
      official p Lcbc;p()I
      intermediary method_48361 Lnet/minecraft/class_4861;method_48361()I
      named method_48361 Lnet/minecraft/screen/ForgingScreenHandler;method_48361()I
    • method_48362

      private int method_48362()
      Mappings:
      Namespace Name Mixin selector
      official q Lcbc;q()I
      intermediary method_48362 Lnet/minecraft/class_4861;method_48362()I
      named method_48362 Lnet/minecraft/screen/ForgingScreenHandler;method_48362()I
    • method_48363

      private int method_48363()
      Mappings:
      Namespace Name Mixin selector
      official r Lcbc;r()I
      intermediary method_48363 Lnet/minecraft/class_4861;method_48363()I
      named method_48363 Lnet/minecraft/screen/ForgingScreenHandler;method_48363()I