Class LecternScreenHandler
- Mappings:
Namespace Name named net/minecraft/screen/LecternScreenHandlerintermediary net/minecraft/class_3916official cqz
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intprivate static final intprivate static final intprivate final Inventorystatic final intstatic final intprivate final PropertyDelegatestatic final intFields 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
ConstructorsConstructorDescriptionLecternScreenHandler(int syncId) LecternScreenHandler(int syncId, Inventory inventory, PropertyDelegate propertyDelegate) -
Method Summary
Modifier and TypeMethodDescriptionbooleancanUse(PlayerEntity player) Returns whether the screen handler can be used.intgetPage()booleanonButtonClick(PlayerEntity player, int id) Called whenplayerclicks a button withid.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.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, onClosed, onContentChanged, onSlotClick, packQuickCraftData, removeListener, sendContentUpdates, setCursorStack, setPreviousCursorStack, setPreviousTrackedSlot, setPreviousTrackedSlotMutable, setStackInSlot, shouldQuickCraftContinue, syncState, unpackQuickCraftButton, unpackQuickCraftStage, updateSlotStacks, updateSyncHandler, updateToClient
-
Field Details
-
field_30824
private static final int field_30824- See Also:
- Mappings:
Namespace Name Mixin selector named field_30824Lnet/minecraft/screen/LecternScreenHandler;field_30824:Iintermediary field_30824Lnet/minecraft/class_3916;field_30824:Iofficial oLcqz;o:I
-
field_30825
private static final int field_30825- See Also:
- Mappings:
Namespace Name Mixin selector named field_30825Lnet/minecraft/screen/LecternScreenHandler;field_30825:Iintermediary field_30825Lnet/minecraft/class_3916;field_30825:Iofficial pLcqz;p:I
-
PREVIOUS_PAGE_BUTTON_ID
public static final int PREVIOUS_PAGE_BUTTON_ID- See Also:
- Mappings:
Namespace Name Mixin selector named PREVIOUS_PAGE_BUTTON_IDLnet/minecraft/screen/LecternScreenHandler;PREVIOUS_PAGE_BUTTON_ID:Iintermediary field_30820Lnet/minecraft/class_3916;field_30820:Iofficial kLcqz;k:I
-
NEXT_PAGE_BUTTON_ID
public static final int NEXT_PAGE_BUTTON_ID- See Also:
- Mappings:
Namespace Name Mixin selector named NEXT_PAGE_BUTTON_IDLnet/minecraft/screen/LecternScreenHandler;NEXT_PAGE_BUTTON_ID:Iintermediary field_30821Lnet/minecraft/class_3916;field_30821:Iofficial lLcqz;l:I
-
TAKE_BOOK_BUTTON_ID
public static final int TAKE_BOOK_BUTTON_ID- See Also:
- Mappings:
Namespace Name Mixin selector named TAKE_BOOK_BUTTON_IDLnet/minecraft/screen/LecternScreenHandler;TAKE_BOOK_BUTTON_ID:Iintermediary field_30822Lnet/minecraft/class_3916;field_30822:Iofficial mLcqz;m:I
-
BASE_JUMP_TO_PAGE_BUTTON_ID
public static final int BASE_JUMP_TO_PAGE_BUTTON_ID- See Also:
- Mappings:
Namespace Name Mixin selector named BASE_JUMP_TO_PAGE_BUTTON_IDLnet/minecraft/screen/LecternScreenHandler;BASE_JUMP_TO_PAGE_BUTTON_ID:Iintermediary field_30823Lnet/minecraft/class_3916;field_30823:Iofficial nLcqz;n:I
-
inventory
- Mappings:
Namespace Name Mixin selector named inventoryLnet/minecraft/screen/LecternScreenHandler;inventory:Lnet/minecraft/inventory/Inventory;intermediary field_17313Lnet/minecraft/class_3916;field_17313:Lnet/minecraft/class_1263;official qLcqz;q:Lbqk;
-
propertyDelegate
- Mappings:
Namespace Name Mixin selector named propertyDelegateLnet/minecraft/screen/LecternScreenHandler;propertyDelegate:Lnet/minecraft/screen/PropertyDelegate;intermediary field_17314Lnet/minecraft/class_3916;field_17314:Lnet/minecraft/class_3913;official rLcqz;r:Lcqf;
-
-
Constructor Details
-
LecternScreenHandler
public LecternScreenHandler(int syncId) - Mappings:
Namespace Name Mixin selector named <init>Lnet/minecraft/screen/LecternScreenHandler;<init>(I)Vintermediary <init>Lnet/minecraft/class_3916;<init>(I)Vofficial <init>Lcqz;<init>(I)V
-
LecternScreenHandler
- Mappings:
Namespace Name Mixin selector named <init>Lnet/minecraft/screen/LecternScreenHandler;<init>(ILnet/minecraft/inventory/Inventory;Lnet/minecraft/screen/PropertyDelegate;)Vintermediary <init>Lnet/minecraft/class_3916;<init>(ILnet/minecraft/class_1263;Lnet/minecraft/class_3913;)Vofficial <init>Lcqz;<init>(ILbqk;Lcqf;)V
-
-
Method Details
-
onButtonClick
Called whenplayerclicks a button withid."Button click" is an abstract concept; it does not have to be triggered by a button. Examples of button clicks include selecting a recipe for a stonecutter, turning a page of a lectern's book, or selecting an enchantment on an enchanting table. Buttons are identified by an integer.
- Overrides:
onButtonClickin classScreenHandler- Returns:
- whether the button click is handled successfully
- Implementation Note:
- This is normally only called by the server; however, screens that use buttons can call this on the client.
- Mappings:
Namespace Name Mixin selector named onButtonClickLnet/minecraft/screen/ScreenHandler;onButtonClick(Lnet/minecraft/entity/player/PlayerEntity;I)Zintermediary method_7604Lnet/minecraft/class_1703;method_7604(Lnet/minecraft/class_1657;I)Zofficial aLcpu;a(Lcmx;I)Z
-
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;
-
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
-
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
-
getBookItem
- Mappings:
Namespace Name Mixin selector named getBookItemLnet/minecraft/screen/LecternScreenHandler;getBookItem()Lnet/minecraft/item/ItemStack;intermediary method_17418Lnet/minecraft/class_3916;method_17418()Lnet/minecraft/class_1799;official lLcqz;l()Lcuq;
-
getPage
public int getPage()- Mappings:
Namespace Name Mixin selector named getPageLnet/minecraft/screen/LecternScreenHandler;getPage()Iintermediary method_17419Lnet/minecraft/class_3916;method_17419()Iofficial mLcqz;m()I
-