PrefabLoadingState

public class PrefabLoadingState

Class PrefabLoadingState. Provides prefabloadingstate functionality for the Hytale server.

java.lang.Object > PrefabLoadingState

Field Summary

currentPhase

private Phase currentPhase

Field currentPhase.

totalPrefabs

private int totalPrefabs

Field totalPrefabs.

loadedPrefabs

private int loadedPrefabs

Field loadedPrefabs.

pastedPrefabs

private int pastedPrefabs

Field pastedPrefabs.

currentPrefabPath

private Path currentPrefabPath

Field currentPrefabPath.

startTimeNanos

private long startTimeNanos

Field startTimeNanos.

lastUpdateTimeNanos

private long lastUpdateTimeNanos

Field lastUpdateTimeNanos.

lastNotifyTimeNanos

private long lastNotifyTimeNanos

Field lastNotifyTimeNanos.

Method Detail

PrefabLoadingState

public public PrefabLoadingState ()

Method PrefabLoadingState.

setTotalPrefabs

public void setTotalPrefabs (final int totalPrefabs)

Method setTotalPrefabs.

Parameters:
final int totalPrefabs

setPhase

public void setPhase (@Nonnull final Phase phase)

Method setPhase.

Parameters:
@Nonnull final Phase phase

onPrefabLoaded

public void onPrefabLoaded (@Nullable final Path path)

Method onPrefabLoaded.

Parameters:
@Nullable final Path path

onPrefabPasted

public void onPrefabPasted (@Nullable final Path path)

Method onPrefabPasted.

Parameters:
@Nullable final Path path

addError

public void addError (@Nonnull final LoadingError error)

Method addError.

Parameters:
@Nonnull final LoadingError error

LoadingError

public new LoadingError (translationKey)

Method LoadingError.

Parameters:
translationKey translationKey

getCurrentPhase

public Phase getCurrentPhase ()

Method getCurrentPhase.

getTotalPrefabs

public int getTotalPrefabs ()

Method getTotalPrefabs.

getLoadedPrefabs

public int getLoadedPrefabs ()

Method getLoadedPrefabs.

getPastedPrefabs

public int getPastedPrefabs ()

Method getPastedPrefabs.

getCurrentPrefabPath

public Path getCurrentPrefabPath ()

Method getCurrentPrefabPath.

getErrors

public List getErrors ()

Method getErrors.

hasErrors

public boolean hasErrors ()

Method hasErrors.

isShuttingDown

public boolean isShuttingDown ()

Method isShuttingDown.

isShutdownComplete

public boolean isShutdownComplete ()

Method isShutdownComplete.

getProgressPercentage

public float getProgressPercentage ()

Method getProgressPercentage.

switch

public return switch (this.currentPhase.ordinal()

Method switch.

Parameters:
this.currentPhase.ordinal( this.currentPhase.ordinal(

getElapsedTimeMillis

public long getElapsedTimeMillis ()

Method getElapsedTimeMillis.

getLastNotifyTimeNanos

public long getLastNotifyTimeNanos ()

Method getLastNotifyTimeNanos.

setLastNotifyTimeNanos

public void setLastNotifyTimeNanos (final long nanos)

Method setLastNotifyTimeNanos.

Parameters:
final long nanos

getStatusMessage

public Message getStatusMessage ()

Method getStatusMessage.

if

public else if (this.currentPhase == Phase.PASTING_PREFABS && this.totalPrefabs > 0)

Method if.

Parameters:
this.currentPhase == Phase.PASTING_PREFABS && this.totalPrefabs > 0

markComplete

public void markComplete ()

Method markComplete.

Phase

public private Phase (final String translationKey)

Method Phase.

Parameters:
final String translationKey

getTranslationKey

public String getTranslationKey ()

Method getTranslationKey.

toMessage

public Message toMessage ()

Method toMessage.

translationKey

public String translationKey ()

Method translationKey.

details

public String details ()

Method details.