abstract class RecursivePrefabLoader
Class RecursivePrefabLoader. Provides recursiveprefabloader functionality for the Hytale server.
java.lang.Object > RecursivePrefabLoader
Field Summary
depthTracker
private
int
depthTracker
Field depthTracker.
prefabs
final
DistinctCollector
prefabs
Field prefabs.
path
final
String
path
Field path.
prefab
final
Path
prefab
Field prefab.
file
final
Path
file
Field file.
children
final
List
children
Field children.
state
final
Holder
state
Field state.
spawner
final
PrefabSpawnerState
spawner
Field spawner.
blockType
final
BlockType
blockType
Field blockType.
childX
final
int
childX
Field childX.
childY
final
int
childY
Field childY.
childZ
final
int
childZ
Field childZ.
childPath
final
String
childPath
Field childPath.
childWeights
final
PrefabWeights
childWeights
Field childWeights.
childRotation
final
PrefabRotation
childRotation
Field childRotation.
child
final
BlockSelection
child
Field child.
rotation
final
Rotation
rotation
Field rotation.
Method Detail
RecursivePrefabLoader
public
public
RecursivePrefabLoader
(final Path rootPrefabsDir, final Function prefabsLoader)
Method RecursivePrefabLoader.
- Parameters:
final PathrootPrefabsDirfinal FunctionprefabsLoader
apply
public
T
apply
(@Nonnull final String name, @Nonnull final Random random)
Method apply.
- Parameters:
@Nonnull final Stringname@Nonnull final Randomrandom
load
public
T
load
(@Nonnull final String name, @Nonnull final Random random)
Method load.
- Parameters:
@Nonnull final Stringname@Nonnull final Randomrandom
loadSinglePrefab
protected
T
loadSinglePrefab
(final int x, final int y, final int z, @Nonnull final Path file, final PrefabRotation rotation, final Random random)
Method loadSinglePrefab.
- Parameters:
final intxfinal intyfinal intz@Nonnull final Pathfilefinal PrefabRotationrotationfinal Randomrandom
loadWeightedPrefab
protected
T
loadWeightedPrefab
(final int x, final int y, final int z, @Nonnull final String name, @Nonnull final List files, final PrefabRotation rotation, @Nonnull final PrefabWeights weights, @Nonnull final Random random)
Method loadWeightedPrefab.
- Parameters:
final intxfinal intyfinal intz@Nonnull final Stringname@Nonnull final Listfilesfinal PrefabRotationrotation@Nonnull final PrefabWeightsweights@Nonnull final Randomrandom
loadRandomPrefab
protected
T
loadRandomPrefab
(final int x, final int y, final int z, @Nonnull final List files, final PrefabRotation rotation, @Nonnull final Random random)
Method loadRandomPrefab.
- Parameters:
final intxfinal intyfinal intz@Nonnull final Listfilesfinal PrefabRotationrotation@Nonnull final Randomrandom
stripSuffix
static
String
stripSuffix
(@Nonnull final String path)
Method stripSuffix.
- Parameters:
@Nonnull final Stringpath
appendSuffix
static
String
appendSuffix
(@Nonnull final String path)
Method appendSuffix.
- Parameters:
@Nonnull final Stringpath
BlockSelectionLoader
public
public
BlockSelectionLoader
(final Path rootPrefabsDir, @Nonnull final Function prefabsLoader)
Method BlockSelectionLoader.
- Parameters:
final PathrootPrefabsDir@Nonnull final FunctionprefabsLoader
accept
public
void
accept
(final T t)
Method accept.
- Parameters:
final Tt