Package net.minecraft.client.render
Record Class GameRenderer.CachedResourceFactory
java.lang.Object
java.lang.Record
net.minecraft.client.render.GameRenderer.CachedResourceFactory
- Record Components:
- original-
- cache-
- All Implemented Interfaces:
- ResourceFactory
- Enclosing class:
- GameRenderer
@Environment(CLIENT)
public static record GameRenderer.CachedResourceFactory(ResourceFactory original, Map<Identifier,Resource> cache)
extends Record
implements ResourceFactory 
- Mappings:
- Namespace - Name - official - fjq$a- intermediary - net/minecraft/class_757$class_7760- named - net/minecraft/client/render/GameRenderer$CachedResourceFactory- official - a- intermediary - comp_1038- named - original- official - b- intermediary - comp_1039- named - cache
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final Map<Identifier,Resource> The field for thecacherecord component.private final ResourceFactoryThe field for theoriginalrecord component.
- 
Constructor SummaryConstructorsConstructorDescriptionCachedResourceFactory(ResourceFactory resourceFactory, Map<Identifier, Resource> map) 
- 
Method SummaryModifier and TypeMethodDescriptioncache()Returns the value of thecacherecord component.final booleanIndicates whether some other object is "equal to" this one.Finds and returns the corresponding resource for a resource's identifier.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.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.resource.ResourceFactorygetResourceOrThrow, open, openAsReader
- 
Field Details
- 
Constructor Details- 
CachedResourceFactory
 
- 
- 
Method Details- 
getResourceFinds and returns the corresponding resource for a resource's identifier.Starts by scanning each resource pack from highest priority to lowest. If no resource packs were found to contain the requested entry, will return Optional.empty().The returned resource must be closed to avoid resource leaks. - Specified by:
- getResourcein interface- ResourceFactory
- Parameters:
- id- the resource identifier to search for
- Mappings:
- Namespace - Name - Mixin selector - official - getResource- Lala;getResource(Lacq;)Ljava/util/Optional;- intermediary - method_14486- Lnet/minecraft/class_5912;method_14486(Lnet/minecraft/class_2960;)Ljava/util/Optional;- named - getResource- Lnet/minecraft/resource/ResourceFactory;getResource(Lnet/minecraft/util/Identifier;)Ljava/util/Optional;
 
- 
toStringReturns 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.
- 
hashCodepublic 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.
- 
equalsIndicates 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).
- 
originalReturns the value of theoriginalrecord component.- Returns:
- the value of the originalrecord component
 
- 
cacheReturns the value of thecacherecord component.- Returns:
- the value of the cacherecord component
 
 
-