Class ResourceExplorerPanel
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.ResourceExplorerPanel
Explorer panel that browses all Minecraft resources via the
ResourceManager.
Supports every standard resource folder (textures, models, shaders, …) plus any
custom mod resources. Files always open in read-only mode; images are
shown in the TextureViewerPanel, everything else in a CodeEditor.
-
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) Handle opening/editing a resource identified by an Identifier.protected voidrefresh()Refresh the browser tree structure.protected voidRender the main browsing tree.protected voidrenderResourceFile(net.minecraft.resources.Identifier id) Renders a single resource file leaf node.Methods inherited from class AbstractExplorerPanel
content, generateEditorId, getExistingEditor, isResourceOpen, renderNamespaceNode, 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
-
ResourceExplorerPanel
public ResourceExplorerPanel()
-
-
Method Details
-
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
-
renderResourceFile
protected void renderResourceFile(net.minecraft.resources.Identifier id) Description copied from class:AbstractExplorerPanelRenders a single resource file leaf node. Double-clicking opens the resource; subclasses may override for custom behaviour.- Overrides:
renderResourceFilein classAbstractExplorerPanel
-
openResource
protected void openResource(net.minecraft.resources.Identifier id) Description copied from class:AbstractExplorerPanelHandle opening/editing a resource identified by an Identifier.- Specified by:
openResourcein classAbstractExplorerPanel
-