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 Summary
FieldsModifier 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 Summary
ConstructorsConstructorDescriptionLoader(RegistryDataLoader.RegistryData<T> data, WritableRegistry<T> registry, Map<ResourceKey<?>, Exception> loadingErrors) Creates an instance of aLoaderrecord class. -
Method Summary
Modifier 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_321562_, ResourceProvider p_326419_, RegistryOps.RegistryInfoLookup p_321617_) voidloadFromResources(ResourceManager p_321702_, RegistryOps.RegistryInfoLookup p_321840_) 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
-
data
The field for thedatarecord component. -
registry
The field for theregistryrecord component. -
loadingErrors
The field for theloadingErrorsrecord component.
-
-
Constructor Details
-
Loader
Loader(RegistryDataLoader.RegistryData<T> data, WritableRegistry<T> registry, Map<ResourceKey<?>, Exception> loadingErrors) Creates an instance of aLoaderrecord class.- Parameters:
data- the value for thedatarecord componentregistry- the value for theregistryrecord componentloadingErrors- the value for theloadingErrorsrecord component
-
-
Method Details
-
loadFromResources
-
loadFromNetwork
public void loadFromNetwork(Map<ResourceKey<? extends Registry<?>>, List<RegistrySynchronization.PackedRegistryEntry>> p_321562_, ResourceProvider p_326419_, RegistryOps.RegistryInfoLookup p_321617_) -
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). -
data
Returns the value of thedatarecord component.- Returns:
- the value of the
datarecord component
-
registry
Returns the value of theregistryrecord component.- Returns:
- the value of the
registryrecord component
-
loadingErrors
Returns the value of theloadingErrorsrecord component.- Returns:
- the value of the
loadingErrorsrecord component
-