Class Pack

java.lang.Object
net.minecraft.server.packs.repository.Pack

public class Pack extends Object
  • Field Details

    • LOGGER

      private static final org.slf4j.Logger LOGGER
    • location

      private final PackLocationInfo location
    • resources

      private final Pack.ResourcesSupplier resources
    • metadata

      private final Pack.Metadata metadata
    • selectionConfig

      private final PackSelectionConfig selectionConfig
    • hidden

      private final boolean hidden
      Neo: Allows packs to be hidden from the UI entirely
    • children

      private final List<Pack> children
      Neo: Allows packs to specify packs which will always be placed beneath them; must be hidden
    • CHILD_SOURCE

      private static final PackSource CHILD_SOURCE
      Neo: Pack source for child packs; should not be otherwise used
  • Constructor Details

  • 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

      public PackLocationInfo location()
    • getTitle

      public Component getTitle()
    • getDescription

      public Component getDescription()
    • getChatLink

      public Component getChatLink(boolean enabled)
    • getCompatibility

      public PackCompatibility getCompatibility()
    • getRequestedFeatures

      public FeatureFlagSet getRequestedFeatures()
    • openMetadata

      public PackMetadataResources openMetadata()
    • open

      public Stream<PackResources> open()
    • getId

      public String getId()
    • selectionConfig

      public PackSelectionConfig selectionConfig()
    • isRequired

      public boolean isRequired()
    • isFixedPosition

      public boolean isFixedPosition()
    • getDefaultPosition

      public Pack.Position getDefaultPosition()
    • getPackSource

      public PackSource getPackSource()
    • isHidden

      public boolean isHidden()
      Neo: Returns whether this pack is hidden.
      Returns:
      whether this pack is hidden
    • getChildren

      public List<Pack> getChildren()
      Neo: Returns the child packs of this pack.
      Returns:
      the child packs of this pack
    • streamSelfAndChildren

      public Stream<Pack> streamSelfAndChildren()
      Neo: Returns a stream of this pack and its children.
      Returns:
      a stream of this pack and its children
    • withChildren

      public Pack withChildren(List<Pack> children)
      Neo: 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
    • hidden

      public Pack hidden()
      Neo: Returns a copy of the pack that is hidden.
      Returns:
      a copy of the pack that is hidden
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object