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
Modifier and TypeFieldDescriptionprivate final RegistryDataLoader.RegistryData
<T> The field for thedata
record component.private final Map
<ResourceKey<?>, Exception> The field for theloadingErrors
record component.private final WritableRegistry
<T> The field for theregistry
record component. -
Constructor Summary
ConstructorDescriptionLoader
(RegistryDataLoader.RegistryData<T> data, WritableRegistry<T> registry, Map<ResourceKey<?>, Exception> loadingErrors) Creates an instance of aLoader
record class. -
Method Summary
Modifier and TypeMethodDescriptiondata()
Returns the value of thedata
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.void
loadFromNetwork
(Map<ResourceKey<? extends Registry<?>>, List<RegistrySynchronization.PackedRegistryEntry>> p_321562_, ResourceProvider p_326419_, RegistryOps.RegistryInfoLookup p_321617_) void
loadFromResources
(ResourceManager p_321702_, RegistryOps.RegistryInfoLookup p_321840_) Map
<ResourceKey<?>, Exception> Returns the value of theloadingErrors
record component.registry()
Returns the value of theregistry
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
data
The field for thedata
record component. -
registry
The field for theregistry
record component. -
loadingErrors
The field for theloadingErrors
record component.
-
-
Constructor Details
-
Loader
Loader(RegistryDataLoader.RegistryData<T> data, WritableRegistry<T> registry, Map<ResourceKey<?>, Exception> loadingErrors) Creates an instance of aLoader
record class.- Parameters:
data
- the value for thedata
record componentregistry
- the value for theregistry
record componentloadingErrors
- the value for theloadingErrors
record 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 thedata
record component.- Returns:
- the value of the
data
record component
-
registry
Returns the value of theregistry
record component.- Returns:
- the value of the
registry
record component
-
loadingErrors
Returns the value of theloadingErrors
record component.- Returns:
- the value of the
loadingErrors
record component
-