Package foundry.veil.api.resource
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 Summary
Modifier and TypeMethodDescriptionbooleandefault voidintGets the icon code for this resource (ex.voidHot-reloads the resourcedefault CompletableFuture<?> onFileSystemChange(WatchEvent<Path> event) Called from the watcher thread when this resource updates on disc.default voidrender(boolean dragging) Rebders this resource into the resource panel.
-
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
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
- Throws:
IOException
-
getIconCode
int getIconCode()Gets the icon code for this resource (ex. 0xED0F)
-