Class BeaconScreenHandler
- Mappings:
Namespace Name named net/minecraft/screen/BeaconScreenHandlerintermediary net/minecraft/class_1704official cpy
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final intprivate final ScreenHandlerContextprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate final Inventoryprivate static final intprivate final BeaconScreenHandler.PaymentSlotprivate static final intprivate final PropertyDelegateFields inherited from class net.minecraft.screen.ScreenHandler
EMPTY_SPACE_SLOT_INDEX, field_30731, field_30732, field_30733, field_30734, field_30735, field_30736, field_30737, slots, syncId -
Constructor Summary
ConstructorsConstructorDescriptionBeaconScreenHandler(int syncId, Inventory inventory) BeaconScreenHandler(int syncId, Inventory inventory, PropertyDelegate propertyDelegate, ScreenHandlerContext context) -
Method Summary
Modifier and TypeMethodDescriptionbooleancanUse(PlayerEntity player) Returns whether the screen handler can be used.intstatic intstatic @Nullable RegistryEntry<StatusEffect> getStatusEffectForRawId(int id) booleanvoidonClosed(PlayerEntity player) Called when this screen handler is closed.quickMove(PlayerEntity player, int slot) Quick-moves the stack atslotto other slots of the screen handler that belong to a different inventory or another section of the same inventory.voidsetEffects(Optional<RegistryEntry<StatusEffect>> primary, Optional<RegistryEntry<StatusEffect>> secondary) voidsetProperty(int id, int value) Sets the property with IDidtovalue.Methods inherited from class net.minecraft.screen.ScreenHandler
addListener, addProperties, addProperty, addSlot, calculateComparatorOutput, calculateComparatorOutput, calculateStackSize, canInsertIntoSlot, canInsertIntoSlot, canInsertItemIntoSlot, canUse, checkDataCount, checkSize, copySharedSlots, disableSyncing, dropInventory, enableSyncing, endQuickCraft, getCursorStack, getRevision, getSlot, getSlotIndex, getStacks, getType, insertItem, isValid, nextRevision, onButtonClick, onContentChanged, onSlotClick, packQuickCraftData, removeListener, sendContentUpdates, setCursorStack, setPreviousCursorStack, setPreviousTrackedSlot, setPreviousTrackedSlotMutable, setStackInSlot, shouldQuickCraftContinue, syncState, unpackQuickCraftButton, unpackQuickCraftStage, updateSlotStacks, updateSyncHandler, updateToClient
-
Field Details
-
PAYMENT_SLOT_ID
private static final int PAYMENT_SLOT_ID- See Also:
- Mappings:
Namespace Name Mixin selector named PAYMENT_SLOT_IDLnet/minecraft/screen/BeaconScreenHandler;PAYMENT_SLOT_ID:Iintermediary field_30756Lnet/minecraft/class_1704;field_30756:Iofficial kLcpy;k:I
-
BEACON_INVENTORY_SIZE
private static final int BEACON_INVENTORY_SIZE- See Also:
- Mappings:
Namespace Name Mixin selector named BEACON_INVENTORY_SIZELnet/minecraft/screen/BeaconScreenHandler;BEACON_INVENTORY_SIZE:Iintermediary field_30757Lnet/minecraft/class_1704;field_30757:Iofficial lLcpy;l:I
-
PROPERTY_COUNT
private static final int PROPERTY_COUNT- See Also:
- Mappings:
Namespace Name Mixin selector named PROPERTY_COUNTLnet/minecraft/screen/BeaconScreenHandler;PROPERTY_COUNT:Iintermediary field_30758Lnet/minecraft/class_1704;field_30758:Iofficial mLcpy;m:I
-
INVENTORY_START
private static final int INVENTORY_START- See Also:
- Mappings:
Namespace Name Mixin selector named INVENTORY_STARTLnet/minecraft/screen/BeaconScreenHandler;INVENTORY_START:Iintermediary field_30759Lnet/minecraft/class_1704;field_30759:Iofficial nLcpy;n:I
-
INVENTORY_END
private static final int INVENTORY_END- See Also:
- Mappings:
Namespace Name Mixin selector named INVENTORY_ENDLnet/minecraft/screen/BeaconScreenHandler;INVENTORY_END:Iintermediary field_30760Lnet/minecraft/class_1704;field_30760:Iofficial oLcpy;o:I
-
HOTBAR_START
private static final int HOTBAR_START- See Also:
- Mappings:
Namespace Name Mixin selector named HOTBAR_STARTLnet/minecraft/screen/BeaconScreenHandler;HOTBAR_START:Iintermediary field_30761Lnet/minecraft/class_1704;field_30761:Iofficial pLcpy;p:I
-
HOTBAR_END
private static final int HOTBAR_END- See Also:
- Mappings:
Namespace Name Mixin selector named HOTBAR_ENDLnet/minecraft/screen/BeaconScreenHandler;HOTBAR_END:Iintermediary field_30762Lnet/minecraft/class_1704;field_30762:Iofficial qLcpy;q:I
-
field_45758
private static final int field_45758- See Also:
- Mappings:
Namespace Name Mixin selector named field_45758Lnet/minecraft/screen/BeaconScreenHandler;field_45758:Iintermediary field_45758Lnet/minecraft/class_1704;field_45758:Iofficial rLcpy;r:I
-
payment
- Mappings:
Namespace Name Mixin selector named paymentLnet/minecraft/screen/BeaconScreenHandler;payment:Lnet/minecraft/inventory/Inventory;intermediary field_17287Lnet/minecraft/class_1704;field_17287:Lnet/minecraft/class_1263;official sLcpy;s:Lbqk;
-
paymentSlot
- Mappings:
Namespace Name Mixin selector named paymentSlotLnet/minecraft/screen/BeaconScreenHandler;paymentSlot:Lnet/minecraft/screen/BeaconScreenHandler$PaymentSlot;intermediary field_17288Lnet/minecraft/class_1704;field_17288:Lnet/minecraft/class_1704$class_1705;official tLcpy;t:Lcpy$a;
-
context
- Mappings:
Namespace Name Mixin selector named contextLnet/minecraft/screen/BeaconScreenHandler;context:Lnet/minecraft/screen/ScreenHandlerContext;intermediary field_17289Lnet/minecraft/class_1704;field_17289:Lnet/minecraft/class_3914;official uLcpy;u:Lcqg;
-
propertyDelegate
- Mappings:
Namespace Name Mixin selector named propertyDelegateLnet/minecraft/screen/BeaconScreenHandler;propertyDelegate:Lnet/minecraft/screen/PropertyDelegate;intermediary field_17290Lnet/minecraft/class_1704;field_17290:Lnet/minecraft/class_3913;official vLcpy;v:Lcqf;
-
-
Constructor Details
-
BeaconScreenHandler
- Mappings:
Namespace Name Mixin selector named <init>Lnet/minecraft/screen/BeaconScreenHandler;<init>(ILnet/minecraft/inventory/Inventory;)Vintermediary <init>Lnet/minecraft/class_1704;<init>(ILnet/minecraft/class_1263;)Vofficial <init>Lcpy;<init>(ILbqk;)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;)Vintermediary <init>Lnet/minecraft/class_1704;<init>(ILnet/minecraft/class_1263;Lnet/minecraft/class_3913;Lnet/minecraft/class_3914;)Vofficial <init>Lcpy;<init>(ILbqk;Lcqf;Lcqg;)V
-
-
Method Details
-
onClosed
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:
onClosedin classScreenHandler- Mappings:
Namespace Name Mixin selector named onClosedLnet/minecraft/screen/ScreenHandler;onClosed(Lnet/minecraft/entity/player/PlayerEntity;)Vintermediary method_7595Lnet/minecraft/class_1703;method_7595(Lnet/minecraft/class_1657;)Vofficial aLcpu;a(Lcmx;)V
-
canUse
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:
canUsein classScreenHandler- Returns:
- whether the screen handler can be used
- Mappings:
Namespace Name Mixin selector named canUseLnet/minecraft/screen/ScreenHandler;canUse(Lnet/minecraft/entity/player/PlayerEntity;)Zintermediary method_7597Lnet/minecraft/class_1703;method_7597(Lnet/minecraft/class_1657;)Zofficial bLcpu;b(Lcmx;)Z
-
setProperty
public void setProperty(int id, int value) Sets the property with IDidtovalue.Subclasses can call
ScreenHandler.sendContentUpdates()to manually sync the change to the client.- Overrides:
setPropertyin classScreenHandler- Mappings:
Namespace Name Mixin selector named setPropertyLnet/minecraft/screen/ScreenHandler;setProperty(II)Vintermediary method_7606Lnet/minecraft/class_1703;method_7606(II)Vofficial aLcpu;a(II)V
-
quickMove
Quick-moves the stack atslotto 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:
quickMovein classScreenHandler- Parameters:
slot- the index of the slot to quick-move from- Returns:
ItemStack.EMPTYwhen no stack can be transferred, otherwise the original stack- See Also:
- Mappings:
Namespace Name Mixin selector named quickMoveLnet/minecraft/screen/ScreenHandler;quickMove(Lnet/minecraft/entity/player/PlayerEntity;I)Lnet/minecraft/item/ItemStack;intermediary method_7601Lnet/minecraft/class_1703;method_7601(Lnet/minecraft/class_1657;I)Lnet/minecraft/class_1799;official bLcpu;b(Lcmx;I)Lcuq;
-
getProperties
public int getProperties()- Mappings:
Namespace Name Mixin selector named getPropertiesLnet/minecraft/screen/BeaconScreenHandler;getProperties()Iintermediary method_17373Lnet/minecraft/class_1704;method_17373()Iofficial lLcpy;l()I
-
getRawIdForStatusEffect
- Mappings:
Namespace Name Mixin selector named getRawIdForStatusEffectLnet/minecraft/screen/BeaconScreenHandler;getRawIdForStatusEffect(Lnet/minecraft/registry/entry/RegistryEntry;)Iintermediary method_53173Lnet/minecraft/class_1704;method_53173(Lnet/minecraft/class_6880;)Iofficial aLcpy;a(Ljm;)I
-
getStatusEffectForRawId
- Mappings:
Namespace Name Mixin selector named getStatusEffectForRawIdLnet/minecraft/screen/BeaconScreenHandler;getStatusEffectForRawId(I)Lnet/minecraft/registry/entry/RegistryEntry;intermediary method_53174Lnet/minecraft/class_1704;method_53174(I)Lnet/minecraft/class_6880;official eLcpy;e(I)Ljm;
-
getPrimaryEffect
- Mappings:
Namespace Name Mixin selector named getPrimaryEffectLnet/minecraft/screen/BeaconScreenHandler;getPrimaryEffect()Lnet/minecraft/registry/entry/RegistryEntry;intermediary method_17374Lnet/minecraft/class_1704;method_17374()Lnet/minecraft/class_6880;official mLcpy;m()Ljm;
-
getSecondaryEffect
- Mappings:
Namespace Name Mixin selector named getSecondaryEffectLnet/minecraft/screen/BeaconScreenHandler;getSecondaryEffect()Lnet/minecraft/registry/entry/RegistryEntry;intermediary method_17375Lnet/minecraft/class_1704;method_17375()Lnet/minecraft/class_6880;official nLcpy;n()Ljm;
-
setEffects
public void setEffects(Optional<RegistryEntry<StatusEffect>> primary, Optional<RegistryEntry<StatusEffect>> secondary) - Mappings:
Namespace Name Mixin selector named setEffectsLnet/minecraft/screen/BeaconScreenHandler;setEffects(Ljava/util/Optional;Ljava/util/Optional;)Vintermediary method_17372Lnet/minecraft/class_1704;method_17372(Ljava/util/Optional;Ljava/util/Optional;)Vofficial aLcpy;a(Ljava/util/Optional;Ljava/util/Optional;)V
-
hasPayment
public boolean hasPayment()- Mappings:
Namespace Name Mixin selector named hasPaymentLnet/minecraft/screen/BeaconScreenHandler;hasPayment()Zintermediary method_17376Lnet/minecraft/class_1704;method_17376()Zofficial oLcpy;o()Z
-