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 classPackScreen.PackDirectoryWatcher
-
Field Summary
Fields Modifier and Type Field Description private ResourcePackListavailablePackListprivate static ResourceLocationDEFAULT_ICONprivate static ITextComponentDIRECTORY_BUTTON_TOOLTIPprivate ButtondoneButtonprivate static ITextComponentDRAG_AND_DROPprivate ScreenlastScreenprivate static org.apache.logging.log4j.LoggerLOGGERprivate PackLoadingManagermodelprivate java.io.FilepackDirprivate java.util.Map<java.lang.String,ResourceLocation>packIconsprivate ResourcePackListselectedPackListprivate longticksToReloadprivate PackScreen.PackDirectoryWatcherwatcher-
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 voidcloseWatcher()protected static voidcopyPacks(Minecraft p_238895_0_, java.util.List<java.nio.file.Path> p_238895_1_, java.nio.file.Path p_238895_2_)private ResourceLocationgetPackIcon(ResourcePackInfo p_243395_1_)protected voidinit()private ResourceLocationloadPackIcon(TextureManager p_243397_1_, ResourcePackInfo p_243397_2_)voidonClose()voidonFilesDrop(java.util.List<java.nio.file.Path> p_230476_1_)private voidpopulateLists()private voidreload()voidrender(MatrixStack p_230430_1_, int p_230430_2_, int p_230430_3_, float p_230430_4_)voidtick()private voidupdateList(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:
renderin interfaceIRenderable- Overrides:
renderin 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:
onFilesDropin classScreen
-
loadPackIcon
private ResourceLocation loadPackIcon(TextureManager p_243397_1_, ResourcePackInfo p_243397_2_)
-
getPackIcon
private ResourceLocation getPackIcon(ResourcePackInfo p_243395_1_)
-
-