Record Class FallbackResourceManager.PackEntry
java.lang.Object
java.lang.Record
net.minecraft.server.packs.resources.FallbackResourceManager.PackEntry
- Enclosing class:
- FallbackResourceManager
static record FallbackResourceManager.PackEntry(String name, @Nullable PackResources resources, @Nullable Predicate<ResourceLocation> filter)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Predicate<ResourceLocation>The field for thefilterrecord component.private final StringThe field for thenamerecord component.private final PackResourcesThe field for theresourcesrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionPackEntry(String name, PackResources resources, Predicate<ResourceLocation> filter) Creates an instance of aPackEntryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.filter()Returns the value of thefilterrecord component.voidfilterAll(Collection<ResourceLocation> p_215443_) final inthashCode()Returns a hash code value for this object.booleanisFiltered(ResourceLocation p_215441_) name()Returns the value of thenamerecord component.Returns the value of theresourcesrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
name
The field for thenamerecord component. -
resources
The field for theresourcesrecord component. -
filter
The field for thefilterrecord component.
-
-
Constructor Details
-
PackEntry
PackEntry(String name, @Nullable PackResources resources, @Nullable Predicate<ResourceLocation> filter) Creates an instance of aPackEntryrecord class.- Parameters:
name- the value for thenamerecord componentresources- the value for theresourcesrecord componentfilter- the value for thefilterrecord component
-
-
Method Details
-
filterAll
-
isFiltered
-
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). -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
resources
Returns the value of theresourcesrecord component.- Returns:
- the value of the
resourcesrecord component
-
filter
Returns the value of thefilterrecord component.- Returns:
- the value of the
filterrecord component
-