@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 BasicInventory |
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 |
drawStatusEffects
BACKGROUND_TEXTURE, backgroundHeight, backgroundWidth, cursorDragSlots, focusedSlot, handler, isCursorDragging, playerInventory, x, y
buttons, children, client, height, itemRenderer, passEvents, textRenderer, title, width
GUI_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(float delta,
int mouseX,
int mouseY) |
protected void |
drawForeground(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(int mouseX,
int mouseY,
float delta) |
protected void |
renderTabIcon(ItemGroup group) |
protected boolean |
renderTabTooltipIfHovered(ItemGroup group,
int mouseX,
int mouseY) |
protected void |
renderTooltip(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, shouldCloseOnEsc
addButton, addChild, children, getNarrationMessage, getTitle, getTooltipFromItem, handleTextClick, hasAltDown, hasControlDown, hasShiftDown, init, insertText, isCopy, isCut, isMouseOver, isPaste, isSelectAll, isValidCharacterForName, onClose, renderBackground, renderBackground, renderDirtBackground, renderTextHoverEffect, renderTooltip, renderTooltip, sendMessage, sendMessage, wrapScreenError
getFocused, isDragging, setDragging, setFocused
drawCenteredString, drawHorizontalLine, drawSprite, drawString, drawTexture, drawTexture, drawTexture, drawTexture, drawTexturedQuad, drawVerticalLine, fill, fill, fillGradient, getZOffset, setZOffset
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
changeFocus, focusOn, hoveredElement, setInitialFocus
mouseMoved
private static final Identifier TEXTURE
private static final BasicInventory 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 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 Element
keyPressed
in interface ParentElement
keyPressed
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(int mouseX, int mouseY)
drawForeground
in class HandledScreen<CreativeInventoryScreen.CreativeScreenHandler>
public boolean mouseClicked(double mouseX, double mouseY, int button)
mouseClicked
in interface Element
mouseClicked
in interface ParentElement
mouseClicked
in class HandledScreen<CreativeInventoryScreen.CreativeScreenHandler>
public boolean mouseReleased(double mouseX, double mouseY, int button)
mouseReleased
in interface Element
mouseReleased
in interface ParentElement
mouseReleased
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 Element
mouseDragged
in interface ParentElement
mouseDragged
in class HandledScreen<CreativeInventoryScreen.CreativeScreenHandler>
public void render(int mouseX, int mouseY, float delta)
render
in interface Drawable
render
in class AbstractInventoryScreen<CreativeInventoryScreen.CreativeScreenHandler>
protected void renderTooltip(ItemStack stack, int x, int y)
renderTooltip
in class Screen
protected void drawBackground(float delta, int mouseX, int mouseY)
drawBackground
in class HandledScreen<CreativeInventoryScreen.CreativeScreenHandler>
protected boolean isClickInTab(ItemGroup group, double mouseX, double mouseY)
protected boolean renderTabTooltipIfHovered(ItemGroup group, int mouseX, int mouseY)
protected void renderTabIcon(ItemGroup group)
public int getSelectedTab()
public static void onHotbarKeyPress(MinecraftClient client, int index, boolean restore, boolean save)