PrefabStore

public class PrefabStore

Class PrefabStore. Provides prefabstore functionality for the Hytale server.

java.lang.Object > PrefabStore

Field Summary

file

final File file

Field file.

result

final List result

Field result.

prefabsPath

final Path prefabsPath

Field prefabsPath.

prefabPath

final Path prefabPath

Field prefabPath.

normalizedPath

final Path normalizedPath

Field normalizedPath.

manifest

final PluginManifest manifest

Field manifest.

Method Detail

PrefabStore

public private PrefabStore ()

Method PrefabStore.

getServerPrefab

public BlockSelection getServerPrefab (@Nonnull final String key)

Method getServerPrefab.

Parameters:
@Nonnull final String key

getPrefab

public BlockSelection getPrefab (@Nonnull final Path path)

Method getPrefab.

Parameters:
@Nonnull final Path path

getServerPrefabsPath

public Path getServerPrefabsPath ()

Method getServerPrefabsPath.

getServerPrefabDir

public BlockSelection> getServerPrefabDir (@Nonnull final String key)

Method getServerPrefabDir.

Parameters:
@Nonnull final String key

getPrefabDir

public BlockSelection> getPrefabDir (@Nonnull final Path dir)

Method getPrefabDir.

Parameters:
@Nonnull final Path dir

IllegalStateException

public new IllegalStateException (String.format("Duplicate key %s", u)

Method IllegalStateException.

Parameters:
String.format("Duplicate key %s"
u u

RuntimeException

public new RuntimeException ("Failed to list directory " + String.valueOf(dir)

Method RuntimeException.

Parameters:
"Failed to list directory " + String.valueOf(dir

saveServerPrefab

public void saveServerPrefab (@Nonnull final String key, @Nonnull final BlockSelection prefab)

Method saveServerPrefab.

Parameters:
@Nonnull final String key
@Nonnull final BlockSelection prefab

saveWorldGenPrefab

public void saveWorldGenPrefab (@Nonnull final String key, @Nonnull final BlockSelection prefab, final boolean overwrite)

Method saveWorldGenPrefab.

Parameters:
@Nonnull final String key
@Nonnull final BlockSelection prefab
final boolean overwrite

savePrefab

public void savePrefab (@Nonnull final Path path, @Nonnull final BlockSelection prefab, final boolean overwrite)

Method savePrefab.

Parameters:
@Nonnull final Path path
@Nonnull final BlockSelection prefab
final boolean overwrite

getWorldGenPrefabsPath

public Path getWorldGenPrefabsPath ()

Method getWorldGenPrefabsPath.

getAssetRootPath

public Path getAssetRootPath ()

Method getAssetRootPath.

getAssetPrefabsPath

public Path getAssetPrefabsPath ()

Method getAssetPrefabsPath.

getAssetPrefabsPathForPack

public Path getAssetPrefabsPathForPack (@Nonnull final AssetPack pack)

Method getAssetPrefabsPathForPack.

Parameters:
@Nonnull final AssetPack pack

getAllAssetPrefabPaths

public List getAllAssetPrefabPaths ()

Method getAllAssetPrefabPaths.

AssetPackPrefabPath

public new AssetPackPrefabPath (pack, prefabsPath)

Method AssetPackPrefabPath.

Parameters:
pack pack
prefabsPath prefabsPath

getAssetPrefabFromAnyPack

public BlockSelection getAssetPrefabFromAnyPack (@Nonnull final String key)

Method getAssetPrefabFromAnyPack.

Parameters:
@Nonnull final String key

findAssetPrefabPath

public Path findAssetPrefabPath (@Nonnull final String key)

Method findAssetPrefabPath.

Parameters:
@Nonnull final String key

findAssetPackForPrefabPath

public AssetPack findAssetPackForPrefabPath (@Nonnull final Path prefabPath)

Method findAssetPackForPrefabPath.

Parameters:
@Nonnull final Path prefabPath

getAssetPrefab

public BlockSelection getAssetPrefab (@Nonnull final String key)

Method getAssetPrefab.

Parameters:
@Nonnull final String key

getAssetPrefabDir

public BlockSelection> getAssetPrefabDir (@Nonnull final String key)

Method getAssetPrefabDir.

Parameters:
@Nonnull final String key

saveAssetPrefab

public void saveAssetPrefab (@Nonnull final String key, @Nonnull final BlockSelection prefab)

Method saveAssetPrefab.

Parameters:
@Nonnull final String key
@Nonnull final BlockSelection prefab

getWorldGenPrefab

public BlockSelection getWorldGenPrefab (@Nonnull final String key)

Method getWorldGenPrefab.

Parameters:
@Nonnull final String key

getWorldGenPrefabDir

public BlockSelection> getWorldGenPrefabDir (@Nonnull final String key)

Method getWorldGenPrefabDir.

Parameters:
@Nonnull final String key

get

static PrefabStore get ()

Method get.

isBasePack

public boolean isBasePack ()

Method isBasePack.

isFromAssetPack

public boolean isFromAssetPack ()

Method isFromAssetPack.

getPackName

public String getPackName ()

Method getPackName.

getDisplayName

public String getDisplayName ()

Method getDisplayName.

pack

public AssetPack pack ()

Method pack.

prefabsPath

public Path prefabsPath ()

Method prefabsPath.