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 location, Pack.ResourcesSupplier resources, Pack.Metadata metadata, PackSelectionConfig selectionConfig) private
Pack
(PackLocationInfo location, Pack.ResourcesSupplier resources, Pack.Metadata metadata, PackSelectionConfig selectionConfig, List<Pack> children) -
Method Summary
Modifier and TypeMethodDescriptionboolean
getChatLink
(boolean green) static InclusiveRange
<Integer> getDeclaredPackVersions
(String id, PackMetadataSection metadata) getId()
getTitle()
int
hashCode()
hidden()
Returns a copy of the pack that is hidden.boolean
boolean
isHidden()
boolean
location()
open()
static Pack
readMetaAndCreate
(PackLocationInfo location, Pack.ResourcesSupplier resources, PackType packType, PackSelectionConfig selectionConfig) static Pack.Metadata
readPackMetadata
(PackLocationInfo location, Pack.ResourcesSupplier resources, int version) 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 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)
-
-
Method Details
-
readMetaAndCreate
@Nullable public static Pack readMetaAndCreate(PackLocationInfo location, Pack.ResourcesSupplier resources, PackType packType, PackSelectionConfig selectionConfig) -
readPackMetadata
@Nullable public static Pack.Metadata readPackMetadata(PackLocationInfo location, Pack.ResourcesSupplier resources, int version) -
getDeclaredPackVersions
public static InclusiveRange<Integer> getDeclaredPackVersions(String id, PackMetadataSection metadata) -
location
-
getTitle
-
getDescription
-
getChatLink
- Parameters:
green
- 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()
-