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>
@Internal
public record McMetaResource(VeilResourceInfo resourceInfo, net.minecraft.server.packs.resources.ResourceMetadata metadata)
extends Record
implements VeilResource<McMetaResource>
-
Constructor Summary
ConstructorsConstructorDescriptionMcMetaResource(VeilResourceInfo resourceInfo, net.minecraft.server.packs.resources.ResourceMetadata metadata) Creates an instance of aMcMetaResourcerecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanfinal booleanIndicates whether some other object is "equal to" this one.intGets the icon code for this resource (ex.final inthashCode()Returns a hash code value for this object.voidhotReload(VeilResourceManager resourceManager) Hot-reloads the resource.net.minecraft.server.packs.resources.ResourceMetadatametadata()Returns the value of themetadatarecord component.Returns the value of theresourceInforecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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 aMcMetaResourcerecord class.- Parameters:
resourceInfo- the value for theresourceInforecord componentmetadata- the value for themetadatarecord component
-
-
Method Details
-
getActions
- Specified by:
getActionsin interfaceVeilResource<McMetaResource>- Returns:
- All actions that can be performed on this resource
-
canHotReload
public boolean canHotReload()- Specified by:
canHotReloadin interfaceVeilResource<McMetaResource>- Returns:
- If this resource can be hot-reloaded
-
hotReload
Description copied from interface:VeilResourceHot-reloads the resource.- Specified by:
hotReloadin interfaceVeilResource<McMetaResource>- Parameters:
resourceManager- The resource manager reloading the resource- Throws:
IOException- If any error occurs while trying to reload
-
getIconCode
public int getIconCode()Description copied from interface:VeilResourceGets the icon code for this resource (ex. 0xED0F)- Specified by:
getIconCodein 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 theresourceInforecord component.- Specified by:
resourceInfoin interfaceVeilResource<McMetaResource>- Returns:
- the value of the
resourceInforecord component
-
metadata
public net.minecraft.server.packs.resources.ResourceMetadata metadata()Returns the value of themetadatarecord component.- Returns:
- the value of the
metadatarecord component
-