Class CreativeInventoryScreen.CreativeScreenHandler
java.lang.Object
net.minecraft.screen.ScreenHandler
net.minecraft.client.gui.screen.ingame.CreativeInventoryScreen.CreativeScreenHandler
- Enclosing class:
CreativeInventoryScreen
@Environment(CLIENT)
public static class CreativeInventoryScreen.CreativeScreenHandler
extends ScreenHandler
- Mappings:
Namespace Name official evs$bintermediary net/minecraft/class_481$class_483named net/minecraft/client/gui/screen/ingame/CreativeInventoryScreen$CreativeScreenHandler
-
Field Summary
FieldsFields 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanInsertIntoSlot(ItemStack stack, Slot slot) Returns whetherstackcan be inserted toslot.booleancanInsertIntoSlot(Slot slot) booleancanUse(PlayerEntity player) Returns whether the screen handler can be used.protected intprotected intgetRow(float scroll) protected floatgetScrollPosition(float current, double amount) protected floatgetScrollPosition(int row) 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.voidscrollItems(float position) voidsetCursorStack(ItemStack stack) booleanMethods inherited from class net.minecraft.screen.ScreenHandler
addListener, addProperties, addProperty, addSlot, calculateComparatorOutput, calculateComparatorOutput, calculateStackSize, canInsertItemIntoSlot, canUse, checkDataCount, checkSize, copySharedSlots, disableSyncing, dropInventory, enableSyncing, endQuickCraft, getRevision, getSlot, getSlotIndex, getStacks, getType, insertItem, isValid, nextRevision, onButtonClick, onClosed, onContentChanged, onSlotClick, packQuickCraftData, removeListener, sendContentUpdates, setPreviousCursorStack, setPreviousTrackedSlot, setPreviousTrackedSlotMutable, setProperty, setStackInSlot, shouldQuickCraftContinue, syncState, unpackQuickCraftButton, unpackQuickCraftStage, updateSlotStacks, updateSyncHandler, updateToClient
-
Field Details
-
itemList
- Mappings:
Namespace Name Mixin selector official kLevs$b;k:Lhn;intermediary field_2897Lnet/minecraft/class_481$class_483;field_2897:Lnet/minecraft/class_2371;named itemListLnet/minecraft/client/gui/screen/ingame/CreativeInventoryScreen$CreativeScreenHandler;itemList:Lnet/minecraft/util/collection/DefaultedList;
-
parent
- Mappings:
Namespace Name Mixin selector official lLevs$b;l:Lcbd;intermediary field_29349Lnet/minecraft/class_481$class_483;field_29349:Lnet/minecraft/class_1703;named parentLnet/minecraft/client/gui/screen/ingame/CreativeInventoryScreen$CreativeScreenHandler;parent:Lnet/minecraft/screen/ScreenHandler;
-
-
Constructor Details
-
CreativeScreenHandler
- Mappings:
Namespace Name Mixin selector official <init>Levs$b;<init>(Lbym;)Vintermediary <init>Lnet/minecraft/class_481$class_483;<init>(Lnet/minecraft/class_1657;)Vnamed <init>Lnet/minecraft/client/gui/screen/ingame/CreativeInventoryScreen$CreativeScreenHandler;<init>(Lnet/minecraft/entity/player/PlayerEntity;)V
-
-
Method Details
-
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 aLcbd;a(Lbym;)Zintermediary method_7597Lnet/minecraft/class_1703;method_7597(Lnet/minecraft/class_1657;)Znamed canUseLnet/minecraft/screen/ScreenHandler;canUse(Lnet/minecraft/entity/player/PlayerEntity;)Z
-
getOverflowRows
protected int getOverflowRows()- Mappings:
Namespace Name Mixin selector official lLevs$b;l()Iintermediary method_47428Lnet/minecraft/class_481$class_483;method_47428()Inamed getOverflowRowsLnet/minecraft/client/gui/screen/ingame/CreativeInventoryScreen$CreativeScreenHandler;getOverflowRows()I
-
getRow
protected int getRow(float scroll) - Mappings:
Namespace Name Mixin selector official aLevs$b;a(F)Iintermediary method_47425Lnet/minecraft/class_481$class_483;method_47425(F)Inamed getRowLnet/minecraft/client/gui/screen/ingame/CreativeInventoryScreen$CreativeScreenHandler;getRow(F)I
-
getScrollPosition
protected float getScrollPosition(int row) - Mappings:
Namespace Name Mixin selector official eLevs$b;e(I)Fintermediary method_47427Lnet/minecraft/class_481$class_483;method_47427(I)Fnamed getScrollPositionLnet/minecraft/client/gui/screen/ingame/CreativeInventoryScreen$CreativeScreenHandler;getScrollPosition(I)F
-
getScrollPosition
protected float getScrollPosition(float current, double amount) - Mappings:
Namespace Name Mixin selector official aLevs$b;a(FD)Fintermediary method_47426Lnet/minecraft/class_481$class_483;method_47426(FD)Fnamed getScrollPositionLnet/minecraft/client/gui/screen/ingame/CreativeInventoryScreen$CreativeScreenHandler;getScrollPosition(FD)F
-
scrollItems
public void scrollItems(float position) - Mappings:
Namespace Name Mixin selector official bLevs$b;b(F)Vintermediary method_2473Lnet/minecraft/class_481$class_483;method_2473(F)Vnamed scrollItemsLnet/minecraft/client/gui/screen/ingame/CreativeInventoryScreen$CreativeScreenHandler;scrollItems(F)V
-
shouldShowScrollbar
public boolean shouldShowScrollbar()- Mappings:
Namespace Name Mixin selector official mLevs$b;m()Zintermediary method_2474Lnet/minecraft/class_481$class_483;method_2474()Znamed shouldShowScrollbarLnet/minecraft/client/gui/screen/ingame/CreativeInventoryScreen$CreativeScreenHandler;shouldShowScrollbar()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 official aLcbd;a(Lbym;I)Lcfx;intermediary method_7601Lnet/minecraft/class_1703;method_7601(Lnet/minecraft/class_1657;I)Lnet/minecraft/class_1799;named quickMoveLnet/minecraft/screen/ScreenHandler;quickMove(Lnet/minecraft/entity/player/PlayerEntity;I)Lnet/minecraft/item/ItemStack;
-
canInsertIntoSlot
Returns whetherstackcan be inserted toslot.Subclasses should override this to return
falseif the slot is used for output.- Overrides:
canInsertIntoSlotin classScreenHandler- Returns:
- whether
stackcan be inserted toslot - Mappings:
Namespace Name Mixin selector official aLcbd;a(Lcfx;Lccv;)Zintermediary method_7613Lnet/minecraft/class_1703;method_7613(Lnet/minecraft/class_1799;Lnet/minecraft/class_1735;)Znamed canInsertIntoSlotLnet/minecraft/screen/ScreenHandler;canInsertIntoSlot(Lnet/minecraft/item/ItemStack;Lnet/minecraft/screen/slot/Slot;)Z
-
canInsertIntoSlot
- Overrides:
canInsertIntoSlotin classScreenHandler- Mappings:
Namespace Name Mixin selector official bLcbd;b(Lccv;)Zintermediary method_7615Lnet/minecraft/class_1703;method_7615(Lnet/minecraft/class_1735;)Znamed canInsertIntoSlotLnet/minecraft/screen/ScreenHandler;canInsertIntoSlot(Lnet/minecraft/screen/slot/Slot;)Z
-
getCursorStack
- Overrides:
getCursorStackin classScreenHandler- Mappings:
Namespace Name Mixin selector official gLcbd;g()Lcfx;intermediary method_34255Lnet/minecraft/class_1703;method_34255()Lnet/minecraft/class_1799;named getCursorStackLnet/minecraft/screen/ScreenHandler;getCursorStack()Lnet/minecraft/item/ItemStack;
-
setCursorStack
- Overrides:
setCursorStackin classScreenHandler- Mappings:
Namespace Name Mixin selector official bLcbd;b(Lcfx;)Vintermediary method_34254Lnet/minecraft/class_1703;method_34254(Lnet/minecraft/class_1799;)Vnamed setCursorStackLnet/minecraft/screen/ScreenHandler;setCursorStack(Lnet/minecraft/item/ItemStack;)V
-