Class RawAsset<K>

java.lang.Object
com.hypixel.hytale.assetstore.RawAsset<K>
Type Parameters:
K - The key type for the asset.
All Implemented Interfaces:
AssetHolder<K>

@ParametersAreNullableByDefault public class RawAsset<K> extends Object implements AssetHolder<K>
A raw asset is a reference to an asset that hasn't be decoded yet.
  • Constructor Details

    • RawAsset

      public RawAsset(K key, Path path)
      References a non-decoded asset by its path on disk without a resolved parent key.
    • RawAsset

      public RawAsset(Path parentPath, K key, K parentKey, int lineOffset, char[] buffer, AssetExtraInfo.Data containerData, @Nonnull ContainedAssetCodec.Mode containedAssetMode)
  • Method Details

    • getKey

      @Nullable public K getKey()
    • isParentKeyResolved

      public boolean isParentKeyResolved()
    • getParentKey

      @Nullable public K getParentKey()
    • getPath

      @Nullable public Path getPath()
    • getParentPath

      public Path getParentPath()
    • getLineOffset

      public int getLineOffset()
    • getBuffer

      public char[] getBuffer()
    • getContainedAssetMode

      @Nonnull public ContainedAssetCodec.Mode getContainedAssetMode()
    • toRawJsonReader

      @Nonnull public RawJsonReader toRawJsonReader(@Nonnull Supplier<char[]> bufferSupplier) throws IOException
      Throws:
      IOException
    • makeData

      @Nonnull public AssetExtraInfo.Data makeData(Class<? extends JsonAssetWithMap<K,?>> aClass, K key, K parentKey)
    • withResolveKeys

      @Nonnull public RawAsset<K> withResolveKeys(K key, K parentKey)
      Turns this RawAsset into a RawAsset with resolved keys. References a non-decoded asset from an existing RawAsset with a resolved parent key.
    • toString

      @Nonnull public String toString()
      Overrides:
      toString in class Object