Class Pack
java.lang.Object
net.minecraft.server.packs.repository.Pack
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final record
static enum
static interface
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final PackSource
private final boolean
private final PackLocationInfo
private static final org.slf4j.Logger
private final Pack.Metadata
private final Pack.ResourcesSupplier
private final PackSelectionConfig
-
Constructor Summary
ConstructorsModifierConstructorDescriptionPack
(PackLocationInfo pLocation, Pack.ResourcesSupplier pResources, Pack.Metadata pMetadata, PackSelectionConfig pSelectionConfig) private
Pack
(PackLocationInfo pLocation, Pack.ResourcesSupplier pResources, Pack.Metadata pMetadata, PackSelectionConfig pSelectionConfig, List<Pack> children) -
Method Summary
Modifier and TypeMethodDescriptionboolean
getChatLink
(boolean pGreen) static InclusiveRange
<Integer> getDeclaredPackVersions
(String pId, PackMetadataSection pMetadata) getId()
getTitle()
int
hashCode()
hidden()
Returns a copy of the pack that is hidden.boolean
boolean
isHidden()
boolean
location()
open()
static Pack
readMetaAndCreate
(PackLocationInfo pLocation, Pack.ResourcesSupplier pResources, PackType pPackType, PackSelectionConfig pSelectionConfig) static Pack.Metadata
readPackMetadata
(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()
-