Class BeaconScreenHandler

java.lang.Object
net.minecraft.screen.ScreenHandler
net.minecraft.screen.BeaconScreenHandler

public class BeaconScreenHandler extends ScreenHandler
Mappings:
Namespace Name
official bzj
intermediary net/minecraft/class_1704
named net/minecraft/screen/BeaconScreenHandler
  • Field Details

    • field_30756

      private static final int field_30756
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official k Lbzj;k:I
      intermediary field_30756 Lnet/minecraft/class_1704;field_30756:I
      named field_30756 Lnet/minecraft/screen/BeaconScreenHandler;field_30756:I
    • field_30757

      private static final int field_30757
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official l Lbzj;l:I
      intermediary field_30757 Lnet/minecraft/class_1704;field_30757:I
      named field_30757 Lnet/minecraft/screen/BeaconScreenHandler;field_30757:I
    • field_30758

      private static final int field_30758
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official m Lbzj;m:I
      intermediary field_30758 Lnet/minecraft/class_1704;field_30758:I
      named field_30758 Lnet/minecraft/screen/BeaconScreenHandler;field_30758:I
    • field_30759

      private static final int field_30759
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official n Lbzj;n:I
      intermediary field_30759 Lnet/minecraft/class_1704;field_30759:I
      named field_30759 Lnet/minecraft/screen/BeaconScreenHandler;field_30759:I
    • field_30760

      private static final int field_30760
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official o Lbzj;o:I
      intermediary field_30760 Lnet/minecraft/class_1704;field_30760:I
      named field_30760 Lnet/minecraft/screen/BeaconScreenHandler;field_30760:I
    • field_30761

      private static final int field_30761
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official p Lbzj;p:I
      intermediary field_30761 Lnet/minecraft/class_1704;field_30761:I
      named field_30761 Lnet/minecraft/screen/BeaconScreenHandler;field_30761:I
    • field_30762

      private static final int field_30762
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official q Lbzj;q:I
      intermediary field_30762 Lnet/minecraft/class_1704;field_30762:I
      named field_30762 Lnet/minecraft/screen/BeaconScreenHandler;field_30762:I
    • payment

      private final Inventory payment
      Mappings:
      Namespace Name Mixin selector
      official r Lbzj;r:Lbcf;
      intermediary field_17287 Lnet/minecraft/class_1704;field_17287:Lnet/minecraft/class_1263;
      named payment Lnet/minecraft/screen/BeaconScreenHandler;payment:Lnet/minecraft/inventory/Inventory;
    • paymentSlot

      private final BeaconScreenHandler.PaymentSlot paymentSlot
      Mappings:
      Namespace Name Mixin selector
      official s Lbzj;s:Lbzj$a;
      intermediary field_17288 Lnet/minecraft/class_1704;field_17288:Lnet/minecraft/class_1704$class_1705;
      named paymentSlot Lnet/minecraft/screen/BeaconScreenHandler;paymentSlot:Lnet/minecraft/screen/BeaconScreenHandler$PaymentSlot;
    • context

      private final ScreenHandlerContext context
      Mappings:
      Namespace Name Mixin selector
      official t Lbzj;t:Lbzr;
      intermediary field_17289 Lnet/minecraft/class_1704;field_17289:Lnet/minecraft/class_3914;
      named context Lnet/minecraft/screen/BeaconScreenHandler;context:Lnet/minecraft/screen/ScreenHandlerContext;
    • propertyDelegate

      private final PropertyDelegate propertyDelegate
      Mappings:
      Namespace Name Mixin selector
      official u Lbzj;u:Lbzq;
      intermediary field_17290 Lnet/minecraft/class_1704;field_17290:Lnet/minecraft/class_3913;
      named propertyDelegate Lnet/minecraft/screen/BeaconScreenHandler;propertyDelegate:Lnet/minecraft/screen/PropertyDelegate;
  • Constructor Details

    • BeaconScreenHandler

      public BeaconScreenHandler(int syncId, Inventory inventory)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lbzj;<init>(ILbcf;)V
      intermediary <init> Lnet/minecraft/class_1704;<init>(ILnet/minecraft/class_1263;)V
      named <init> Lnet/minecraft/screen/BeaconScreenHandler;<init>(ILnet/minecraft/inventory/Inventory;)V
    • BeaconScreenHandler

      public BeaconScreenHandler(int syncId, Inventory inventory, PropertyDelegate propertyDelegate, ScreenHandlerContext context)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lbzj;<init>(ILbcf;Lbzq;Lbzr;)V
      intermediary <init> Lnet/minecraft/class_1704;<init>(ILnet/minecraft/class_1263;Lnet/minecraft/class_3913;Lnet/minecraft/class_3914;)V
      named <init> Lnet/minecraft/screen/BeaconScreenHandler;<init>(ILnet/minecraft/inventory/Inventory;Lnet/minecraft/screen/PropertyDelegate;Lnet/minecraft/screen/ScreenHandlerContext;)V
  • Method Details

    • 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 Lbzg;b(Lbwp;)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 Lbzg;a(Lbwp;)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
    • setProperty

      public void setProperty(int id, int value)
      Sets the property with ID id to value.

      Subclasses can call ScreenHandler.sendContentUpdates() to manually sync the change to the client.

      Overrides:
      setProperty in class ScreenHandler
      Mappings:
      Namespace Name Mixin selector
      official a Lbzg;a(II)V
      intermediary method_7606 Lnet/minecraft/class_1703;method_7606(II)V
      named setProperty Lnet/minecraft/screen/ScreenHandler;setProperty(II)V
    • 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 Lbzg;a(Lbwp;I)Lcdt;
      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;
    • getProperties

      public int getProperties()
      Mappings:
      Namespace Name Mixin selector
      official l Lbzj;l()I
      intermediary method_17373 Lnet/minecraft/class_1704;method_17373()I
      named getProperties Lnet/minecraft/screen/BeaconScreenHandler;getProperties()I
    • getPrimaryEffect

      @Nullable public @Nullable StatusEffect getPrimaryEffect()
      Mappings:
      Namespace Name Mixin selector
      official m Lbzj;m()Lbdi;
      intermediary method_17374 Lnet/minecraft/class_1704;method_17374()Lnet/minecraft/class_1291;
      named getPrimaryEffect Lnet/minecraft/screen/BeaconScreenHandler;getPrimaryEffect()Lnet/minecraft/entity/effect/StatusEffect;
    • getSecondaryEffect

      @Nullable public @Nullable StatusEffect getSecondaryEffect()
      Mappings:
      Namespace Name Mixin selector
      official n Lbzj;n()Lbdi;
      intermediary method_17375 Lnet/minecraft/class_1704;method_17375()Lnet/minecraft/class_1291;
      named getSecondaryEffect Lnet/minecraft/screen/BeaconScreenHandler;getSecondaryEffect()Lnet/minecraft/entity/effect/StatusEffect;
    • setEffects

      public void setEffects(Optional<StatusEffect> primary, Optional<StatusEffect> secondary)
      Mappings:
      Namespace Name Mixin selector
      official a Lbzj;a(Ljava/util/Optional;Ljava/util/Optional;)V
      intermediary method_17372 Lnet/minecraft/class_1704;method_17372(Ljava/util/Optional;Ljava/util/Optional;)V
      named setEffects Lnet/minecraft/screen/BeaconScreenHandler;setEffects(Ljava/util/Optional;Ljava/util/Optional;)V
    • hasPayment

      public boolean hasPayment()
      Mappings:
      Namespace Name Mixin selector
      official o Lbzj;o()Z
      intermediary method_17376 Lnet/minecraft/class_1704;method_17376()Z
      named hasPayment Lnet/minecraft/screen/BeaconScreenHandler;hasPayment()Z