### Start Video Playback - Java Source: https://github.com/watermediateam/watermedia/wiki/API-Implementations Initiates video playback using a VideoPlayer instance. Requires a URI specifying the video source. ```java videoPlayer.start(new URI("minecraft:videos/intro.mp4")); ``` -------------------------------- ### Get Image Renderer - Java Source: https://github.com/watermediateam/watermedia/wiki/API-Implementations Obtains an ImageRenderer after the image status is READY. Handles video content by providing a default 'Failed to Load VLC' renderer, requiring custom media player creation for actual video playback. ```java ImageCache.getRenderer(); ``` -------------------------------- ### Get Exception on Failure - Java Source: https://github.com/watermediateam/watermedia/wiki/API-Implementations Retrieves the exception that caused an ImageCache load to fail. This is called when ImageCache#getStatus() returns FAILED. ```java ImageCache.getException(); ``` -------------------------------- ### Get Image Cache - Java Source: https://github.com/watermediateam/watermedia/wiki/API-Implementations Retrieves the cached version of an image. Requires a URI and an Executor. The Executor is typically the Minecraft instance for async rendering. ```java ImageCache.getCache(new URI("minecraft:textures/gui/container/creative_inventory/tabs.png"), Minecraft.getMinecraft()); ``` -------------------------------- ### Create Video Player - Java Source: https://github.com/watermediateam/watermedia/wiki/API-Implementations Instantiates a VideoPlayer. Requires a MediaPlayerFactory and an Executor for asynchronous operations. ```java new VideoPlayer(mediaPlayerFactory, Minecraft.getMinecraft()); ``` -------------------------------- ### Load Image - Java Source: https://github.com/watermediateam/watermedia/wiki/API-Implementations Steps to load an image using ImageCache. This involves declaring usage, checking status, loading, and then monitoring until ready or failed. ```java ImageCache.use(); ImageCache.getStatus(); ImageCache.load(); ImageCache.getStatus(); ``` -------------------------------- ### Add CurseMaven Repository to Gradle Source: https://github.com/watermediateam/watermedia/wiki/Home Configure your Gradle build to include the CurseMaven repository for dependency management. This is a prerequisite for adding WaterMedia. ```gradle repositories { // ... maven { url "https://www.cursemaven.com" content { includeGroup "curse.maven" } } } ``` -------------------------------- ### Implement WaterMedia Dependency in Gradle Source: https://github.com/watermediateam/watermedia/wiki/Home Add the WaterMedia dependency to your project's build file. It is recommended to manage the version in gradle.properties. Supports both Forge and Fabric. ```gradle watermediaversion = '4600199' dependencies { // FORGE implementation fg.deobf("curse.maven:watermedia-869524:${watermediaversion}") // FABRIC modImplementation "curse.maven:watermedia-869524:${watermediaversion}" ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.