Contents
Class PrefabLoader
java.lang.Object
com.hypixel.hytale.server.core.prefab.selection.buffer.PrefabLoader
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidresolvePrefabFolder(Path rootFolder, String prefabName, Consumer<Path> pathConsumer) voidresolvePrefabs(String prefabName, Consumer<Path> pathConsumer) static voidresolvePrefabs(Path rootFolder, String prefabName, Consumer<Path> pathConsumer) static StringresolveRelativeJsonPath(String prefabName, Path prefabPath, Path rootPrefabDir) Returns a json filepath for a prefab's real file path relativized against the provided root directory and prefab name.
-
Constructor Details
-
PrefabLoader
-
-
Method Details
-
getRootFolder
-
resolvePrefabs
public void resolvePrefabs(@Nonnull String prefabName, @Nonnull Consumer<Path> pathConsumer) throws IOException - Throws:
IOException
-
resolvePrefabs
public static void resolvePrefabs(@Nonnull Path rootFolder, @Nonnull String prefabName, @Nonnull Consumer<Path> pathConsumer) throws IOException - Throws:
IOException
-
resolvePrefabFolder
public static void resolvePrefabFolder(@Nonnull Path rootFolder, @Nonnull String prefabName, @Nonnull Consumer<Path> pathConsumer) throws IOException - Throws:
IOException
-
resolveRelativeJsonPath
@Nonnull public static String resolveRelativeJsonPath(@Nonnull String prefabName, @Nonnull Path prefabPath, @Nonnull Path rootPrefabDir) Returns a json filepath for a prefab's real file path relativized against the provided root directory and prefab name.- Parameters:
prefabName- The prefab name representing the prefab, or the directory containing the prefab, at the prefabPath.prefabPath- The path of the prefab file.rootPrefabDir- The root directory containing all prefab files.- Returns:
- The json filepath representing the prefab found at the given prefabPath.
-