Contents
- Description
- Field Summary
- Constructor Summary
- Method Summary
- Field Details
- Constructor Details
- Method Details
- getAssetStore()
- getAssetMap()
- stringEndsWithPrefabPath(String)
- load(String)
- save(String, PrefabEditorCreationSettings, PlayerRef)
- save(String, PrefabEditorCreationSettings, AssetPack, PlayerRef)
- getEditor()
- getEditorRef()
- getPrefabPaths()
- getBlocksBetweenEachPrefab()
- getPasteLevelGoal()
- loadChildPrefabs()
- shouldLoadEntities()
- getStackingAxis()
- getWorldGenType()
- getBlocksAboveSurface()
- getAlignment()
- getId()
- getPrefabRootDirectory()
- getUnprocessedPrefabPaths()
- getFailureMessage()
- getPasteYLevelGoal()
- isRecursive()
- isLoadChildren()
- isWorldTickingEnabled()
- getRowSplitMode()
- getEnvironment()
- getGrassTint()
Class PrefabEditorCreationSettings
java.lang.Object
com.hypixel.hytale.builtin.buildertools.prefabeditor.PrefabEditorCreationSettings
- All Implemented Interfaces:
JsonAsset<String>, JsonAssetWithMap<String, DefaultAssetMap<String, PrefabEditorCreationSettings>>, PrefabEditorCreationContext
public class PrefabEditorCreationSettings
extends Object
implements PrefabEditorCreationContext, JsonAssetWithMap<String, DefaultAssetMap<String, PrefabEditorCreationSettings>>
Extra information that needs to be passed between various systems for creating
a
PrefabEditSession through the PrefabEditSessionManager. Also gets
stored for the prefab edit UI-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final AssetBuilderCodec<String, PrefabEditorCreationSettings> -
Constructor Summary
ConstructorsConstructorDescriptionPrefabEditorCreationSettings(PrefabRootDirectory prefabRootDirectory, List<String> unprocessedPrefabPaths, int pasteYLevelGoal, int blocksBetweenEachPrefab, WorldGenType worldGenType, int blocksAboveSurface, PrefabStackingAxis stackingAxis, PrefabAlignment alignment, boolean recursive, boolean loadChildren, boolean loadEntities, boolean enableWorldTicking, PrefabRowSplitMode rowSplitMode, String environment, String grassTint) -
Method Summary
Modifier and TypeMethodDescriptionstatic AssetStore<String, PrefabEditorCreationSettings, DefaultAssetMap<String, PrefabEditorCreationSettings>> intintGets the environment ID to use for the prefab editor world.Gets the grass tint color as a hex string (e.g. "#5B9E28").getId()intintDetermines how prefabs are split into rows when loading multiple prefabs.Gets the unprocessed prefab paths (the original input paths before resolving).booleanbooleanbooleanWhether world ticking (block updates, random ticks, etc.) is enabled in the prefab editor world.Load an existing PrefabCreationSettings asset from the PrefabCreationSettings asset directorybooleanstatic CompletableFuture<Void> save(String name, PrefabEditorCreationSettings settings, AssetPack pack, PlayerRef playerRef) static CompletableFuture<Void> save(String name, PrefabEditorCreationSettings settings, PlayerRef playerRef) Save the provided PrefabEditorCreationSettings to the filename specified inside the PrefabEditorCreationSettings assets directorybooleanstatic booleanstringEndsWithPrefabPath(String input)
-
Field Details
-
CODEC
-
-
Constructor Details
-
PrefabEditorCreationSettings
public PrefabEditorCreationSettings(PrefabRootDirectory prefabRootDirectory, List<String> unprocessedPrefabPaths, int pasteYLevelGoal, int blocksBetweenEachPrefab, WorldGenType worldGenType, int blocksAboveSurface, PrefabStackingAxis stackingAxis, PrefabAlignment alignment, boolean recursive, boolean loadChildren, boolean loadEntities, boolean enableWorldTicking, PrefabRowSplitMode rowSplitMode, String environment, String grassTint)
-
-
Method Details
-
getAssetStore
public static AssetStore<String, PrefabEditorCreationSettings, DefaultAssetMap<String, PrefabEditorCreationSettings>> getAssetStore() -
getAssetMap
-
stringEndsWithPrefabPath
-
load
Load an existing PrefabCreationSettings asset from the PrefabCreationSettings asset directory- Parameters:
name- The name of the file to load- Returns:
- a future that ends when the PrefabEditorCreationSettings is done loading
-
save
@Nonnull public static CompletableFuture<Void> save(@Nonnull String name, PrefabEditorCreationSettings settings, @Nonnull PlayerRef playerRef) Save the provided PrefabEditorCreationSettings to the filename specified inside the PrefabEditorCreationSettings assets directory- Parameters:
name- The name of the file to save tosettings- The data to saveplayerRef- The player who is saving the file- Returns:
- a completable future that completes after the file is saved
-
save
@Nonnull public static CompletableFuture<Void> save(@Nonnull String name, PrefabEditorCreationSettings settings, @Nonnull AssetPack pack, @Nonnull PlayerRef playerRef) -
getEditor
- Specified by:
getEditorin interfacePrefabEditorCreationContext
-
getEditorRef
- Specified by:
getEditorRefin interfacePrefabEditorCreationContext
-
getPrefabPaths
- Specified by:
getPrefabPathsin interfacePrefabEditorCreationContext
-
getBlocksBetweenEachPrefab
public int getBlocksBetweenEachPrefab()- Specified by:
getBlocksBetweenEachPrefabin interfacePrefabEditorCreationContext
-
getPasteLevelGoal
public int getPasteLevelGoal()- Specified by:
getPasteLevelGoalin interfacePrefabEditorCreationContext
-
loadChildPrefabs
public boolean loadChildPrefabs()- Specified by:
loadChildPrefabsin interfacePrefabEditorCreationContext
-
shouldLoadEntities
public boolean shouldLoadEntities()- Specified by:
shouldLoadEntitiesin interfacePrefabEditorCreationContext
-
getStackingAxis
- Specified by:
getStackingAxisin interfacePrefabEditorCreationContext
-
getWorldGenType
- Specified by:
getWorldGenTypein interfacePrefabEditorCreationContext
-
getBlocksAboveSurface
public int getBlocksAboveSurface()- Specified by:
getBlocksAboveSurfacein interfacePrefabEditorCreationContext
-
getAlignment
- Specified by:
getAlignmentin interfacePrefabEditorCreationContext
-
getId
-
getPrefabRootDirectory
- Specified by:
getPrefabRootDirectoryin interfacePrefabEditorCreationContext
-
getUnprocessedPrefabPaths
Description copied from interface:PrefabEditorCreationContextGets the unprocessed prefab paths (the original input paths before resolving). Used for determining row splits when using BY_SPECIFIED_FOLDER mode.- Specified by:
getUnprocessedPrefabPathsin interfacePrefabEditorCreationContext
-
getFailureMessage
- Returns:
- the reason the last processing attempt failed, or null if it did not fail.
-
getPasteYLevelGoal
public int getPasteYLevelGoal() -
isRecursive
public boolean isRecursive() -
isLoadChildren
public boolean isLoadChildren() -
isWorldTickingEnabled
public boolean isWorldTickingEnabled()Description copied from interface:PrefabEditorCreationContextWhether world ticking (block updates, random ticks, etc.) is enabled in the prefab editor world. Defaults to true to maintain normal game behavior for testing.- Specified by:
isWorldTickingEnabledin interfacePrefabEditorCreationContext
-
getRowSplitMode
Description copied from interface:PrefabEditorCreationContextDetermines how prefabs are split into rows when loading multiple prefabs. Defaults to BY_ALL_SUBFOLDERS for automatic organization by directory structure.- Specified by:
getRowSplitModein interfacePrefabEditorCreationContext
-
getEnvironment
Description copied from interface:PrefabEditorCreationContextGets the environment ID to use for the prefab editor world.- Specified by:
getEnvironmentin interfacePrefabEditorCreationContext
-
getGrassTint
Description copied from interface:PrefabEditorCreationContextGets the grass tint color as a hex string (e.g. "#5B9E28").- Specified by:
getGrassTintin interfacePrefabEditorCreationContext
-