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 named net/minecraft/client/gui/screen/ingame/CreativeInventoryScreen$CreativeScreenHandler
intermediary net/minecraft/class_481$class_483
official fvc$b
-
Field Summary
Fields 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, field_52557, field_52558, slots, syncId
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
canInsertIntoSlot
(ItemStack stack, Slot slot) Returns whetherstack
can be inserted toslot
.boolean
canInsertIntoSlot
(Slot slot) boolean
canUse
(PlayerEntity player) Returns whether the screen handler can be used.protected int
protected int
getRow
(float scroll) protected float
getScrollPosition
(float current, double amount) protected float
getScrollPosition
(int row) quickMove
(PlayerEntity player, int slot) Quick-moves the stack atslot
to other slots of the screen handler that belong to a different inventory or another section of the same inventory.void
scrollItems
(float position) void
setCursorStack
(ItemStack stack) boolean
Methods inherited from class net.minecraft.screen.ScreenHandler
addListener, addPlayerHotbarSlots, addPlayerInventorySlots, addPlayerSlots, 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, selectBundleStack, sendContentUpdates, setPreviousCursorStack, setPreviousTrackedSlot, setPreviousTrackedSlotMutable, setProperty, setStackInSlot, shouldQuickCraftContinue, syncState, unpackQuickCraftButton, unpackQuickCraftStage, updateSlotStacks, updateSyncHandler, updateToClient
-
Field Details
-
itemList
- Mappings:
Namespace Name Mixin selector named itemList
Lnet/minecraft/client/gui/screen/ingame/CreativeInventoryScreen$CreativeScreenHandler;itemList:Lnet/minecraft/util/collection/DefaultedList;
intermediary field_2897
Lnet/minecraft/class_481$class_483;field_2897:Lnet/minecraft/class_2371;
official m
Lfvc$b;m:Ljz;
-
parent
- Mappings:
Namespace Name Mixin selector named parent
Lnet/minecraft/client/gui/screen/ingame/CreativeInventoryScreen$CreativeScreenHandler;parent:Lnet/minecraft/screen/ScreenHandler;
intermediary field_29349
Lnet/minecraft/class_481$class_483;field_29349:Lnet/minecraft/class_1703;
official n
Lfvc$b;n:Lctb;
-
-
Constructor Details
-
CreativeScreenHandler
- Mappings:
Namespace Name Mixin selector named <init>
Lnet/minecraft/client/gui/screen/ingame/CreativeInventoryScreen$CreativeScreenHandler;<init>(Lnet/minecraft/entity/player/PlayerEntity;)V
intermediary <init>
Lnet/minecraft/class_481$class_483;<init>(Lnet/minecraft/class_1657;)V
official <init>
Lfvc$b;<init>(Lcpw;)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:
canUse
in classScreenHandler
- 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 b
Lctb;b(Lcpw;)Z
-
getOverflowRows
protected int getOverflowRows()- Mappings:
Namespace Name Mixin selector named getOverflowRows
Lnet/minecraft/client/gui/screen/ingame/CreativeInventoryScreen$CreativeScreenHandler;getOverflowRows()I
intermediary method_47428
Lnet/minecraft/class_481$class_483;method_47428()I
official l
Lfvc$b;l()I
-
getRow
protected int getRow(float scroll) - Mappings:
Namespace Name Mixin selector named getRow
Lnet/minecraft/client/gui/screen/ingame/CreativeInventoryScreen$CreativeScreenHandler;getRow(F)I
intermediary method_47425
Lnet/minecraft/class_481$class_483;method_47425(F)I
official a
Lfvc$b;a(F)I
-
getScrollPosition
protected float getScrollPosition(int row) - Mappings:
Namespace Name Mixin selector named getScrollPosition
Lnet/minecraft/client/gui/screen/ingame/CreativeInventoryScreen$CreativeScreenHandler;getScrollPosition(I)F
intermediary method_47427
Lnet/minecraft/class_481$class_483;method_47427(I)F
official e
Lfvc$b;e(I)F
-
getScrollPosition
protected float getScrollPosition(float current, double amount) - Mappings:
Namespace Name Mixin selector named getScrollPosition
Lnet/minecraft/client/gui/screen/ingame/CreativeInventoryScreen$CreativeScreenHandler;getScrollPosition(FD)F
intermediary method_47426
Lnet/minecraft/class_481$class_483;method_47426(FD)F
official a
Lfvc$b;a(FD)F
-
scrollItems
public void scrollItems(float position) - Mappings:
Namespace Name Mixin selector named scrollItems
Lnet/minecraft/client/gui/screen/ingame/CreativeInventoryScreen$CreativeScreenHandler;scrollItems(F)V
intermediary method_2473
Lnet/minecraft/class_481$class_483;method_2473(F)V
official b
Lfvc$b;b(F)V
-
shouldShowScrollbar
public boolean shouldShowScrollbar()- Mappings:
Namespace Name Mixin selector named shouldShowScrollbar
Lnet/minecraft/client/gui/screen/ingame/CreativeInventoryScreen$CreativeScreenHandler;shouldShowScrollbar()Z
intermediary method_2474
Lnet/minecraft/class_481$class_483;method_2474()Z
official m
Lfvc$b;m()Z
-
quickMove
Quick-moves the stack atslot
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 classScreenHandler
- 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 b
Lctb;b(Lcpw;I)Lcxo;
-
canInsertIntoSlot
Returns whetherstack
can be inserted toslot
.Subclasses should override this to return
false
if the slot is used for output.- Overrides:
canInsertIntoSlot
in classScreenHandler
- Returns:
- whether
stack
can be inserted toslot
- Mappings:
Namespace Name Mixin selector named canInsertIntoSlot
Lnet/minecraft/screen/ScreenHandler;canInsertIntoSlot(Lnet/minecraft/item/ItemStack;Lnet/minecraft/screen/slot/Slot;)Z
intermediary method_7613
Lnet/minecraft/class_1703;method_7613(Lnet/minecraft/class_1799;Lnet/minecraft/class_1735;)Z
official a
Lctb;a(Lcxo;Lcuy;)Z
-
canInsertIntoSlot
- Overrides:
canInsertIntoSlot
in classScreenHandler
- Mappings:
Namespace Name Mixin selector named canInsertIntoSlot
Lnet/minecraft/screen/ScreenHandler;canInsertIntoSlot(Lnet/minecraft/screen/slot/Slot;)Z
intermediary method_7615
Lnet/minecraft/class_1703;method_7615(Lnet/minecraft/class_1735;)Z
official b
Lctb;b(Lcuy;)Z
-
getCursorStack
- Overrides:
getCursorStack
in classScreenHandler
- Mappings:
Namespace Name Mixin selector named getCursorStack
Lnet/minecraft/screen/ScreenHandler;getCursorStack()Lnet/minecraft/item/ItemStack;
intermediary method_34255
Lnet/minecraft/class_1703;method_34255()Lnet/minecraft/class_1799;
official g
Lctb;g()Lcxo;
-
setCursorStack
- Overrides:
setCursorStack
in classScreenHandler
- Mappings:
Namespace Name Mixin selector named setCursorStack
Lnet/minecraft/screen/ScreenHandler;setCursorStack(Lnet/minecraft/item/ItemStack;)V
intermediary method_34254
Lnet/minecraft/class_1703;method_34254(Lnet/minecraft/class_1799;)V
official b
Lctb;b(Lcxo;)V
-