Class BeaconScreenHandler

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

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

    • PAYMENT_SLOT_ID

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

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

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

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

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

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

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

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

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

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

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

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

    • BeaconScreenHandler

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

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

    • 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
      named onClosed Lnet/minecraft/screen/ScreenHandler;onClosed(Lnet/minecraft/entity/player/PlayerEntity;)V
      intermediary method_7595 Lnet/minecraft/class_1703;method_7595(Lnet/minecraft/class_1657;)V
      official b Lcpw;b(Lcmz;)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
      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 a Lcpw;a(Lcmz;)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
      named setProperty Lnet/minecraft/screen/ScreenHandler;setProperty(II)V
      intermediary method_7606 Lnet/minecraft/class_1703;method_7606(II)V
      official a Lcpw;a(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
      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 a Lcpw;a(Lcmz;I)Lcur;
    • getProperties

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

      public static int getRawIdForStatusEffect(@Nullable @Nullable RegistryEntry<StatusEffect> effect)
      Mappings:
      Namespace Name Mixin selector
      named getRawIdForStatusEffect Lnet/minecraft/screen/BeaconScreenHandler;getRawIdForStatusEffect(Lnet/minecraft/registry/entry/RegistryEntry;)I
      intermediary method_53173 Lnet/minecraft/class_1704;method_53173(Lnet/minecraft/class_6880;)I
      official a Lcpz;a(Lji;)I
    • getStatusEffectForRawId

      @Nullable public static @Nullable RegistryEntry<StatusEffect> getStatusEffectForRawId(int id)
      Mappings:
      Namespace Name Mixin selector
      named getStatusEffectForRawId Lnet/minecraft/screen/BeaconScreenHandler;getStatusEffectForRawId(I)Lnet/minecraft/registry/entry/RegistryEntry;
      intermediary method_53174 Lnet/minecraft/class_1704;method_53174(I)Lnet/minecraft/class_6880;
      official e Lcpz;e(I)Lji;
    • getPrimaryEffect

      @Nullable public @Nullable RegistryEntry<StatusEffect> getPrimaryEffect()
      Mappings:
      Namespace Name Mixin selector
      named getPrimaryEffect Lnet/minecraft/screen/BeaconScreenHandler;getPrimaryEffect()Lnet/minecraft/registry/entry/RegistryEntry;
      intermediary method_17374 Lnet/minecraft/class_1704;method_17374()Lnet/minecraft/class_6880;
      official m Lcpz;m()Lji;
    • getSecondaryEffect

      @Nullable public @Nullable RegistryEntry<StatusEffect> getSecondaryEffect()
      Mappings:
      Namespace Name Mixin selector
      named getSecondaryEffect Lnet/minecraft/screen/BeaconScreenHandler;getSecondaryEffect()Lnet/minecraft/registry/entry/RegistryEntry;
      intermediary method_17375 Lnet/minecraft/class_1704;method_17375()Lnet/minecraft/class_6880;
      official n Lcpz;n()Lji;
    • setEffects

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

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