Package org.geysermc.geyser.util
Class AssetUtils
java.lang.Object
org.geysermc.geyser.util.AssetUtils
Implementation note: try to design processes to fail softly if the client jar can't be downloaded,
either if Mojang is down or internet access to Mojang is spotty.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic final recordA process that requires we download the client jar.static interface -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddTask(boolean required, AssetUtils.ClientJarTask task) Add task to be ran after the client jar is downloaded or found to be cached.static voidstatic CompletableFuture<Void> Fetch the latest versions asset cache from Mojang so we can grab the locale files laterstatic AssetUtils.Assetstatic booleanisAssetKnown(String name) static voidsaveFile(Path location, InputStream fileStream)
-
Method Details
-
getAsset
-
isAssetKnown
-
addTask
Add task to be ran after the client jar is downloaded or found to be cached.- Parameters:
required- if set to true, the client jar will always be downloaded, even if a pre-existing hash is matched. This means an asset or texture is missing.
-
generateAssetCache
Fetch the latest versions asset cache from Mojang so we can grab the locale files later -
downloadAndRunClientJarTasks
public static void downloadAndRunClientJarTasks() -
saveFile
- Throws:
IOException
-