Package net.minecraft.client.gui.screen
Class PackScreen
- java.lang.Object
-
- net.minecraft.client.gui.AbstractGui
-
- net.minecraft.client.gui.FocusableGui
-
- net.minecraft.client.gui.screen.Screen
-
- net.minecraft.client.gui.screen.PackScreen
-
- All Implemented Interfaces:
IGuiEventListener
,INestedGuiEventHandler
,IRenderable
,IScreen
public class PackScreen extends Screen
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
PackScreen.PackDirectoryWatcher
-
Field Summary
Fields Modifier and Type Field Description private ResourcePackList
availablePackList
private static ResourceLocation
DEFAULT_ICON
private static ITextComponent
DIRECTORY_BUTTON_TOOLTIP
private Button
doneButton
private static ITextComponent
DRAG_AND_DROP
private Screen
lastScreen
private static org.apache.logging.log4j.Logger
LOGGER
private PackLoadingManager
model
private java.io.File
packDir
private java.util.Map<java.lang.String,ResourceLocation>
packIcons
private ResourcePackList
selectedPackList
private long
ticksToReload
private PackScreen.PackDirectoryWatcher
watcher
-
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 PackScreen(Screen p_i242060_1_, ResourcePackList p_i242060_2_, java.util.function.Consumer<ResourcePackList> p_i242060_3_, java.io.File p_i242060_4_, ITextComponent p_i242060_5_)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
closeWatcher()
protected static void
copyPacks(Minecraft p_238895_0_, java.util.List<java.nio.file.Path> p_238895_1_, java.nio.file.Path p_238895_2_)
private ResourceLocation
getPackIcon(ResourcePackInfo p_243395_1_)
protected void
init()
private ResourceLocation
loadPackIcon(TextureManager p_243397_1_, ResourcePackInfo p_243397_2_)
void
onClose()
void
onFilesDrop(java.util.List<java.nio.file.Path> p_230476_1_)
private void
populateLists()
private void
reload()
void
render(MatrixStack p_230430_1_, int p_230430_2_, int p_230430_3_, float p_230430_4_)
void
tick()
private void
updateList(ResourcePackList p_238899_1_, java.util.stream.Stream<PackLoadingManager.IPack> p_238899_2_)
-
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, isPauseScreen, isSelectAll, isValidCharacterForName, keyPressed, removed, renderBackground, renderBackground, renderComponentHoverEffect, renderComponentTooltip, renderDirtBackground, renderTooltip, renderTooltip, renderTooltip, renderToolTip, renderWrappedToolTip, resize, 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, charTyped, getChildAt, keyReleased, magicalSpecialHackyFocus, mouseClicked, mouseDragged, mouseReleased, mouseScrolled, setInitialFocus
-
-
-
-
Field Detail
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER
-
DRAG_AND_DROP
private static final ITextComponent DRAG_AND_DROP
-
DIRECTORY_BUTTON_TOOLTIP
private static final ITextComponent DIRECTORY_BUTTON_TOOLTIP
-
DEFAULT_ICON
private static final ResourceLocation DEFAULT_ICON
-
model
private final PackLoadingManager model
-
lastScreen
private final Screen lastScreen
-
watcher
@Nullable private PackScreen.PackDirectoryWatcher watcher
-
ticksToReload
private long ticksToReload
-
availablePackList
private ResourcePackList availablePackList
-
selectedPackList
private ResourcePackList selectedPackList
-
packDir
private final java.io.File packDir
-
doneButton
private Button doneButton
-
packIcons
private final java.util.Map<java.lang.String,ResourceLocation> packIcons
-
-
Constructor Detail
-
PackScreen
public PackScreen(Screen p_i242060_1_, ResourcePackList p_i242060_2_, java.util.function.Consumer<ResourcePackList> p_i242060_3_, java.io.File p_i242060_4_, ITextComponent p_i242060_5_)
-
-
Method Detail
-
closeWatcher
private void closeWatcher()
-
populateLists
private void populateLists()
-
updateList
private void updateList(ResourcePackList p_238899_1_, java.util.stream.Stream<PackLoadingManager.IPack> p_238899_2_)
-
reload
private void reload()
-
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 classScreen
-
copyPacks
protected static void copyPacks(Minecraft p_238895_0_, java.util.List<java.nio.file.Path> p_238895_1_, java.nio.file.Path p_238895_2_)
-
onFilesDrop
public void onFilesDrop(java.util.List<java.nio.file.Path> p_230476_1_)
- Overrides:
onFilesDrop
in classScreen
-
loadPackIcon
private ResourceLocation loadPackIcon(TextureManager p_243397_1_, ResourcePackInfo p_243397_2_)
-
getPackIcon
private ResourceLocation getPackIcon(ResourcePackInfo p_243395_1_)
-
-