public class PrefabEditSessionManager
Class PrefabEditSessionManager. Provides prefabeditsessionmanager functionality for the Hytale server.
java.lang.Object > PrefabEditSessionManager
Field Summary
eventRegistry
Field eventRegistry.
playerRef
Field playerRef.
store
Field store.
world
Field world.
uuidComponent
Field uuidComponent.
playerUUID
Field playerUUID.
movementStatesComponent
Field movementStatesComponent.
movementStates
Field movementStates.
playerComponent
Field playerComponent.
playerRefComponent
Field playerRefComponent.
inventory
Field inventory.
hotbar
Field hotbar.
hotbarSize
Field hotbarSize.
itemStack
Field itemStack.
itemStack2
Field itemStack2.
playerHolder
Field playerHolder.
prefabEditorCreationContext
Field prefabEditorCreationContext.
playerUuid
Field playerUuid.
loadingState
Field loadingState.
phase
Field phase.
now
Field now.
sourceWorld
Field sourceWorld.
config
Field config.
enableTicking
Field enableTicking.
worldName
Field worldName.
transformComponent
Field transformComponent.
transform
Field transform.
prefabEditSession
Field prefabEditSession.
spawnPoint
Field spawnPoint.
spawnProvider
Field spawnProvider.
o
Field o.
teleport
Field teleport.
teleportComponent
Field teleportComponent.
environment
Field environment.
forecast
Field forecast.
bestWeatherId
Field bestWeatherId.
highestWeight
Field highestWeight.
parsed
Field parsed.
yLevelForFlatWorldExclusive
Field yLevelForFlatWorldExclusive.
topLayer
Field topLayer.
airLayer
Field airLayer.
bottomLayer
Field bottomLayer.
pastePosition
Field pastePosition.
anchorPosition
Field anchorPosition.
worldTimeResource
Field worldTimeResource.
initializationFutures
Field initializationFutures.
prefabPath
Field prefabPath.
prefabLoadingFuture
Field prefabLoadingFuture.
pathForCallback
Field pathForCallback.
prefabAccessors
Field prefabAccessors.
prefabAccessor
Field prefabAccessor.
prefabHeight
Field prefabHeight.
yLevelToPastePrefabsAt
Field yLevelToPastePrefabsAt.
yLevelToPastePrefabsAt2
Field yLevelToPastePrefabsAt2.
prefabAccessors2
Field prefabAccessors2.
rowGroupIndices
Field rowGroupIndices.
rowDepths
Field rowDepths.
prefabAccessor2
Field prefabAccessor2.
rowGroup
Field rowGroup.
rowStarts
Field rowStarts.
prefabAccessor3
Field prefabAccessor3.
prefabPath2
Field prefabPath2.
rowGroup2
Field rowGroup2.
rowOffset
Field rowOffset.
prefabXSize
Field prefabXSize.
prefabZSize
Field prefabZSize.
xPos
Field xPos.
zPos
Field zPos.
xPos2
Field xPos2.
zPos2
Field zPos2.
minPoint
Field minPoint.
maxPoint
Field maxPoint.
rowGroups
Field rowGroups.
rowSplitMode
Field rowSplitMode.
prefabPaths
Field prefabPaths.
unprocessedPaths
Field unprocessedPaths.
rootPath
Field rootPath.
resolvedPath
Field resolvedPath.
parentDir
Field parentDir.
group
Field group.
finalReturnWorld
Field finalReturnWorld.
finalReturnLocation
Field finalReturnLocation.
worldToRemove
Field worldToRemove.
prefabsBeingEditedInEditSession
Field prefabsBeingEditedInEditSession.
session
Field session.
prefabsInSession
Field prefabsInSession.
Method Detail
PrefabEditSessionManager
Method PrefabEditSessionManager.
- Parameters:
@Nonnull final JavaPluginplugin
SavedMovementStates
new
SavedMovementStates
(true)
Method SavedMovementStates.
- Parameters:
truetrue
givePrefabSelectorTool
void
givePrefabSelectorTool
(@Nonnull final Player playerComponent, @Nonnull final PlayerRef playerRef)
Method givePrefabSelectorTool.
- Parameters:
@Nonnull final PlayerplayerComponent@Nonnull final PlayerRefplayerRef
SetActiveSlot
new
SetActiveSlot
(-1, (byte)
Method SetActiveSlot.
- Parameters:
-1-1(byte(byte
ItemStack
new
ItemStack
("EditorTool_PrefabEditing_SelectPrefab")
Method ItemStack.
- Parameters:
"EditorTool_PrefabEditing_SelectPrefab""EditorTool_PrefabEditing_SelectPrefab"
onPlayerAddedToWorld
Method onPlayerAddedToWorld.
- Parameters:
@Nonnull final AddPlayerToWorldEventevent
updatePathOfLoadedPrefab
void
updatePathOfLoadedPrefab
(@Nonnull final Path oldPath, @Nonnull final Path newPath)
Method updatePathOfLoadedPrefab.
- Parameters:
@Nonnull final PatholdPath@Nonnull final PathnewPath
isEditingAPrefab
boolean
isEditingAPrefab
(@Nonnull final UUID playerUUID)
Method isEditingAPrefab.
- Parameters:
@Nonnull final UUIDplayerUUID
getPrefabEditSession
Method getPrefabEditSession.
- Parameters:
@Nonnull final UUIDplayerUUID
getActiveEditSessions
PrefabEditSession>
getActiveEditSessions
()
Method getActiveEditSessions.
populateActiveEditSession
void
populateActiveEditSession
(@Nonnull final UUID playerUuid, @Nonnull final PrefabEditSession editSession)
Method populateActiveEditSession.
- Parameters:
@Nonnull final UUIDplayerUuid@Nonnull final PrefabEditSessioneditSession
populatePrefabsBeingEdited
void
populatePrefabsBeingEdited
(@Nonnull final Path prefabPath)
Method populatePrefabsBeingEdited.
- Parameters:
@Nonnull final PathprefabPath
scheduleAnchorEntityRecreation
Method scheduleAnchorEntityRecreation.
- Parameters:
@Nonnull final PrefabEditSessioneditSession
hasInProgressLoading
boolean
hasInProgressLoading
(@Nonnull final UUID playerUuid)
Method hasInProgressLoading.
- Parameters:
@Nonnull final UUIDplayerUuid
cancelLoading
void
cancelLoading
(@Nonnull final UUID playerUuid)
Method cancelLoading.
- Parameters:
@Nonnull final UUIDplayerUuid
isLoadingCancelled
boolean
isLoadingCancelled
(@Nonnull final UUID playerUuid)
Method isLoadingCancelled.
- Parameters:
@Nonnull final UUIDplayerUuid
clearLoadingState
void
clearLoadingState
(@Nonnull final UUID playerUuid)
Method clearLoadingState.
- Parameters:
@Nonnull final UUIDplayerUuid
createEditSessionForNewPrefab
CompletableFuture
createEditSessionForNewPrefab
(@Nonnull final Ref ref, @Nonnull final Player editor, @Nonnull final PrefabEditorCreationSettings settings, @Nonnull final ComponentAccessor componentAccessor)
Method createEditSessionForNewPrefab.
- Parameters:
@Nonnull final Refref@Nonnull final Playereditor@Nonnull final PrefabEditorCreationSettingssettings@Nonnull final ComponentAccessorcomponentAccessor
loadPrefabAndCreateEditSession
CompletableFuture
loadPrefabAndCreateEditSession
(@Nonnull final Ref ref, @Nonnull final Player editor, @Nonnull final PrefabEditorCreationSettings settings, @Nonnull final ComponentAccessor componentAccessor)
Method loadPrefabAndCreateEditSession.
- Parameters:
@Nonnull final Refref@Nonnull final Playereditor@Nonnull final PrefabEditorCreationSettingssettings@Nonnull final ComponentAccessorcomponentAccessor
notifyProgress
void
notifyProgress
(@Nullable final Consumer progressCallback, @Nonnull final PrefabLoadingState loadingState)
Method notifyProgress.
- Parameters:
@Nullable final ConsumerprogressCallback@Nonnull final PrefabLoadingStateloadingState
createEditSession
CompletableFuture
createEditSession
(@Nonnull final Ref ref, @Nonnull final PrefabEditorCreationContext context, final boolean createNewPrefab, @Nonnull final ComponentAccessor componentAccessor)
Method createEditSession.
- Parameters:
@Nonnull final Refref@Nonnull final PrefabEditorCreationContextcontextfinal booleancreateNewPrefab@Nonnull final ComponentAccessorcomponentAccessor
PrefabEditSession
new
PrefabEditSession
(worldName, playerUUID, sourceWorld.getWorldConfig()
Method PrefabEditSession.
- Parameters:
worldNameworldNameplayerUUIDplayerUUIDsourceWorld.getWorldConfig(sourceWorld.getWorldConfig(
GlobalSpawnProvider
new
GlobalSpawnProvider
(new Transform(spawnPoint)
Method GlobalSpawnProvider.
- Parameters:
newTransform(spawnPoint
Teleport
new
Teleport
(targetWorld, new Transform(spawnPoint)
Method Teleport.
- Parameters:
targetWorldtargetWorldnewTransform(spawnPoint
getWorldCreatingFuture
CompletableFuture
getWorldCreatingFuture
(@Nonnull final PrefabEditorCreationContext context, @Nonnull final WorldConfig config)
Method getWorldCreatingFuture.
- Parameters:
@Nonnull final PrefabEditorCreationContextcontext@Nonnull final WorldConfigconfig
getWeatherFromEnvironment
String
getWeatherFromEnvironment
(@Nullable final String environmentId)
Method getWeatherFromEnvironment.
- Parameters:
@Nullable final StringenvironmentId
applyWorldGenWorldConfig
void
applyWorldGenWorldConfig
(@Nonnull final PrefabEditorCreationContext context, final int yLevelToPastePrefabsAt, @Nonnull final WorldConfig worldConfig)
Method applyWorldGenWorldConfig.
- Parameters:
@Nonnull final PrefabEditorCreationContextcontextfinal intyLevelToPastePrefabsAt@Nonnull final WorldConfigworldConfig
FlatWorldGenProvider
new
FlatWorldGenProvider
(tint, new FlatWorldGenProvider.Layer[] { airLayer, topLayer, bottomLayer })
Method FlatWorldGenProvider.
- Parameters:
tinttintnew FlatWorldGenProvider.Layer[] {airLayertopLayertopLayerbottomLayer}
VoidWorldGenProvider
new
VoidWorldGenProvider
(tint, environment)
Method VoidWorldGenProvider.
- Parameters:
tinttintenvironmentenvironment
getPrefabCreatingCompletableFuture
CompletableFuture
getPrefabCreatingCompletableFuture
(@Nonnull final PrefabEditorCreationContext context, @Nonnull final PrefabEditSession editSession, @Nonnull final WorldConfig worldConfig)
Method getPrefabCreatingCompletableFuture.
- Parameters:
@Nonnull final PrefabEditorCreationContextcontext@Nonnull final PrefabEditSessioneditSession@Nonnull final WorldConfigworldConfig
Vector3i
new
Vector3i
(0, context.getPasteLevelGoal()
Method Vector3i.
- Parameters:
00context.getPasteLevelGoal(context.getPasteLevelGoal(
getPrefabLoadingCompletableFuture
CompletableFuture
getPrefabLoadingCompletableFuture
(@Nonnull final PrefabEditorCreationContext context, @Nonnull final PrefabEditSession editSession, @Nonnull final WorldConfig worldConfig, @Nullable final PrefabLoadingState loadingState, @Nullable final Consumer progressCallback, @Nonnull final UUID playerUuid)
Method getPrefabLoadingCompletableFuture.
- Parameters:
@Nonnull final PrefabEditorCreationContextcontext@Nonnull final PrefabEditSessioneditSession@Nonnull final WorldConfigworldConfig@Nullable final PrefabLoadingStateloadingState@Nullable final ConsumerprogressCallback@Nonnull final UUIDplayerUuid
Tri
new
Tri
(prefabAccessors, yLevelToPastePrefabsAt, this.getWorldCreatingFuture(context, worldConfig)
Method Tri.
- Parameters:
prefabAccessorsprefabAccessorsyLevelToPastePrefabsAtyLevelToPastePrefabsAtthis.getWorldCreatingFuture(contextthis.getWorldCreatingFuture(contextworldConfigworldConfig
FastRandom
new
FastRandom
()
Method FastRandom.
calculateRowGroups
int[]
calculateRowGroups
(@Nonnull final PrefabEditorCreationContext context, final int prefabCount)
Method calculateRowGroups.
- Parameters:
@Nonnull final PrefabEditorCreationContextcontextfinal intprefabCount
if
else
if
(!prefabPath.equals(resolvedPath)
Method if.
- Parameters:
!prefabPath.equals(resolvedPath!prefabPath.equals(resolvedPath
getAmountOfBlocksBelowPrefab
int
getAmountOfBlocksBelowPrefab
(final int prefabHeight, final int desiredYLevel)
Method getAmountOfBlocksBelowPrefab.
- Parameters:
final intprefabHeightfinal intdesiredYLevel
exitEditSession
CompletableFuture
exitEditSession
(@Nonnull final Ref ref, @Nonnull final World world, @Nonnull final PlayerRef playerRef, @Nonnull final ComponentAccessor componentAccessor)
Method exitEditSession.
- Parameters:
@Nonnull final Refref@Nonnull final Worldworld@Nonnull final PlayerRefplayerRef@Nonnull final ComponentAccessorcomponentAccessor
cleanupCancelledSession
CompletableFuture
cleanupCancelledSession
(@Nonnull final UUID playerUuid, @Nonnull final String worldName, @Nullable final Consumer progressCallback)
Method cleanupCancelledSession.
- Parameters:
@Nonnull final UUIDplayerUuid@Nonnull final StringworldName@Nullable final ConsumerprogressCallback
getPrefabBuffer
CompletableFuture
getPrefabBuffer
(@Nonnull final CommandSender sender, @Nonnull final Path path)
Method getPrefabBuffer.
- Parameters:
@Nonnull final CommandSendersender@Nonnull final Pathpath
Color
new
Color
((byte)
Method Color.
- Parameters:
(byte(byte