public class ExistingFileHelper
extends java.lang.Object
GatherDataEvent utilizes the standard
resources (via VanillaPack), as well as any extra resource packs
passed in via the --existing argument.| Constructor and Description |
|---|
ExistingFileHelper(java.util.Collection<java.nio.file.Path> existingPacks,
boolean enable) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
exists(ResourceLocation loc,
ResourcePackType type,
java.lang.String pathSuffix,
java.lang.String pathPrefix)
Check if a given resource exists in the known resource packs.
|
IResource |
getResource(ResourceLocation loc,
ResourcePackType type,
java.lang.String pathSuffix,
java.lang.String pathPrefix) |
boolean |
isEnabled() |
public ExistingFileHelper(java.util.Collection<java.nio.file.Path> existingPacks,
boolean enable)
public boolean exists(ResourceLocation loc, ResourcePackType type, java.lang.String pathSuffix, java.lang.String pathPrefix)
loc - the base location of the resource, e.g.
"minecraft:block/stone"type - the type of resources to checkpathSuffix - a string to append after the path, e.g. ".json"pathPrefix - a string to append before the path, before a slash, e.g.
"models"true if the resource exists in any pack, false
otherwisepublic IResource getResource(ResourceLocation loc, ResourcePackType type, java.lang.String pathSuffix, java.lang.String pathPrefix) throws java.io.IOException
java.io.IOExceptionpublic boolean isEnabled()
true if validation is enabled, false otherwise