Class PackObject


  • public class PackObject
    extends Object
    • Field Detail

      • IDENTIFIER_PATTERN

        @NotNull
        public static final @NotNull Pattern IDENTIFIER_PATTERN
      • NAME_PATTERN

        @NotNull
        public static final @NotNull Pattern NAME_PATTERN
    • Method Detail

      • getNamespace

        public String getNamespace()
      • getName

        public String getName()
      • getPack

        @Nullable
        public @Nullable ItemModsPack getPack()
      • getAsset

        @Nullable
        @Deprecated
        public @Nullable PackAsset getAsset()
        Deprecated.
        Deprecated because assets can have the same pack object if they have a different type. Use for this
        Returns:
        Returns the asset by the given namespace and key
      • getItem

        @Nullable
        public @Nullable ItemAsset getItem()
      • getBlock

        @Nullable
        public @Nullable BlockAsset getBlock()
      • getTemplate

        @Nullable
        public @Nullable CustomTemplate getTemplate()
      • getModel

        @Nullable
        public @Nullable ModelAsset getModel()
      • getTexture

        @Nullable
        public @Nullable TextureAsset getTexture()
      • getCustomModel

        @Nullable
        public @Nullable Integer getCustomModel()
      • save

        public void save()
      • getAssetByType

        @Nullable
        public <T extends PackAsset> T getAssetByType​(Class<T> assetClass)
        Get the asset by the class
        Parameters:
        assetClass - The class of the searched asset
        Returns:
        Returns null if nothing found or the asset