Class FileExplorerPanel
java.lang.Object
de.luckymcdev.foundryengine.client.editor.panel.Panel
de.luckymcdev.foundryengine.client.editor.panel.editor.EditorPanel
de.luckymcdev.foundryengine.client.editor.panel.explorer.AbstractExplorerPanel
de.luckymcdev.foundryengine.client.editor.panel.explorer.FileExplorerPanel
A file-explorer panel showing both local client files and remote server files
when connected to a multiplayer server. Remote files are fetched on demand via
packets and opened in a
CodeEditor whose save callback writes back to the server.-
Nested Class Summary
Nested classes/interfaces inherited from class Panel
Panel.Builder -
Field Summary
FieldsFields inherited from class AbstractExplorerPanel
initialized -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidopenResource(net.minecraft.resources.Identifier id) Not used by the file explorer – files are opened viaopenFileInEditor(File).voidreceiveRemoteFileContent(String relativePath, String content) Called when the server sends back the contents of a requested file.voidCalled when the server sends its file listing.protected voidrefresh()Refresh the browser tree structure.protected voidRender the main browsing tree.Methods inherited from class AbstractExplorerPanel
content, generateEditorId, getExistingEditor, isResourceOpen, renderNamespaceNode, renderResourceFile, renderResourceFolder, renderSectionMethods inherited from class EditorPanel
beginContent, endContent, setStatusMethods inherited from class Panel
close, customFlags, getFormattedLabel, getId, getLabel, getShortcut, handleRender, handleTick, isFocused, isOpen, menuBar, onClosed, onOpened, open, requireLevel, requireLevel, requireLevelOnServer, requireLocal, requireWorld, requireWorld, setDefaultRequirements, tick
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
FileExplorerPanel
-
-
Method Details
-
receiveRemoteFileList
Called when the server sends its file listing. RebuildsremoteRootNodefrom the flat entry list. -
receiveRemoteFileContent
Called when the server sends back the contents of a requested file. Opens the content in aCodeEditorwhose save callback pushes changes back. -
refresh
protected void refresh()Description copied from class:AbstractExplorerPanelRefresh the browser tree structure. Implement to populate nodes.- Specified by:
refreshin classAbstractExplorerPanel
-
renderBrowser
protected void renderBrowser()Description copied from class:AbstractExplorerPanelRender the main browsing tree. Override for custom layout.- Specified by:
renderBrowserin classAbstractExplorerPanel
-
openResource
protected void openResource(net.minecraft.resources.Identifier id) Not used by the file explorer – files are opened viaopenFileInEditor(File).- Specified by:
openResourcein classAbstractExplorerPanel
-