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 PackSourceprivate final booleanprivate final PackLocationInfoprivate static final org.slf4j.Loggerprivate final Pack.Metadataprivate final Pack.ResourcesSupplierprivate final PackSelectionConfig -
Constructor Summary
ConstructorsModifierConstructorDescriptionPack(PackLocationInfo pLocation, Pack.ResourcesSupplier pResources, Pack.Metadata pMetadata, PackSelectionConfig pSelectionConfig) privatePack(PackLocationInfo pLocation, Pack.ResourcesSupplier pResources, Pack.Metadata pMetadata, PackSelectionConfig pSelectionConfig, List<Pack> children) -
Method Summary
Modifier and TypeMethodDescriptionbooleangetChatLink(boolean pGreen) static InclusiveRange<Integer> getDeclaredPackVersions(String pId, PackMetadataSection pMetadata) getId()getTitle()inthashCode()hidden()Returns a copy of the pack that is hidden.booleanbooleanisHidden()booleanlocation()open()static PackreadMetaAndCreate(PackLocationInfo pLocation, Pack.ResourcesSupplier pResources, PackType pPackType, PackSelectionConfig pSelectionConfig) static Pack.MetadatareadPackMetadata(PackLocationInfo pLocation, Pack.ResourcesSupplier pResources, int pVersion) withChildren(List<Pack> children) 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
-
-
Constructor Details
-
Pack
public Pack(PackLocationInfo pLocation, Pack.ResourcesSupplier pResources, Pack.Metadata pMetadata, PackSelectionConfig pSelectionConfig) -
Pack
private Pack(PackLocationInfo pLocation, Pack.ResourcesSupplier pResources, Pack.Metadata pMetadata, PackSelectionConfig pSelectionConfig, List<Pack> children)
-
-
Method Details
-
readMetaAndCreate
@Nullable public static Pack readMetaAndCreate(PackLocationInfo pLocation, Pack.ResourcesSupplier pResources, PackType pPackType, PackSelectionConfig pSelectionConfig) -
readPackMetadata
@Nullable public static Pack.Metadata readPackMetadata(PackLocationInfo pLocation, Pack.ResourcesSupplier pResources, int pVersion) -
getDeclaredPackVersions
public static InclusiveRange<Integer> getDeclaredPackVersions(String pId, PackMetadataSection pMetadata) -
location
-
getTitle
-
getDescription
-
getChatLink
- Parameters:
pGreen- used to indicate either a successful operation or datapack enabled status
-
getCompatibility
-
getRequestedFeatures
-
open
-
getId
-
selectionConfig
-
isRequired
public boolean isRequired() -
isFixedPosition
public boolean isFixedPosition() -
getDefaultPosition
-
getPackSource
-
isHidden
public boolean isHidden() -
getChildren
-
streamSelfAndChildren
-
withChildren
Returns a copy of the pack with the provided children in place of any children this pack currently has.- Returns:
- a copy of the pack with the provided children in place of any children this pack currently has
-
equals
-
hashCode
public int hashCode()
-