Class CreativeInventoryScreen
java.lang.Object
net.minecraft.client.gui.DrawableHelper
net.minecraft.client.gui.AbstractParentElement
net.minecraft.client.gui.screen.Screen
net.minecraft.client.gui.screen.ingame.HandledScreen<T>
net.minecraft.client.gui.screen.ingame.AbstractInventoryScreen<CreativeInventoryScreen.CreativeScreenHandler>
net.minecraft.client.gui.screen.ingame.CreativeInventoryScreen
- All Implemented Interfaces:
Drawable,Element,ParentElement,ScreenHandlerProvider<CreativeInventoryScreen.CreativeScreenHandler>,TickableElement
@Environment(CLIENT) public class CreativeInventoryScreen extends AbstractInventoryScreen<CreativeInventoryScreen.CreativeScreenHandler>
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCreativeInventoryScreen.CreativeScreenHandler(package private) static classCreativeInventoryScreen.CreativeSlot(package private) static classCreativeInventoryScreen.LockableSlot -
Field Summary
Fields Modifier and Type Field Description private SlotdeleteItemSlotprivate booleanignoreTypedCharacterprivate static SimpleInventoryinventoryprivate booleanlastClickOutsideBoundsprivate CreativeInventoryListenerlistenerprivate booleanscrollingprivate floatscrollPositionprivate TextFieldWidgetsearchBoxprivate Map<Identifier,Tag<Item>>searchResultTagsprivate static intselectedTabprivate List<Slot>slotsprivate static IdentifierTEXTUREFields inherited from class net.minecraft.client.gui.screen.ingame.AbstractInventoryScreen
drawStatusEffectsFields inherited from class net.minecraft.client.gui.screen.ingame.HandledScreen
BACKGROUND_TEXTURE, backgroundHeight, backgroundWidth, cursorDragSlots, focusedSlot, handler, isCursorDragging, playerInventory, playerInventoryTitleX, playerInventoryTitleY, titleX, titleY, x, yFields inherited from class net.minecraft.client.gui.screen.Screen
buttons, children, client, height, itemRenderer, passEvents, textRenderer, title, widthFields inherited from class net.minecraft.client.gui.DrawableHelper
GUI_ICONS_TEXTURE, STATS_ICON_TEXTURE -
Constructor Summary
Constructors Constructor Description CreativeInventoryScreen(PlayerEntity player) -
Method Summary
Modifier and Type Method Description protected voidapplyStatusEffectOffset()booleancharTyped(char chr, int keyCode)protected voiddrawBackground(MatrixStack matrices, float delta, int mouseX, int mouseY)protected voiddrawForeground(MatrixStack matrices, int mouseX, int mouseY)intgetSelectedTab()private booleanhasScrollbar()protected voidinit()protected booleanisClickInScrollbar(double mouseX, double mouseY)protected booleanisClickInTab(ItemGroup group, double mouseX, double mouseY)protected booleanisClickOutsideBounds(double mouseX, double mouseY, int left, int top, int button)private booleanisCreativeInventorySlot(Slot slot)booleankeyPressed(int keyCode, int scanCode, int modifiers)booleankeyReleased(int keyCode, int scanCode, int modifiers)booleanmouseClicked(double mouseX, double mouseY, int button)booleanmouseDragged(double mouseX, double mouseY, int button, double deltaX, double deltaY)booleanmouseReleased(double mouseX, double mouseY, int button)booleanmouseScrolled(double mouseX, double mouseY, double amount)static voidonHotbarKeyPress(MinecraftClient client, int index, boolean restore, boolean save)protected voidonMouseClick(Slot slot, int invSlot, int clickData, SlotActionType actionType)voidremoved()voidrender(MatrixStack matrices, int mouseX, int mouseY, float delta)protected voidrenderTabIcon(MatrixStack matrixStack, ItemGroup itemGroup)protected booleanrenderTabTooltipIfHovered(MatrixStack matrixStack, ItemGroup itemGroup, int int2, int int3)protected voidrenderTooltip(MatrixStack matrices, ItemStack stack, int x, int y)voidresize(MinecraftClient client, int width, int height)private voidsearch()private voidsearchForTags(String string)private voidsetSelectedTab(ItemGroup group)voidtick()Methods inherited from class net.minecraft.client.gui.screen.ingame.HandledScreen
drawMouseoverTooltip, getScreenHandler, handleHotbarKeyPressed, isPauseScreen, isPointWithinBounds, shouldCloseOnEscMethods inherited from class net.minecraft.client.gui.screen.Screen
addButton, addChild, children, getNarrationMessage, getTitle, getTooltipFromItem, handleTextClick, hasAltDown, hasControlDown, hasShiftDown, init, insertText, isCopy, isCut, isMouseOver, isPaste, isSelectAll, isValidCharacterForName, method_29638, onClose, renderBackground, renderBackground, renderBackgroundTexture, renderTextHoverEffect, renderTooltip, renderTooltip, sendMessage, sendMessage, wrapScreenErrorMethods inherited from class net.minecraft.client.gui.AbstractParentElement
getFocused, isDragging, setDragging, setFocusedMethods inherited from class net.minecraft.client.gui.DrawableHelper
drawCenteredString, drawCenteredText, drawHorizontalLine, drawSprite, drawStringWithShadow, drawTexture, drawTexture, drawTexture, drawTexture, drawTextWithShadow, drawVerticalLine, fill, fillGradient, fillGradient, getZOffset, method_29343, setZOffsetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.client.gui.ParentElement
changeFocus, focusOn, hoveredElement, setInitialFocus
-
Field Details
-
TEXTURE
-
inventory
-
selectedTab
private static int selectedTab -
scrollPosition
private float scrollPosition -
scrolling
private boolean scrolling -
searchBox
-
slots
-
deleteItemSlot
-
listener
-
ignoreTypedCharacter
private boolean ignoreTypedCharacter -
lastClickOutsideBounds
private boolean lastClickOutsideBounds -
searchResultTags
-
-
Constructor Details
-
Method Details
-
tick
public void tick()- Specified by:
tickin interfaceTickableElement- Overrides:
tickin classHandledScreen<CreativeInventoryScreen.CreativeScreenHandler>
-
onMouseClick
protected void onMouseClick(@Nullable Slot slot, int invSlot, int clickData, SlotActionType actionType) -
isCreativeInventorySlot
-
applyStatusEffectOffset
protected void applyStatusEffectOffset()- Overrides:
applyStatusEffectOffsetin classAbstractInventoryScreen<CreativeInventoryScreen.CreativeScreenHandler>
-
init
protected void init()- Overrides:
initin classAbstractInventoryScreen<CreativeInventoryScreen.CreativeScreenHandler>
-
resize
-
removed
public void removed()- Overrides:
removedin classHandledScreen<CreativeInventoryScreen.CreativeScreenHandler>
-
charTyped
public boolean charTyped(char chr, int keyCode) -
keyPressed
public boolean keyPressed(int keyCode, int scanCode, int modifiers)- Specified by:
keyPressedin interfaceElement- Specified by:
keyPressedin interfaceParentElement- Overrides:
keyPressedin classHandledScreen<CreativeInventoryScreen.CreativeScreenHandler>
-
keyReleased
public boolean keyReleased(int keyCode, int scanCode, int modifiers) -
search
private void search() -
searchForTags
-
drawForeground
- Overrides:
drawForegroundin classHandledScreen<CreativeInventoryScreen.CreativeScreenHandler>
-
mouseClicked
public boolean mouseClicked(double mouseX, double mouseY, int button)- Specified by:
mouseClickedin interfaceElement- Specified by:
mouseClickedin interfaceParentElement- Overrides:
mouseClickedin classHandledScreen<CreativeInventoryScreen.CreativeScreenHandler>
-
mouseReleased
public boolean mouseReleased(double mouseX, double mouseY, int button)- Specified by:
mouseReleasedin interfaceElement- Specified by:
mouseReleasedin interfaceParentElement- Overrides:
mouseReleasedin classHandledScreen<CreativeInventoryScreen.CreativeScreenHandler>
-
hasScrollbar
private boolean hasScrollbar() -
setSelectedTab
-
mouseScrolled
public boolean mouseScrolled(double mouseX, double mouseY, double amount) -
isClickOutsideBounds
protected boolean isClickOutsideBounds(double mouseX, double mouseY, int left, int top, int button)- Overrides:
isClickOutsideBoundsin classHandledScreen<CreativeInventoryScreen.CreativeScreenHandler>
-
isClickInScrollbar
protected boolean isClickInScrollbar(double mouseX, double mouseY) -
mouseDragged
public boolean mouseDragged(double mouseX, double mouseY, int button, double deltaX, double deltaY)- Specified by:
mouseDraggedin interfaceElement- Specified by:
mouseDraggedin interfaceParentElement- Overrides:
mouseDraggedin classHandledScreen<CreativeInventoryScreen.CreativeScreenHandler>
-
render
- Specified by:
renderin interfaceDrawable- Overrides:
renderin classAbstractInventoryScreen<CreativeInventoryScreen.CreativeScreenHandler>
-
renderTooltip
- Overrides:
renderTooltipin classScreen
-
drawBackground
- Specified by:
drawBackgroundin classHandledScreen<CreativeInventoryScreen.CreativeScreenHandler>
-
isClickInTab
-
renderTabTooltipIfHovered
protected boolean renderTabTooltipIfHovered(MatrixStack matrixStack, ItemGroup itemGroup, int int2, int int3) -
renderTabIcon
-
getSelectedTab
public int getSelectedTab() -
onHotbarKeyPress
public static void onHotbarKeyPress(MinecraftClient client, int index, boolean restore, boolean save)
-