@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 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, cursorDragSlots, focusedSlot, handler, isCursorDragging, playerInventory, playerInventoryTitleX, playerInventoryTitleY, titleX, titleY, x, ybuttons, children, client, height, itemRenderer, passEvents, textRenderer, title, widthGUI_ICONS_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) |
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() |
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) |
boolean |
keyReleased(int keyCode,
int scanCode,
int modifiers) |
boolean |
mouseClicked(double mouseX,
double mouseY,
int button) |
boolean |
mouseDragged(double mouseX,
double mouseY,
int button,
double deltaX,
double deltaY) |
boolean |
mouseReleased(double mouseX,
double mouseY,
int button) |
boolean |
mouseScrolled(double mouseX,
double mouseY,
double amount) |
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, shouldCloseOnEscaddButton, 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, 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 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()
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)
public boolean keyPressed(int keyCode,
int scanCode,
int modifiers)
keyPressed in interface ElementkeyPressed in interface ParentElementkeyPressed in class HandledScreen<CreativeInventoryScreen.CreativeScreenHandler>public boolean keyReleased(int keyCode,
int scanCode,
int modifiers)
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)
mouseClicked in interface ElementmouseClicked in interface ParentElementmouseClicked in class HandledScreen<CreativeInventoryScreen.CreativeScreenHandler>public boolean mouseReleased(double mouseX,
double mouseY,
int button)
mouseReleased in interface ElementmouseReleased in interface ParentElementmouseReleased in class HandledScreen<CreativeInventoryScreen.CreativeScreenHandler>private boolean hasScrollbar()
private void setSelectedTab(ItemGroup group)
public boolean mouseScrolled(double mouseX,
double mouseY,
double amount)
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)
mouseDragged in interface ElementmouseDragged in interface ParentElementmouseDragged in class HandledScreen<CreativeInventoryScreen.CreativeScreenHandler>public 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)