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
Modifier and TypeFieldDescriptionprivate final Map
<ResourceLocation, Resource> The field for thecache
record component.private final ResourceProvider
The field for theoriginal
record component.Fields inherited from interface net.minecraft.server.packs.resources.ResourceProvider
EMPTY
-
Constructor Summary
ConstructorDescriptionResourceCache
(ResourceProvider original, Map<ResourceLocation, Resource> cache) Creates an instance of aResourceCache
record class. -
Method Summary
Modifier and TypeMethodDescriptioncache()
Returns the value of thecache
record component.final boolean
Indicates whether some other object is "equal to" this one.getResource
(ResourceLocation p_251007_) final int
hashCode()
Returns a hash code value for this object.original()
Returns the value of theoriginal
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 net.minecraft.server.packs.resources.ResourceProvider
getResourceOrThrow, open, openAsReader
-
Field Details
-
original
The field for theoriginal
record component. -
cache
The field for thecache
record component.
-
-
Constructor Details
-
ResourceCache
Creates an instance of aResourceCache
record class.- Parameters:
original
- the value for theoriginal
record componentcache
- the value for thecache
record component
-
-
Method Details
-
getResource
- Specified by:
getResource
in 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 theoriginal
record component.- Returns:
- the value of the
original
record component
-
cache
Returns the value of thecache
record component.- Returns:
- the value of the
cache
record component
-