RecursivePrefabLoader

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 Path rootPrefabsDir
final Function prefabsLoader

apply

public T apply (@Nonnull final String name, @Nonnull final Random random)

Method apply.

Parameters:
@Nonnull final String name
@Nonnull final Random random

load

public T load (@Nonnull final String name, @Nonnull final Random random)

Method load.

Parameters:
@Nonnull final String name
@Nonnull final Random random

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 int x
final int y
final int z
@Nonnull final Path file
final PrefabRotation rotation
final Random random

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 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

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 int x
final int y
final int z
@Nonnull final List files
final PrefabRotation rotation
@Nonnull final Random random

stripSuffix

static String stripSuffix (@Nonnull final String path)

Method stripSuffix.

Parameters:
@Nonnull final String path

appendSuffix

static String appendSuffix (@Nonnull final String path)

Method appendSuffix.

Parameters:
@Nonnull final String path

BlockSelectionLoader

public public BlockSelectionLoader (final Path rootPrefabsDir, @Nonnull final Function prefabsLoader)

Method BlockSelectionLoader.

Parameters:
final Path rootPrefabsDir
@Nonnull final Function prefabsLoader

getRotation

static PrefabRotation getRotation (@Nonnull final BlockType blockType)

Method getRotation.

Parameters:
@Nonnull final BlockType blockType

accept

public void accept (final T t)

Method accept.

Parameters:
final T t