Class BeaconScreenHandler
- Mappings:
Namespace Name official bwpintermediary net/minecraft/class_1704named net/minecraft/screen/BeaconScreenHandler
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ScreenHandlerContextprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate final Inventoryprivate final BeaconScreenHandler.PaymentSlotprivate 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.voidclose(PlayerEntity player) Closes this screen handler.intbooleanvoidsetEffects(Optional<StatusEffect> primary, Optional<StatusEffect> secondary) voidsetProperty(int id, int value) Sets the property with IDidtovalue.transferSlot(PlayerEntity player, int index) Transfers (or "quick-moves") the stack at slotindexto other slots of the screen handler that belong to a different inventory.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
-
field_30756
private static final int field_30756- See Also:
- Mappings:
Namespace Name Mixin selector official kLbwp;k:Iintermediary field_30756Lnet/minecraft/class_1704;field_30756:Inamed field_30756Lnet/minecraft/screen/BeaconScreenHandler;field_30756:I
-
field_30757
private static final int field_30757- See Also:
- Mappings:
Namespace Name Mixin selector official lLbwp;l:Iintermediary field_30757Lnet/minecraft/class_1704;field_30757:Inamed field_30757Lnet/minecraft/screen/BeaconScreenHandler;field_30757:I
-
field_30758
private static final int field_30758- See Also:
- Mappings:
Namespace Name Mixin selector official mLbwp;m:Iintermediary field_30758Lnet/minecraft/class_1704;field_30758:Inamed field_30758Lnet/minecraft/screen/BeaconScreenHandler;field_30758:I
-
field_30759
private static final int field_30759- See Also:
- Mappings:
Namespace Name Mixin selector official nLbwp;n:Iintermediary field_30759Lnet/minecraft/class_1704;field_30759:Inamed field_30759Lnet/minecraft/screen/BeaconScreenHandler;field_30759:I
-
field_30760
private static final int field_30760- See Also:
- Mappings:
Namespace Name Mixin selector official oLbwp;o:Iintermediary field_30760Lnet/minecraft/class_1704;field_30760:Inamed field_30760Lnet/minecraft/screen/BeaconScreenHandler;field_30760:I
-
field_30761
private static final int field_30761- See Also:
- Mappings:
Namespace Name Mixin selector official pLbwp;p:Iintermediary field_30761Lnet/minecraft/class_1704;field_30761:Inamed field_30761Lnet/minecraft/screen/BeaconScreenHandler;field_30761:I
-
field_30762
private static final int field_30762- See Also:
- Mappings:
Namespace Name Mixin selector official qLbwp;q:Iintermediary field_30762Lnet/minecraft/class_1704;field_30762:Inamed field_30762Lnet/minecraft/screen/BeaconScreenHandler;field_30762:I
-
payment
- Mappings:
Namespace Name Mixin selector official rLbwp;r:Lbac;intermediary field_17287Lnet/minecraft/class_1704;field_17287:Lnet/minecraft/class_1263;named paymentLnet/minecraft/screen/BeaconScreenHandler;payment:Lnet/minecraft/inventory/Inventory;
-
paymentSlot
- Mappings:
Namespace Name Mixin selector official sLbwp;s:Lbwp$a;intermediary field_17288Lnet/minecraft/class_1704;field_17288:Lnet/minecraft/class_1704$class_1705;named paymentSlotLnet/minecraft/screen/BeaconScreenHandler;paymentSlot:Lnet/minecraft/screen/BeaconScreenHandler$PaymentSlot;
-
context
- Mappings:
Namespace Name Mixin selector official tLbwp;t:Lbwx;intermediary field_17289Lnet/minecraft/class_1704;field_17289:Lnet/minecraft/class_3914;named contextLnet/minecraft/screen/BeaconScreenHandler;context:Lnet/minecraft/screen/ScreenHandlerContext;
-
propertyDelegate
- Mappings:
Namespace Name Mixin selector official uLbwp;u:Lbww;intermediary field_17290Lnet/minecraft/class_1704;field_17290:Lnet/minecraft/class_3913;named propertyDelegateLnet/minecraft/screen/BeaconScreenHandler;propertyDelegate:Lnet/minecraft/screen/PropertyDelegate;
-
-
Constructor Details
-
BeaconScreenHandler
- Mappings:
Namespace Name Mixin selector official <init>Lbwp;<init>(ILbac;)Vintermediary <init>Lnet/minecraft/class_1704;<init>(ILnet/minecraft/class_1263;)Vnamed <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>Lbwp;<init>(ILbac;Lbww;Lbwx;)Vintermediary <init>Lnet/minecraft/class_1704;<init>(ILnet/minecraft/class_1263;Lnet/minecraft/class_3913;Lnet/minecraft/class_3914;)Vnamed <init>Lnet/minecraft/screen/BeaconScreenHandler;<init>(ILnet/minecraft/inventory/Inventory;Lnet/minecraft/screen/PropertyDelegate;Lnet/minecraft/screen/ScreenHandlerContext;)V
-
-
Method Details
-
close
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:
closein classScreenHandler- Mappings:
Namespace Name Mixin selector official bLbwm;b(Lbuc;)Vintermediary method_7595Lnet/minecraft/class_1703;method_7595(Lnet/minecraft/class_1657;)Vnamed closeLnet/minecraft/screen/ScreenHandler;close(Lnet/minecraft/entity/player/PlayerEntity;)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 official aLbwm;a(Lbuc;)Zintermediary method_7597Lnet/minecraft/class_1703;method_7597(Lnet/minecraft/class_1657;)Znamed canUseLnet/minecraft/screen/ScreenHandler;canUse(Lnet/minecraft/entity/player/PlayerEntity;)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 official aLbwm;a(II)Vintermediary method_7606Lnet/minecraft/class_1703;method_7606(II)Vnamed setPropertyLnet/minecraft/screen/ScreenHandler;setProperty(II)V
-
transferSlot
Transfers (or "quick-moves") the stack at slotindexto other slots of the screen handler that belong to a different inventory.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.- Specified by:
transferSlotin classScreenHandler- Returns:
ItemStack.EMPTYwhen no stack can be transferred, otherwise the original stack- See Also:
- Mappings:
Namespace Name Mixin selector official aLbwm;a(Lbuc;I)Lcax;intermediary method_7601Lnet/minecraft/class_1703;method_7601(Lnet/minecraft/class_1657;I)Lnet/minecraft/class_1799;named transferSlotLnet/minecraft/screen/ScreenHandler;transferSlot(Lnet/minecraft/entity/player/PlayerEntity;I)Lnet/minecraft/item/ItemStack;
-
getProperties
public int getProperties()- Mappings:
Namespace Name Mixin selector official lLbwp;l()Iintermediary method_17373Lnet/minecraft/class_1704;method_17373()Inamed getPropertiesLnet/minecraft/screen/BeaconScreenHandler;getProperties()I
-
getPrimaryEffect
- Mappings:
Namespace Name Mixin selector official mLbwp;m()Lbbe;intermediary method_17374Lnet/minecraft/class_1704;method_17374()Lnet/minecraft/class_1291;named getPrimaryEffectLnet/minecraft/screen/BeaconScreenHandler;getPrimaryEffect()Lnet/minecraft/entity/effect/StatusEffect;
-
getSecondaryEffect
- Mappings:
Namespace Name Mixin selector official nLbwp;n()Lbbe;intermediary method_17375Lnet/minecraft/class_1704;method_17375()Lnet/minecraft/class_1291;named getSecondaryEffectLnet/minecraft/screen/BeaconScreenHandler;getSecondaryEffect()Lnet/minecraft/entity/effect/StatusEffect;
-
setEffects
- Mappings:
Namespace Name Mixin selector official aLbwp;a(Ljava/util/Optional;Ljava/util/Optional;)Vintermediary method_17372Lnet/minecraft/class_1704;method_17372(Ljava/util/Optional;Ljava/util/Optional;)Vnamed setEffectsLnet/minecraft/screen/BeaconScreenHandler;setEffects(Ljava/util/Optional;Ljava/util/Optional;)V
-
hasPayment
public boolean hasPayment()- Mappings:
Namespace Name Mixin selector official oLbwp;o()Zintermediary method_17376Lnet/minecraft/class_1704;method_17376()Znamed hasPaymentLnet/minecraft/screen/BeaconScreenHandler;hasPayment()Z
-