Class Pack
java.lang.Object
net.minecraft.server.packs.repository.Pack
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic enumstatic interface -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final PackSourceNeo: Pack source for child packs; should not be otherwise usedNeo: Allows packs to specify packs which will always be placed beneath them; must be hiddenprivate final booleanNeo: Allows packs to be hidden from the UI entirelyprivate final PackLocationInfoprivate static final org.slf4j.Loggerprivate final Pack.Metadataprivate final Pack.ResourcesSupplierprivate final PackSelectionConfig -
Constructor Summary
ConstructorsModifierConstructorDescriptionPack(PackLocationInfo location, Pack.ResourcesSupplier resources, Pack.Metadata metadata, PackSelectionConfig selectionConfig) privatePack(PackLocationInfo location, Pack.ResourcesSupplier resources, Pack.Metadata metadata, PackSelectionConfig selectionConfig, List<Pack> children) Neo: internal constructor for handling hidden packs -
Method Summary
Modifier and TypeMethodDescriptionbooleangetChatLink(boolean enabled) Neo: Returns the child packs of this pack.getId()getTitle()inthashCode()hidden()Neo: Returns a copy of the pack that is hidden.booleanbooleanisHidden()Neo: Returns whether this pack is hidden.booleanlocation()open()readMetaAndCreate(PackLocationInfo location, Pack.ResourcesSupplier resources, PackType packType, PackSelectionConfig selectionConfig) static @Nullable Pack.MetadatareadPackMetadata(PackLocationInfo location, Pack.ResourcesSupplier resources, PackFormat currentPackVersion, PackType type) Neo: Returns a stream of this pack and its children.withChildren(List<Pack> children) Neo: Returns a copy of the pack with the provided children in place of any children this pack currently has.
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
location
-
resources
-
metadata
-
selectionConfig
-
children
-
CHILD_SOURCE
Neo: Pack source for child packs; should not be otherwise used
-
-
Constructor Details
-
Pack
public Pack(PackLocationInfo location, Pack.ResourcesSupplier resources, Pack.Metadata metadata, PackSelectionConfig selectionConfig) -
Pack
private Pack(PackLocationInfo location, Pack.ResourcesSupplier resources, Pack.Metadata metadata, PackSelectionConfig selectionConfig, List<Pack> children) Neo: internal constructor for handling hidden packs
-
-
Method Details
-
readMetaAndCreate
public static @Nullable Pack readMetaAndCreate(PackLocationInfo location, Pack.ResourcesSupplier resources, PackType packType, PackSelectionConfig selectionConfig) -
readPackMetadata
public static @Nullable Pack.Metadata readPackMetadata(PackLocationInfo location, Pack.ResourcesSupplier resources, PackFormat currentPackVersion, PackType type) -
location
-
getTitle
-
getDescription
-
getChatLink
-
getCompatibility
-
getRequestedFeatures
-
openMetadata
-
open
-
getId
-
selectionConfig
-
isRequired
public boolean isRequired() -
isFixedPosition
public boolean isFixedPosition() -
getDefaultPosition
-
getPackSource
-
isHidden
public boolean isHidden()Neo: Returns whether this pack is hidden.- Returns:
- whether this pack is hidden
-
getChildren
-
streamSelfAndChildren
-
withChildren
-
equals
-
hashCode
-