Package net.minecraft.resources
Record Class RegistryDataLoader.Loader<T>
java.lang.Object
java.lang.Record
net.minecraft.resources.RegistryDataLoader.Loader<T>
- Enclosing class:
- RegistryDataLoader
static record RegistryDataLoader.Loader<T>(RegistryDataLoader.RegistryData<T> data, WritableRegistry<T> registry, Map<ResourceKey<?>,Exception> loadingErrors)
extends Record 
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final RegistryDataLoader.RegistryData<T> The field for thedatarecord component.private final Map<ResourceKey<?>, Exception> The field for theloadingErrorsrecord component.private final WritableRegistry<T> The field for theregistryrecord component.
- 
Constructor SummaryConstructorsConstructorDescriptionLoader(RegistryDataLoader.RegistryData<T> data, WritableRegistry<T> registry, Map<ResourceKey<?>, Exception> loadingErrors) Creates an instance of aLoaderrecord class.
- 
Method SummaryModifier and TypeMethodDescriptiondata()Returns the value of thedatarecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.voidloadFromNetwork(Map<ResourceKey<? extends Registry<?>>, List<RegistrySynchronization.PackedRegistryEntry>> p_333047_, ResourceProvider p_333682_, RegistryOps.RegistryInfoLookup p_330665_) voidloadFromResources(ResourceManager p_328137_, RegistryOps.RegistryInfoLookup p_330371_) Map<ResourceKey<?>, Exception> Returns the value of theloadingErrorsrecord component.registry()Returns the value of theregistryrecord component.final StringtoString()Returns a string representation of this record class.
- 
Field Details- 
dataThe field for thedatarecord component.
- 
registryThe field for theregistryrecord component.
- 
loadingErrorsThe field for theloadingErrorsrecord component.
 
- 
- 
Constructor Details- 
LoaderLoader(RegistryDataLoader.RegistryData<T> data, WritableRegistry<T> registry, Map<ResourceKey<?>, Exception> loadingErrors) Creates an instance of aLoaderrecord class.- Parameters:
- data- the value for the- datarecord component
- registry- the value for the- registryrecord component
- loadingErrors- the value for the- loadingErrorsrecord component
 
 
- 
- 
Method Details- 
loadFromResources
- 
loadFromNetworkpublic void loadFromNetwork(Map<ResourceKey<? extends Registry<?>>, List<RegistrySynchronization.PackedRegistryEntry>> p_333047_, ResourceProvider p_333682_, RegistryOps.RegistryInfoLookup p_330665_) 
- 
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).
- 
dataReturns the value of thedatarecord component.- Returns:
- the value of the datarecord component
 
- 
registryReturns the value of theregistryrecord component.- Returns:
- the value of the registryrecord component
 
- 
loadingErrorsReturns the value of theloadingErrorsrecord component.- Returns:
- the value of the loadingErrorsrecord component
 
 
-