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 location, Pack.ResourcesSupplier resources, Pack.Metadata metadata, PackSelectionConfig selectionConfig) privatePack(PackLocationInfo location, Pack.ResourcesSupplier resources, Pack.Metadata metadata, PackSelectionConfig selectionConfig, List<Pack> children) -
Method Summary
Modifier and TypeMethodDescriptionbooleangetChatLink(boolean green) static InclusiveRange<Integer> getDeclaredPackVersions(String id, PackMetadataSection metadata) getId()getTitle()inthashCode()hidden()Returns a copy of the pack that is hidden.booleanbooleanisHidden()booleanlocation()open()static PackreadMetaAndCreate(PackLocationInfo location, Pack.ResourcesSupplier resources, PackType packType, PackSelectionConfig selectionConfig) static Pack.MetadatareadPackMetadata(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()
-