Class FileExplorerPanel


public class FileExplorerPanel extends AbstractExplorerPanel
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.
  • Field Details

  • Constructor Details

    • FileExplorerPanel

      public FileExplorerPanel(File rootDir)
  • Method Details

    • receiveRemoteFileList

      public void receiveRemoteFileList(List<ClientBoundFileListPacket.RemoteEntry> entries)
      Called when the server sends its file listing. Rebuilds remoteRootNode from the flat entry list.
    • receiveRemoteFileContent

      public void receiveRemoteFileContent(String relativePath, String content)
      Called when the server sends back the contents of a requested file. Opens the content in a CodeEditor whose save callback pushes changes back.
    • refresh

      protected void refresh()
      Description copied from class: AbstractExplorerPanel
      Refresh the browser tree structure. Implement to populate nodes.
      Specified by:
      refresh in class AbstractExplorerPanel
    • renderBrowser

      protected void renderBrowser()
      Description copied from class: AbstractExplorerPanel
      Render the main browsing tree. Override for custom layout.
      Specified by:
      renderBrowser in class AbstractExplorerPanel
    • openResource

      protected void openResource(net.minecraft.resources.Identifier id)
      Not used by the file explorer – files are opened via openFileInEditor(File).
      Specified by:
      openResource in class AbstractExplorerPanel