Class PrefabBufferUtil
java.lang.Object
com.hypixel.hytale.server.core.prefab.selection.buffer.PrefabBufferUtil
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Map<Path, WeakReference<PrefabBufferUtil.CachedEntry>> static final Pathstatic final Patternstatic final Stringstatic final Stringstatic final Stringstatic final com.hypixel.hytale.logger.HytaleLoggerstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic IPrefabBufferprivate static PrefabBufferUtil.CachedEntrygetOrCreateCacheEntry(Path path) static PrefabBufferloadBuffer(Path path) static PrefabBufferloadFromJson(AssetPack pack, Path path, Path cachedLpfPath, Path jsonPath) static PrefabBufferloadFromLPF(Path path, Path realPath) static PrefabBufferreadFromFile(Path path) static CompletableFuture<PrefabBuffer> readFromFileAsync(Path path) static CompletableFuture<Void> writeToFileAsync(PrefabBuffer prefab, Path path)
-
Field Details
-
CACHE_PATH
-
LPF_FILE_SUFFIX
- See Also:
-
JSON_FILE_SUFFIX
- See Also:
-
JSON_LPF_FILE_SUFFIX
- See Also:
-
FILE_SUFFIX_REGEX
- See Also:
-
FILE_SUFFIX_PATTERN
-
LOGGER
public static final com.hypixel.hytale.logger.HytaleLogger LOGGER -
CACHE
-
-
Constructor Details
-
PrefabBufferUtil
public PrefabBufferUtil()
-
-
Method Details
-
getCached
-
loadBuffer
-
writeToFileAsync
@Nonnull public static CompletableFuture<Void> writeToFileAsync(@Nonnull PrefabBuffer prefab, @Nonnull Path path) -
readFromFile
-
readFromFileAsync
-
loadFromLPF
-
loadFromJson
@Nonnull public static PrefabBuffer loadFromJson(@Nullable AssetPack pack, Path path, @Nonnull Path cachedLpfPath, @Nonnull Path jsonPath) throws IOException - Throws:
IOException
-
getOrCreateCacheEntry
-