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.コンストラクタと説明 |
---|
ExistingFileHelper(java.util.Collection<java.nio.file.Path> existingPacks,
boolean enable) |
修飾子とタイプ | メソッドと説明 |
---|---|
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.IOException
public boolean isEnabled()
true
if validation is enabled, false
otherwise