public class EntitySpawnPage extends InteractiveCustomUIPage
Class EntitySpawnPage. Provides entityspawnpage functionality for the Hytale server.
java.lang.Object > InteractiveCustomUIPage > EntitySpawnPage
Field Summary
activeTab
Field activeTab.
searchQuery
Field searchQuery.
npcRoles
Field npcRoles.
selectedNpcRole
Field selectedNpcRole.
modelIds
Field modelIds.
selectedModelId
Field selectedModelId.
selectedItemId
Field selectedItemId.
modelPreview
Field modelPreview.
position
Field position.
rotation
Field rotation.
currentRotationOffset
Field currentRotationOffset.
currentScale
Field currentScale.
lastPreviewScale
Field lastPreviewScale.
lastScaleUpdateTime
Field lastScaleUpdateTime.
commandBuilder
Field commandBuilder.
eventBuilder
Field eventBuilder.
type
Field type.
commandBuilder2
Field commandBuilder2.
eventBuilder2
Field eventBuilder2.
transform
Field transform.
headRotation
Field headRotation.
now
Field now.
modelAsset
Field modelAsset.
commandBuilder3
Field commandBuilder3.
item
Field item.
model
Field model.
commandBuilder4
Field commandBuilder4.
spawnRotation
Field spawnRotation.
holder
Field holder.
roleTemplateNames
Field roleTemplateNames.
map
Field map.
fuzzyDistance
Field fuzzyDistance.
sorted
Field sorted.
obj
Field obj.
id
Field id.
selector
Field selector.
itemAndBlockModelPaths
Field itemAndBlockModelPaths.
allModels
Field allModels.
modelPath
Field modelPath.
modelId
Field modelId.
itemStack
Field itemStack.
holder2
Field holder2.
itemStack2
Field itemStack2.
blockType
Field blockType.
transformComponent
Field transformComponent.
headRotationComponent
Field headRotationComponent.
playerPosition
Field playerPosition.
direction
Field direction.
lookTarget
Field lookTarget.
aheadPosition
Field aheadPosition.
world
Field world.
groundTarget
Field groundTarget.
relativePos
Field relativePos.
previewRotation
Field previewRotation.
existingScale
Field existingScale.
hasBlock
Field hasBlock.
npcPlugin
Field npcPlugin.
roleIndex
Field roleIndex.
roleBuilderInfo
Field roleBuilderInfo.
roleBuilder
Field roleBuilder.
spawnable
Field spawnable.
spawningContext
Field spawningContext.
npcRole
Field npcRole.
itemId
Field itemId.
itemStackId
Field itemStackId.
tab
Field tab.
count
Field count.
rotationOffset
Field rotationOffset.
scale
Field scale.
Method Detail
build
void
build
(@Nonnull final Ref ref, @Nonnull final UICommandBuilder commandBuilder, @Nonnull final UIEventBuilder eventBuilder, @Nonnull final Store store)
Method build.
- Parameters:
@Nonnull final Refref@Nonnull final UICommandBuildercommandBuilder@Nonnull final UIEventBuildereventBuilder@Nonnull final Storestore
EventData
new
EventData
()
Method EventData.
handleDataEvent
void
handleDataEvent
(@Nonnull final Ref ref, @Nonnull final Store store, @Nonnull final EntitySpawnPageEventData data)
Method handleDataEvent.
- Parameters:
@Nonnull final Refref@Nonnull final Storestore@Nonnull final EntitySpawnPageEventDatadata
if
else
if
(item.hasBlockType()
Method if.
- Parameters:
item.hasBlockType(item.hasBlockType(
handleSelect
void
handleSelect
(@Nonnull final Ref ref, @Nonnull final Store store, @Nonnull final EntitySpawnPageEventData data)
Method handleSelect.
- Parameters:
@Nonnull final Refref@Nonnull final Storestore@Nonnull final EntitySpawnPageEventDatadata
handleSetItemMaterial
void
handleSetItemMaterial
(@Nonnull final Ref ref, @Nonnull final Store store, @Nonnull final EntitySpawnPageEventData data)
Method handleSetItemMaterial.
- Parameters:
@Nonnull final Refref@Nonnull final Storestore@Nonnull final EntitySpawnPageEventDatadata
clearSelectedItem
Method clearSelectedItem.
- Parameters:
@Nonnull final Refref@Nonnull final Storestore
ItemGridSlot
new
ItemGridSlot
()
Method ItemGridSlot.
handleSpawn
void
handleSpawn
(@Nonnull final Ref ref, @Nonnull final Store store, @Nonnull final EntitySpawnPageEventData data)
Method handleSpawn.
- Parameters:
@Nonnull final Refref@Nonnull final Storestore@Nonnull final EntitySpawnPageEventDatadata
spawnNPC
Method spawnNPC.
- Parameters:
@Nonnull final Refref@Nonnull final Storestorefinal intcount
spawnModel
Method spawnModel.
- Parameters:
@Nonnull final Refref@Nonnull final Storestorefinal intcount
NetworkId
new
NetworkId
(store.getExternalData()
Method NetworkId.
- Parameters:
store.getExternalData(store.getExternalData(
TransformComponent
new
TransformComponent
(this.position, spawnRotation)
Method TransformComponent.
- Parameters:
this.positionthis.positionspawnRotationspawnRotation
ModelComponent
new
ModelComponent
(model)
Method ModelComponent.
- Parameters:
modelmodel
PersistentModel
new
PersistentModel
(new Model.ModelReference(this.selectedModelId, this.currentScale, null, true)
Method PersistentModel.
- Parameters:
newModel.ModelReference(this.selectedModelIdthis.currentScalethis.currentScalenullnulltruetrue
HeadRotation
new
HeadRotation
(spawnRotation)
Method HeadRotation.
- Parameters:
spawnRotationspawnRotation
updateTabVisibility
Method updateTabVisibility.
- Parameters:
@Nonnull final UICommandBuildercommandBuilder
buildList
void
buildList
(@Nonnull final Ref ref, @Nonnull final Store store, @Nonnull final UICommandBuilder commandBuilder, @Nonnull final UIEventBuilder eventBuilder)
Method buildList.
- Parameters:
@Nonnull final Refref@Nonnull final Storestore@Nonnull final UICommandBuildercommandBuilder@Nonnull final UIEventBuildereventBuilder
buildNPCList
void
buildNPCList
(@Nonnull final Ref ref, @Nonnull final Store store, @Nonnull final UICommandBuilder commandBuilder, @Nonnull final UIEventBuilder eventBuilder)
Method buildNPCList.
- Parameters:
@Nonnull final Refref@Nonnull final Storestore@Nonnull final UICommandBuildercommandBuilder@Nonnull final UIEventBuildereventBuilder
buildModelList
void
buildModelList
(@Nonnull final Ref ref, @Nonnull final Store store, @Nonnull final UICommandBuilder commandBuilder, @Nonnull final UIEventBuilder eventBuilder)
Method buildModelList.
- Parameters:
@Nonnull final Refref@Nonnull final Storestore@Nonnull final UICommandBuildercommandBuilder@Nonnull final UIEventBuildereventBuilder
buildItemsContent
void
buildItemsContent
(@Nonnull final Ref ref, @Nonnull final Store store, @Nonnull final UICommandBuilder commandBuilder)
Method buildItemsContent.
- Parameters:
@Nonnull final Refref@Nonnull final Storestore@Nonnull final UICommandBuildercommandBuilder
selectItem
void
selectItem
(@Nonnull final Ref ref, @Nonnull final Store store, @Nonnull final String itemId, @Nonnull final UICommandBuilder commandBuilder)
Method selectItem.
- Parameters:
@Nonnull final Refref@Nonnull final Storestore@Nonnull final StringitemId@Nonnull final UICommandBuildercommandBuilder
spawnItem
Method spawnItem.
- Parameters:
@Nonnull final Refref@Nonnull final Storestorefinal intcount
ItemComponent
new
ItemComponent
(itemStack)
Method ItemComponent.
- Parameters:
itemStackitemStack
BlockEntity
new
BlockEntity
(this.selectedItemId)
Method BlockEntity.
- Parameters:
this.selectedItemIdthis.selectedItemId
EntityScaleComponent
new
EntityScaleComponent
(this.currentScale * 2.0f)
Method EntityScaleComponent.
- Parameters:
this.currentScale *2.0f
selectNPCRole
void
selectNPCRole
(@Nonnull final Ref ref, @Nonnull final Store store, @Nonnull final String npcRole, @Nonnull final UICommandBuilder commandBuilder)
Method selectNPCRole.
- Parameters:
@Nonnull final Refref@Nonnull final Storestore@Nonnull final StringnpcRole@Nonnull final UICommandBuildercommandBuilder
selectModel
void
selectModel
(@Nonnull final Ref ref, @Nonnull final Store store, @Nonnull final String modelId, @Nonnull final UICommandBuilder commandBuilder)
Method selectModel.
- Parameters:
@Nonnull final Refref@Nonnull final Storestore@Nonnull final StringmodelId@Nonnull final UICommandBuildercommandBuilder
createOrUpdatePreview
void
createOrUpdatePreview
(@Nonnull final Ref ref, @Nonnull final Store store, @Nonnull final UICommandBuilder commandBuilder, @Nullable final Model model)
Method createOrUpdatePreview.
- Parameters:
@Nonnull final Refref@Nonnull final Storestore@Nonnull final UICommandBuildercommandBuilder@Nullable final Modelmodel
updatePreviewScale
Method updatePreviewScale.
- Parameters:
@Nonnull final Refref@Nonnull final Storestore
createOrUpdateBlockPreview
void
createOrUpdateBlockPreview
(@Nonnull final Ref ref, @Nonnull final Store store, @Nonnull final String blockTypeKey)
Method createOrUpdateBlockPreview.
- Parameters:
@Nonnull final Refref@Nonnull final Storestore@Nonnull final StringblockTypeKey
createOrUpdateItemPreview
void
createOrUpdateItemPreview
(@Nonnull final Ref ref, @Nonnull final Store store, @Nonnull final String itemId)
Method createOrUpdateItemPreview.
- Parameters:
@Nonnull final Refref@Nonnull final Storestore@Nonnull final StringitemId
GeneralCommandException
new
GeneralCommandException
(Message.translation("server.commands.npc.spawn.validation_failed")
Method GeneralCommandException.
- Parameters:
Message.translation("server.commands.npc.spawn.validation_failed"Message.translation("server.commands.npc.spawn.validation_failed"