Interface VeilResource<T extends VeilResource<?>>

All Known Subinterfaces:
VeilShaderResource<T>, VeilTextResource<T>
All Known Implementing Classes:
FramebufferResource, McMetaResource, PostPipelineResource, TextResource, TextureResource, UnknownResource, VeilShaderDefinitionResource, VeilShaderFileResource, VeilShaderIncludeResource

public interface VeilResource<T extends VeilResource<?>>
  • Method Details

    • render

      default void render(boolean dragging)
      Rebders this resource into the resource panel.
      Parameters:
      dragging - Whether the user is dragging the resource
    • onFileSystemChange

      default CompletableFuture<?> onFileSystemChange(WatchEvent<Path> event)
      Called from the watcher thread when this resource updates on disc.
      Parameters:
      event - The event received from the file watcher
      Returns:
      A future for when the key can be reset. All events are ignored until this future completes
    • resourceInfo

      VeilResourceInfo resourceInfo()
    • getActions

      List<VeilResourceAction<T>> getActions()
      Returns:
      All actions that can be performed on this resource
    • canHotReload

      boolean canHotReload()
      Returns:
      If this resource can be hot-reloaded
    • hotReload

      void hotReload()
      Hot-reloads the resource
    • copyToResources

      default void copyToResources() throws IOException
      Throws:
      IOException
    • getIconCode

      int getIconCode()
      Gets the icon code for this resource (ex. 0xED0F)