Class CreativeScreen
- java.lang.Object
-
- net.minecraft.client.gui.AbstractGui
-
- net.minecraft.client.gui.FocusableGui
-
- net.minecraft.client.gui.screen.Screen
-
- net.minecraft.client.gui.screen.inventory.ContainerScreen<T>
-
- net.minecraft.client.gui.DisplayEffectsScreen<CreativeScreen.CreativeContainer>
-
- net.minecraft.client.gui.screen.inventory.CreativeScreen
-
- All Implemented Interfaces:
IGuiEventListener
,IHasContainer<CreativeScreen.CreativeContainer>
,INestedGuiEventHandler
,IRenderable
,IScreen
public class CreativeScreen extends DisplayEffectsScreen<CreativeScreen.CreativeContainer>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CreativeScreen.CreativeContainer
(package private) static class
CreativeScreen.CreativeSlot
(package private) static class
CreativeScreen.LockedSlot
-
Field Summary
Fields Modifier and Type Field Description private static Inventory
CONTAINER
private static ResourceLocation
CREATIVE_TABS_LOCATION
private Slot
destroyItemSlot
private boolean
hasClickedOutside
private boolean
ignoreTextInput
private CreativeCraftingListener
listener
private int
maxPages
private java.util.List<Slot>
originalSlots
private boolean
scrolling
private float
scrollOffs
private TextFieldWidget
searchBox
private static int
selectedTab
private static int
tabPage
private static ITextComponent
TRASH_SLOT_TOOLTIP
private java.util.Map<ResourceLocation,ITag<Item>>
visibleTags
-
Fields inherited from class net.minecraft.client.gui.DisplayEffectsScreen
doRenderEffects
-
Fields inherited from class net.minecraft.client.gui.screen.inventory.ContainerScreen
hoveredSlot, imageHeight, imageWidth, inventory, INVENTORY_LOCATION, inventoryLabelX, inventoryLabelY, isQuickCrafting, leftPos, menu, quickCraftSlots, slotColor, titleLabelX, titleLabelY, topPos
-
Fields inherited from class net.minecraft.client.gui.screen.Screen
buttons, children, font, height, itemRenderer, minecraft, passEvents, title, width
-
Fields inherited from class net.minecraft.client.gui.AbstractGui
BACKGROUND_LOCATION, GUI_ICONS_LOCATION, STATS_ICON_LOCATION
-
-
Constructor Summary
Constructors Constructor Description CreativeScreen(PlayerEntity p_i1088_1_)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private boolean
canScroll()
boolean
charTyped(char p_231042_1_, int p_231042_2_)
protected void
checkEffectRendering()
protected boolean
checkTabClicked(ItemGroup p_195375_1_, double p_195375_2_, double p_195375_4_)
protected boolean
checkTabHovering(MatrixStack p_238809_1_, ItemGroup p_238809_2_, int p_238809_3_, int p_238809_4_)
int
getSelectedTab()
static void
handleHotbarLoadOrSave(Minecraft p_192044_0_, int p_192044_1_, boolean p_192044_2_, boolean p_192044_3_)
protected boolean
hasClickedOutside(double p_195361_1_, double p_195361_3_, int p_195361_5_, int p_195361_6_, int p_195361_7_)
protected void
init()
protected boolean
insideScrollbar(double p_195376_1_, double p_195376_3_)
private boolean
isCreativeSlot(Slot p_208018_1_)
boolean
keyPressed(int p_231046_1_, int p_231046_2_, int p_231046_3_)
boolean
keyReleased(int p_223281_1_, int p_223281_2_, int p_223281_3_)
boolean
mouseClicked(double p_231044_1_, double p_231044_3_, int p_231044_5_)
boolean
mouseDragged(double p_231045_1_, double p_231045_3_, int p_231045_5_, double p_231045_6_, double p_231045_8_)
boolean
mouseReleased(double p_231048_1_, double p_231048_3_, int p_231048_5_)
boolean
mouseScrolled(double p_231043_1_, double p_231043_3_, double p_231043_5_)
private void
refreshSearchResults()
void
removed()
void
render(MatrixStack p_230430_1_, int p_230430_2_, int p_230430_3_, float p_230430_4_)
protected void
renderBg(MatrixStack p_230450_1_, float p_230450_2_, int p_230450_3_, int p_230450_4_)
protected void
renderLabels(MatrixStack p_230451_1_, int p_230451_2_, int p_230451_3_)
protected void
renderTabButton(MatrixStack p_238808_1_, ItemGroup p_238808_2_)
protected void
renderTooltip(MatrixStack p_230457_1_, ItemStack p_230457_2_, int p_230457_3_, int p_230457_4_)
void
resize(Minecraft p_231152_1_, int p_231152_2_, int p_231152_3_)
private void
selectTab(ItemGroup p_147050_1_)
protected void
slotClicked(Slot p_184098_1_, int p_184098_2_, int p_184098_3_, ClickType p_184098_4_)
void
tick()
private void
updateVisibleTags(java.lang.String p_214080_1_)
-
Methods inherited from class net.minecraft.client.gui.screen.inventory.ContainerScreen
checkHotbarKeyPressed, getGuiLeft, getGuiTop, getMenu, getSlotColor, getSlotUnderMouse, getXSize, getYSize, isHovering, isPauseScreen, onClose, renderTooltip
-
Methods inherited from class net.minecraft.client.gui.screen.Screen
addButton, addWidget, children, getMinecraft, getNarrationMessage, getTitle, getTooltipFromItem, handleComponentClicked, hasAltDown, hasControlDown, hasShiftDown, init, insertText, isCopy, isCut, isMouseOver, isPaste, isSelectAll, isValidCharacterForName, onFilesDrop, renderBackground, renderBackground, renderComponentHoverEffect, renderComponentTooltip, renderDirtBackground, renderTooltip, renderTooltip, renderToolTip, renderWrappedToolTip, sendMessage, sendMessage, shouldCloseOnEsc, wrapScreenError
-
Methods inherited from class net.minecraft.client.gui.FocusableGui
getFocused, isDragging, setDragging, setFocused
-
Methods inherited from class net.minecraft.client.gui.AbstractGui
blit, blit, blit, blit, blit, blitOutlineBlack, drawCenteredString, drawCenteredString, drawString, drawString, fill, fillGradient, fillGradient, getBlitOffset, hLine, setBlitOffset, vLine
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.minecraft.client.gui.IGuiEventListener
mouseMoved
-
Methods inherited from interface net.minecraft.client.gui.INestedGuiEventHandler
changeFocus, getChildAt, magicalSpecialHackyFocus, setInitialFocus
-
-
-
-
Field Detail
-
CREATIVE_TABS_LOCATION
private static final ResourceLocation CREATIVE_TABS_LOCATION
-
CONTAINER
private static final Inventory CONTAINER
-
TRASH_SLOT_TOOLTIP
private static final ITextComponent TRASH_SLOT_TOOLTIP
-
selectedTab
private static int selectedTab
-
scrollOffs
private float scrollOffs
-
scrolling
private boolean scrolling
-
searchBox
private TextFieldWidget searchBox
-
originalSlots
@Nullable private java.util.List<Slot> originalSlots
-
destroyItemSlot
@Nullable private Slot destroyItemSlot
-
listener
private CreativeCraftingListener listener
-
ignoreTextInput
private boolean ignoreTextInput
-
tabPage
private static int tabPage
-
maxPages
private int maxPages
-
hasClickedOutside
private boolean hasClickedOutside
-
visibleTags
private final java.util.Map<ResourceLocation,ITag<Item>> visibleTags
-
-
Constructor Detail
-
CreativeScreen
public CreativeScreen(PlayerEntity p_i1088_1_)
-
-
Method Detail
-
tick
public void tick()
- Specified by:
tick
in interfaceIScreen
- Overrides:
tick
in classContainerScreen<CreativeScreen.CreativeContainer>
-
slotClicked
protected void slotClicked(@Nullable Slot p_184098_1_, int p_184098_2_, int p_184098_3_, ClickType p_184098_4_)
- Overrides:
slotClicked
in classContainerScreen<CreativeScreen.CreativeContainer>
-
isCreativeSlot
private boolean isCreativeSlot(@Nullable Slot p_208018_1_)
-
checkEffectRendering
protected void checkEffectRendering()
- Overrides:
checkEffectRendering
in classDisplayEffectsScreen<CreativeScreen.CreativeContainer>
-
init
protected void init()
- Overrides:
init
in classDisplayEffectsScreen<CreativeScreen.CreativeContainer>
-
resize
public void resize(Minecraft p_231152_1_, int p_231152_2_, int p_231152_3_)
-
removed
public void removed()
- Overrides:
removed
in classContainerScreen<CreativeScreen.CreativeContainer>
-
charTyped
public boolean charTyped(char p_231042_1_, int p_231042_2_)
-
keyPressed
public boolean keyPressed(int p_231046_1_, int p_231046_2_, int p_231046_3_)
- Specified by:
keyPressed
in interfaceIGuiEventListener
- Specified by:
keyPressed
in interfaceINestedGuiEventHandler
- Overrides:
keyPressed
in classContainerScreen<CreativeScreen.CreativeContainer>
-
keyReleased
public boolean keyReleased(int p_223281_1_, int p_223281_2_, int p_223281_3_)
-
refreshSearchResults
private void refreshSearchResults()
-
updateVisibleTags
private void updateVisibleTags(java.lang.String p_214080_1_)
-
renderLabels
protected void renderLabels(MatrixStack p_230451_1_, int p_230451_2_, int p_230451_3_)
- Overrides:
renderLabels
in classContainerScreen<CreativeScreen.CreativeContainer>
-
mouseClicked
public boolean mouseClicked(double p_231044_1_, double p_231044_3_, int p_231044_5_)
- Specified by:
mouseClicked
in interfaceIGuiEventListener
- Specified by:
mouseClicked
in interfaceINestedGuiEventHandler
- Overrides:
mouseClicked
in classContainerScreen<CreativeScreen.CreativeContainer>
-
mouseReleased
public boolean mouseReleased(double p_231048_1_, double p_231048_3_, int p_231048_5_)
- Specified by:
mouseReleased
in interfaceIGuiEventListener
- Specified by:
mouseReleased
in interfaceINestedGuiEventHandler
- Overrides:
mouseReleased
in classContainerScreen<CreativeScreen.CreativeContainer>
-
canScroll
private boolean canScroll()
-
selectTab
private void selectTab(ItemGroup p_147050_1_)
-
mouseScrolled
public boolean mouseScrolled(double p_231043_1_, double p_231043_3_, double p_231043_5_)
-
hasClickedOutside
protected boolean hasClickedOutside(double p_195361_1_, double p_195361_3_, int p_195361_5_, int p_195361_6_, int p_195361_7_)
- Overrides:
hasClickedOutside
in classContainerScreen<CreativeScreen.CreativeContainer>
-
insideScrollbar
protected boolean insideScrollbar(double p_195376_1_, double p_195376_3_)
-
mouseDragged
public boolean mouseDragged(double p_231045_1_, double p_231045_3_, int p_231045_5_, double p_231045_6_, double p_231045_8_)
- Specified by:
mouseDragged
in interfaceIGuiEventListener
- Specified by:
mouseDragged
in interfaceINestedGuiEventHandler
- Overrides:
mouseDragged
in classContainerScreen<CreativeScreen.CreativeContainer>
-
render
public void render(MatrixStack p_230430_1_, int p_230430_2_, int p_230430_3_, float p_230430_4_)
- Specified by:
render
in interfaceIRenderable
- Overrides:
render
in classDisplayEffectsScreen<CreativeScreen.CreativeContainer>
-
renderTooltip
protected void renderTooltip(MatrixStack p_230457_1_, ItemStack p_230457_2_, int p_230457_3_, int p_230457_4_)
- Overrides:
renderTooltip
in classScreen
-
renderBg
protected void renderBg(MatrixStack p_230450_1_, float p_230450_2_, int p_230450_3_, int p_230450_4_)
- Specified by:
renderBg
in classContainerScreen<CreativeScreen.CreativeContainer>
-
checkTabClicked
protected boolean checkTabClicked(ItemGroup p_195375_1_, double p_195375_2_, double p_195375_4_)
-
checkTabHovering
protected boolean checkTabHovering(MatrixStack p_238809_1_, ItemGroup p_238809_2_, int p_238809_3_, int p_238809_4_)
-
renderTabButton
protected void renderTabButton(MatrixStack p_238808_1_, ItemGroup p_238808_2_)
-
getSelectedTab
public int getSelectedTab()
-
handleHotbarLoadOrSave
public static void handleHotbarLoadOrSave(Minecraft p_192044_0_, int p_192044_1_, boolean p_192044_2_, boolean p_192044_3_)
-
-