Package net.minecraft.client.renderer
Record Class GameRenderer.ResourceCache
java.lang.Object
java.lang.Record
net.minecraft.client.renderer.GameRenderer.ResourceCache
- All Implemented Interfaces:
ResourceProvider
- Enclosing class:
- GameRenderer
public static record GameRenderer.ResourceCache(ResourceProvider original, Map<ResourceLocation,Resource> cache)
extends Record
implements ResourceProvider
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Map<ResourceLocation,Resource> The field for thecacherecord component.private final ResourceProviderThe field for theoriginalrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionResourceCache(ResourceProvider original, Map<ResourceLocation, Resource> cache) Creates an instance of aResourceCacherecord class. -
Method Summary
Modifier and TypeMethodDescriptioncache()Returns the value of thecacherecord component.final booleanIndicates whether some other object is "equal to" this one.getResource(ResourceLocation p_251007_) final inthashCode()Returns a hash code value for this object.original()Returns the value of theoriginalrecord 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 net.minecraft.server.packs.resources.ResourceProvider
getResourceOrThrow, open, openAsReader
-
Field Details
-
original
The field for theoriginalrecord component. -
cache
The field for thecacherecord component.
-
-
Constructor Details
-
ResourceCache
Creates an instance of aResourceCacherecord class.- Parameters:
original- the value for theoriginalrecord componentcache- the value for thecacherecord component
-
-
Method Details
-
getResource
- Specified by:
getResourcein interfaceResourceProvider
-
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). -
original
Returns the value of theoriginalrecord component.- Returns:
- the value of the
originalrecord component
-
cache
Returns the value of thecacherecord component.- Returns:
- the value of the
cacherecord component
-