Package foundry.veil.api.resource.type
Record Class McMetaResource
java.lang.Object
java.lang.Record
foundry.veil.api.resource.type.McMetaResource
- All Implemented Interfaces:
VeilResource<McMetaResource>
public record McMetaResource(VeilResourceInfo resourceInfo, net.minecraft.server.packs.resources.ResourceMetadata metadata)
extends Record
implements VeilResource<McMetaResource>
-
Constructor Summary
ConstructorDescriptionMcMetaResource
(VeilResourceInfo resourceInfo, net.minecraft.server.packs.resources.ResourceMetadata metadata) Creates an instance of aMcMetaResource
record class. -
Method Summary
Modifier and TypeMethodDescriptionboolean
final boolean
Indicates whether some other object is "equal to" this one.int
Gets the icon code for this resource (ex.final int
hashCode()
Returns a hash code value for this object.void
Hot-reloads the resourcenet.minecraft.server.packs.resources.ResourceMetadata
metadata()
Returns the value of themetadata
record component.Returns the value of theresourceInfo
record component.final String
toString()
Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface foundry.veil.api.resource.VeilResource
copyToResources, onFileSystemChange, render
-
Constructor Details
-
McMetaResource
public McMetaResource(VeilResourceInfo resourceInfo, net.minecraft.server.packs.resources.ResourceMetadata metadata) Creates an instance of aMcMetaResource
record class.- Parameters:
resourceInfo
- the value for theresourceInfo
record componentmetadata
- the value for themetadata
record component
-
-
Method Details
-
getActions
- Specified by:
getActions
in interfaceVeilResource<McMetaResource>
- Returns:
- All actions that can be performed on this resource
-
canHotReload
public boolean canHotReload()- Specified by:
canHotReload
in interfaceVeilResource<McMetaResource>
- Returns:
- If this resource can be hot-reloaded
-
hotReload
public void hotReload()Description copied from interface:VeilResource
Hot-reloads the resource- Specified by:
hotReload
in interfaceVeilResource<McMetaResource>
-
getIconCode
public int getIconCode()Description copied from interface:VeilResource
Gets the icon code for this resource (ex. 0xED0F)- Specified by:
getIconCode
in interfaceVeilResource<McMetaResource>
-
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. All components in this record class are compared withObjects::equals(Object,Object)
. -
resourceInfo
Returns the value of theresourceInfo
record component.- Specified by:
resourceInfo
in interfaceVeilResource<McMetaResource>
- Returns:
- the value of the
resourceInfo
record component
-
metadata
public net.minecraft.server.packs.resources.ResourceMetadata metadata()Returns the value of themetadata
record component.- Returns:
- the value of the
metadata
record component
-