@Environment(value=CLIENT) public class CreativeInventoryScreen extends AbstractInventoryScreen<CreativeInventoryScreen.CreativeScreenHandler>
| Modifier and Type | Class and Description |
|---|---|
static class |
CreativeInventoryScreen.CreativeScreenHandler |
(package private) static class |
CreativeInventoryScreen.CreativeSlot |
(package private) static class |
CreativeInventoryScreen.LockableSlot |
| Modifier and Type | Field and Description |
|---|---|
private Slot |
deleteItemSlot |
private static Text |
field_26563 |
private boolean |
ignoreTypedCharacter |
private static SimpleInventory |
INVENTORY |
private boolean |
lastClickOutsideBounds |
private CreativeInventoryListener |
listener |
private boolean |
scrolling |
private float |
scrollPosition |
private TextFieldWidget |
searchBox |
private Map<Identifier,Tag<Item>> |
searchResultTags |
private static int |
selectedTab |
private List<Slot> |
slots |
private static Identifier |
TEXTURE |
drawStatusEffectsBACKGROUND_TEXTURE, backgroundHeight, backgroundWidth, cursorDragging, cursorDragSlots, focusedSlot, handler, playerInventory, playerInventoryTitleX, playerInventoryTitleY, titleX, titleY, x, ybuttons, children, client, height, itemRenderer, passEvents, textRenderer, title, widthGUI_ICONS_TEXTURE, OPTIONS_BACKGROUND_TEXTURE, STATS_ICON_TEXTURE| Constructor and Description |
|---|
CreativeInventoryScreen(PlayerEntity player) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
applyStatusEffectOffset() |
boolean |
charTyped(char chr,
int keyCode)
Callback for when a character input has been captured.
|
protected void |
drawBackground(MatrixStack matrices,
float delta,
int mouseX,
int mouseY) |
protected void |
drawForeground(MatrixStack matrices,
int mouseX,
int mouseY) |
int |
getSelectedTab() |
private boolean |
hasScrollbar() |
protected void |
init()
Called when a screen should be initialized.
|
protected boolean |
isClickInScrollbar(double mouseX,
double mouseY) |
protected boolean |
isClickInTab(ItemGroup group,
double mouseX,
double mouseY) |
protected boolean |
isClickOutsideBounds(double mouseX,
double mouseY,
int left,
int top,
int button) |
private boolean |
isCreativeInventorySlot(Slot slot) |
boolean |
keyPressed(int keyCode,
int scanCode,
int modifiers)
Callback for when a key down event has been captured.
|
boolean |
keyReleased(int keyCode,
int scanCode,
int modifiers)
Callback for when a key down event has been captured.
|
boolean |
mouseClicked(double mouseX,
double mouseY,
int button)
Callback for when a mouse button down event
has been captured.
|
boolean |
mouseDragged(double mouseX,
double mouseY,
int button,
double deltaX,
double deltaY)
Callback for when a mouse button drag event
has been captured.
|
boolean |
mouseReleased(double mouseX,
double mouseY,
int button)
Callback for when a mouse button release event
has been captured.
|
boolean |
mouseScrolled(double mouseX,
double mouseY,
double amount)
Callback for when a mouse button scroll event
has been captured.
|
static void |
onHotbarKeyPress(MinecraftClient client,
int index,
boolean restore,
boolean save) |
protected void |
onMouseClick(Slot slot,
int invSlot,
int clickData,
SlotActionType actionType) |
void |
removed() |
void |
render(MatrixStack matrices,
int mouseX,
int mouseY,
float delta) |
protected void |
renderTabIcon(MatrixStack matrixStack,
ItemGroup itemGroup) |
protected boolean |
renderTabTooltipIfHovered(MatrixStack matrixStack,
ItemGroup itemGroup,
int int2,
int int3) |
protected void |
renderTooltip(MatrixStack matrices,
ItemStack stack,
int x,
int y) |
void |
resize(MinecraftClient client,
int width,
int height) |
private void |
search() |
private void |
searchForTags(String string) |
private void |
setSelectedTab(ItemGroup group) |
void |
tick() |
drawMouseoverTooltip, getScreenHandler, handleHotbarKeyPressed, isPauseScreen, isPointWithinBounds, onCloseaddButton, addChild, children, filesDragged, getNarrationMessage, getTitle, getTooltipFromItem, handleTextClick, hasAltDown, hasControlDown, hasShiftDown, init, insertText, isCopy, isCut, isMouseOver, isPaste, isSelectAll, isValidCharacterForName, renderBackground, renderBackground, renderBackgroundTexture, renderOrderedTooltip, renderTextHoverEffect, renderTooltip, renderTooltip, sendMessage, sendMessage, shouldCloseOnEsc, wrapScreenErrorgetFocused, isDragging, setDragging, setFocuseddrawCenteredString, drawCenteredText, drawHorizontalLine, drawSprite, drawStringWithShadow, drawTexture, drawTexture, drawTexture, drawTexture, drawTextWithShadow, drawVerticalLine, fill, fillGradient, fillGradient, getZOffset, method_29343, setZOffsetclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitchangeFocus, focusOn, hoveredElement, setInitialFocusmouseMovedprivate static final Identifier TEXTURE
private static final SimpleInventory INVENTORY
private static final Text field_26563
private static int selectedTab
private float scrollPosition
private boolean scrolling
private TextFieldWidget searchBox
private CreativeInventoryListener listener
private boolean ignoreTypedCharacter
private boolean lastClickOutsideBounds
private final Map<Identifier,Tag<Item>> searchResultTags
public CreativeInventoryScreen(PlayerEntity player)
public void tick()
tick in interface TickableElementtick in class HandledScreen<CreativeInventoryScreen.CreativeScreenHandler>protected void onMouseClick(@Nullable Slot slot, int invSlot, int clickData, SlotActionType actionType)
protected void applyStatusEffectOffset()
applyStatusEffectOffset in class AbstractInventoryScreen<CreativeInventoryScreen.CreativeScreenHandler>protected void init()
This method is called when this screen is opened or resized.
init in class AbstractInventoryScreen<CreativeInventoryScreen.CreativeScreenHandler>public void resize(MinecraftClient client, int width, int height)
public void removed()
removed in class HandledScreen<CreativeInventoryScreen.CreativeScreenHandler>public boolean charTyped(char chr,
int keyCode)
GLFW class.chr - the captured characterkeyCode - the associated key codetrue to indicate that the event handling is successful/validKeyboard.onChar(long, int, int),
GLFW.GLFW_KEY_Q,
GLFWKeyCallbackI.invoke(long, int, int, int, int)public boolean keyPressed(int keyCode,
int scanCode,
int modifiers)
GLFW class.keyPressed in interface ElementkeyPressed in interface ParentElementkeyPressed in class HandledScreen<CreativeInventoryScreen.CreativeScreenHandler>keyCode - the named key code of the event as described in the GLFW classscanCode - the unique/platform-specific scan code of the keyboard inputmodifiers - a GLFW bitfield describing the modifier keys that are held down (see GLFW Modifier key flags)true to indicate that the event handling is successful/validKeyboard.onKey(long, int, int, int, int),
GLFW.GLFW_KEY_Q,
GLFWKeyCallbackI.invoke(long, int, int, int, int)public boolean keyReleased(int keyCode,
int scanCode,
int modifiers)
GLFW class.keyCode - the named key code of the event as described in the GLFW classscanCode - the unique/platform-specific scan code of the keyboard inputmodifiers - a GLFW bitfield describing the modifier keys that are held down (see GLFW Modifier key flags)true to indicate that the event handling is successful/validKeyboard.onKey(long, int, int, int, int),
GLFW.GLFW_KEY_Q,
GLFWKeyCallbackI.invoke(long, int, int, int, int)private void search()
private void searchForTags(String string)
protected void drawForeground(MatrixStack matrices, int mouseX, int mouseY)
drawForeground in class HandledScreen<CreativeInventoryScreen.CreativeScreenHandler>public boolean mouseClicked(double mouseX,
double mouseY,
int button)
GLFW class.mouseClicked in interface ElementmouseClicked in interface ParentElementmouseClicked in class HandledScreen<CreativeInventoryScreen.CreativeScreenHandler>mouseX - the X coordinate of the mousemouseY - the Y coordinate of the mousebutton - the mouse button numbertrue to indicate that the event handling is successful/validMouse.onMouseButton(long, int, int, int),
GLFW.GLFW_MOUSE_BUTTON_1public boolean mouseReleased(double mouseX,
double mouseY,
int button)
GLFW class.mouseReleased in interface ElementmouseReleased in interface ParentElementmouseReleased in class HandledScreen<CreativeInventoryScreen.CreativeScreenHandler>mouseX - the X coordinate of the mousemouseY - the Y coordinate of the mousebutton - the mouse button numbertrue to indicate that the event handling is successful/validMouse.onMouseButton(long, int, int, int),
GLFW.GLFW_MOUSE_BUTTON_1private boolean hasScrollbar()
private void setSelectedTab(ItemGroup group)
public boolean mouseScrolled(double mouseX,
double mouseY,
double amount)
mouseX - the X coordinate of the mousemouseY - the Y coordinate of the mouseamount - value is > 1 if scrolled down, < 1 if scrolled uptrue to indicate that the event handling is successful/validMouse.onMouseScroll(long, double, double)protected boolean isClickOutsideBounds(double mouseX,
double mouseY,
int left,
int top,
int button)
isClickOutsideBounds in class HandledScreen<CreativeInventoryScreen.CreativeScreenHandler>protected boolean isClickInScrollbar(double mouseX,
double mouseY)
public boolean mouseDragged(double mouseX,
double mouseY,
int button,
double deltaX,
double deltaY)
GLFW class.mouseDragged in interface ElementmouseDragged in interface ParentElementmouseDragged in class HandledScreen<CreativeInventoryScreen.CreativeScreenHandler>mouseX - the current X coordinate of the mousemouseY - the current Y coordinate of the mousebutton - the mouse button numberdeltaX - the difference of the current X with the previous X coordinatedeltaY - the difference of the current Y with the previous Y coordinatetrue to indicate that the event handling is successful/validMouse.onCursorPos(long, double, double),
GLFW.GLFW_MOUSE_BUTTON_1public void render(MatrixStack matrices, int mouseX, int mouseY, float delta)
render in interface Drawablerender in class AbstractInventoryScreen<CreativeInventoryScreen.CreativeScreenHandler>protected void renderTooltip(MatrixStack matrices, ItemStack stack, int x, int y)
renderTooltip in class Screenprotected void drawBackground(MatrixStack matrices, float delta, int mouseX, int mouseY)
drawBackground in class HandledScreen<CreativeInventoryScreen.CreativeScreenHandler>protected boolean isClickInTab(ItemGroup group, double mouseX, double mouseY)
protected boolean renderTabTooltipIfHovered(MatrixStack matrixStack, ItemGroup itemGroup, int int2, int int3)
protected void renderTabIcon(MatrixStack matrixStack, ItemGroup itemGroup)
public int getSelectedTab()
public static void onHotbarKeyPress(MinecraftClient client, int index, boolean restore, boolean save)