Contents
Class BlockTypeAssetMap<K, T extends JsonAssetWithMap<K, BlockTypeAssetMap<K,T>>>
java.lang.Object
com.hypixel.hytale.assetstore.AssetMap<K,T>
com.hypixel.hytale.assetstore.map.DefaultAssetMap<K,T>
com.hypixel.hytale.assetstore.map.AssetMapWithIndexes<K,T>
com.hypixel.hytale.assetstore.map.BlockTypeAssetMap<K,T>
- Type Parameters:
K- The key type of the assets.T- The type of asset being stored.
public class BlockTypeAssetMap<K, T extends JsonAssetWithMap<K, BlockTypeAssetMap<K,T>>>
extends AssetMapWithIndexes<K,T>
An extension of AssetMap that stores block type assets with an index mapping.
The index is calculated at load time and is a runtime-only value.
-
Field Summary
Fields inherited from class AssetMapWithIndexes
NOT_FOUNDFields inherited from class DefaultAssetMap
DEFAULT_PACK_KEY, EMPTY_PAIR_ARRAY -
Constructor Summary
ConstructorsConstructorDescriptionBlockTypeAssetMap(IntFunction<T[]> arrayProvider, Function<T, String> groupGetter) -
Method Summary
Modifier and TypeMethodDescriptiongetAsset(int index) getAssetOrDefault(int index, T def) intgetGroupId(String group) String[]intintgetIndexOrDefault(K key, int def) intit.unimi.dsi.fastutil.objects.ObjectSet<K> getSubKeys(K key) Methods inherited from class AssetMapWithIndexes
getIndexesForTag, requireReplaceOnRemoveMethods inherited from class DefaultAssetMap
getAsset, getAsset, getAssetCount, getAssetMap, getAssetPack, getChildren, getKeys, getKeysForPack, getKeysForTag, getPath, getPathMap, getTagCount, getTagIndexes
-
Constructor Details
-
BlockTypeAssetMap
-
-
Method Details
-
getIndex
- Parameters:
key- to key to find get index for- Returns:
- the index assigned to the key or
AssetMapWithIndexes.NOT_FOUNDif not found
-
getIndexOrDefault
- Parameters:
key- to key to find get index fordef- to default value to return if the key isn't found- Returns:
- the index assigned to the key or
defif not found
-
getNextIndex
public int getNextIndex() -
getAsset
-
getAssetOrDefault
-
getSubKeys
-
getGroupId
-
getGroups
-