Package foundry.veil.api.resource
Record Class VeilResourceInfo
java.lang.Object
java.lang.Record
foundry.veil.api.resource.VeilResourceInfo
- Record Components:
location
- The resource location path this resource is located atfilePath
- The file path of this resourcemodResourcePath
- The path to this resource in the build folder if in a dev environment- Whether this resource should appear in the resource panel
-
Constructor Summary
ConstructorDescriptionVeilResourceInfo
(net.minecraft.server.packs.PackType packType, net.minecraft.resources.ResourceLocation location, Path filePath, @Nullable Path modResourcePath, boolean hidden) Creates an instance of aVeilResourceInfo
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.fileName()
filePath()
Returns the value of thefilePath
record component.final int
hashCode()
Returns a hash code value for this object.boolean
hidden()
Returns the value of thehidden
record component.boolean
isStatic()
net.minecraft.resources.ResourceLocation
location()
Returns the value of thelocation
record component.@Nullable Path
Returns the value of themodResourcePath
record component.net.minecraft.server.packs.PackType
packType()
Returns the value of thepackType
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
VeilResourceInfo
public VeilResourceInfo(net.minecraft.server.packs.PackType packType, net.minecraft.resources.ResourceLocation location, Path filePath, @Nullable @Nullable Path modResourcePath, boolean hidden) Creates an instance of aVeilResourceInfo
record class.- Parameters:
packType
- the value for thepackType
record componentlocation
- the value for thelocation
record componentfilePath
- the value for thefilePath
record componentmodResourcePath
- the value for themodResourcePath
record componenthidden
- the value for thehidden
record component
-
-
Method Details
-
fileName
- Returns:
- The file name of this resource
-
isStatic
public boolean isStatic()- Returns:
- If this file cannot be accessed by the native file system
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
packType
public net.minecraft.server.packs.PackType packType()Returns the value of thepackType
record component.- Returns:
- the value of the
packType
record component
-
location
public net.minecraft.resources.ResourceLocation location()Returns the value of thelocation
record component.- Returns:
- the value of the
location
record component
-
filePath
Returns the value of thefilePath
record component.- Returns:
- the value of the
filePath
record component
-
modResourcePath
Returns the value of themodResourcePath
record component.- Returns:
- the value of the
modResourcePath
record component
-