Class RecursivePrefabLoader<T>
java.lang.Object
com.hypixel.hytale.builtin.buildertools.utils.RecursivePrefabLoader<T>
- All Implemented Interfaces:
BiFunction<String,Random, T>
- Direct Known Subclasses:
RecursivePrefabLoader.BlockSelectionLoader
public abstract class RecursivePrefabLoader<T>
extends Object
implements BiFunction<String,Random,T>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classprotected static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intprivate static final intprotected final ComponentType<ChunkStore, com.hypixel.hytale.server.core.modules.prefabspawner.PrefabSpawnerState> protected final Path -
Constructor Summary
ConstructorsConstructorDescriptionRecursivePrefabLoader(Path rootPrefabsDir, Function<String, T> prefabsLoader) -
Method Summary
Modifier and TypeMethodDescriptionprivate static StringappendSuffix(String path) protected Tload(int x, int y, int z, String name, PrefabRotation rotation, PrefabWeights weights, Random random) protected abstract TloadPrefab(int var1, int var2, int var3, String var4, PrefabRotation var5, Random var6) protected TloadRandomPrefab(int x, int y, int z, List<Path> files, PrefabRotation rotation, Random random) protected TloadSinglePrefab(int x, int y, int z, Path file, PrefabRotation rotation, Random random) protected TloadWeightedPrefab(int x, int y, int z, String name, List<Path> files, PrefabRotation rotation, PrefabWeights weights, Random random) private static StringstripSuffix(String path) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.function.BiFunction
andThen
-
Field Details
-
MAX_RECURSION_DEPTH
private static final int MAX_RECURSION_DEPTH- See Also:
-
rootPrefabsDir
-
prefabsLoader
-
visitedFiles
-
prefabComponentType
@Nullable protected final ComponentType<ChunkStore,com.hypixel.hytale.server.core.modules.prefabspawner.PrefabSpawnerState> prefabComponentType -
depthTracker
private int depthTracker
-
-
Constructor Details
-
RecursivePrefabLoader
-
-
Method Details
-
apply
- Specified by:
applyin interfaceBiFunction<String,Random, T>
-
load
-
load
@Nonnull protected T load(int x, int y, int z, @Nonnull String name, PrefabRotation rotation, @Nonnull PrefabWeights weights, @Nonnull Random random) -
loadSinglePrefab
protected T loadSinglePrefab(int x, int y, int z, @Nonnull Path file, PrefabRotation rotation, Random random) -
loadWeightedPrefab
protected T loadWeightedPrefab(int x, int y, int z, @Nonnull String name, @Nonnull List<Path> files, PrefabRotation rotation, @Nonnull PrefabWeights weights, @Nonnull Random random) -
loadRandomPrefab
protected T loadRandomPrefab(int x, int y, int z, @Nonnull List<Path> files, PrefabRotation rotation, @Nonnull Random random) -
loadPrefab
protected abstract T loadPrefab(int var1, int var2, int var3, String var4, PrefabRotation var5, Random var6) -
stripSuffix
-
appendSuffix
-