EntitySpawnPage

public class EntitySpawnPage extends InteractiveCustomUIPage

Class EntitySpawnPage. Provides entityspawnpage functionality for the Hytale server.

java.lang.Object > InteractiveCustomUIPage > EntitySpawnPage

Field Summary

activeTab

private String activeTab

Field activeTab.

searchQuery

private String searchQuery

Field searchQuery.

npcRoles

private List npcRoles

Field npcRoles.

selectedNpcRole

private String selectedNpcRole

Field selectedNpcRole.

modelIds

private List modelIds

Field modelIds.

selectedModelId

private String selectedModelId

Field selectedModelId.

selectedItemId

private String selectedItemId

Field selectedItemId.

modelPreview

private Ref modelPreview

Field modelPreview.

position

private Vector3d position

Field position.

rotation

private Vector3f rotation

Field rotation.

currentRotationOffset

private float currentRotationOffset

Field currentRotationOffset.

currentScale

private float currentScale

Field currentScale.

lastPreviewScale

private float lastPreviewScale

Field lastPreviewScale.

lastScaleUpdateTime

private long lastScaleUpdateTime

Field lastScaleUpdateTime.

commandBuilder

final UICommandBuilder commandBuilder

Field commandBuilder.

eventBuilder

final UIEventBuilder eventBuilder

Field eventBuilder.

type

final String type

Field type.

commandBuilder2

final UICommandBuilder commandBuilder2

Field commandBuilder2.

eventBuilder2

final UIEventBuilder eventBuilder2

Field eventBuilder2.

transform

final TransformComponent transform

Field transform.

headRotation

final HeadRotation headRotation

Field headRotation.

now

final long now

Field now.

modelAsset

final ModelAsset modelAsset

Field modelAsset.

commandBuilder3

final UICommandBuilder commandBuilder3

Field commandBuilder3.

item

final Item item

Field item.

model

final Model model

Field model.

commandBuilder4

final UICommandBuilder commandBuilder4

Field commandBuilder4.

spawnRotation

final Vector3f spawnRotation

Field spawnRotation.

holder

final Holder holder

Field holder.

roleTemplateNames

final List roleTemplateNames

Field roleTemplateNames.

map

final Object2IntMap map

Field map.

fuzzyDistance

final int fuzzyDistance

Field fuzzyDistance.

sorted

final Stream sorted

Field sorted.

obj

final Object2IntMap obj

Field obj.

id

final String id

Field id.

selector

final String selector

Field selector.

itemAndBlockModelPaths

final Set itemAndBlockModelPaths

Field itemAndBlockModelPaths.

allModels

final Set allModels

Field allModels.

modelPath

final String modelPath

Field modelPath.

modelId

final String modelId

Field modelId.

itemStack

final ItemStack itemStack

Field itemStack.

holder2

final Holder holder2

Field holder2.

itemStack2

final ItemStack itemStack2

Field itemStack2.

blockType

final BlockType blockType

Field blockType.

transformComponent

final TransformComponent transformComponent

Field transformComponent.

headRotationComponent

final HeadRotation headRotationComponent

Field headRotationComponent.

playerPosition

final Vector3d playerPosition

Field playerPosition.

direction

final Vector3d direction

Field direction.

lookTarget

final Vector3d lookTarget

Field lookTarget.

aheadPosition

final Vector3d aheadPosition

Field aheadPosition.

world

final World world

Field world.

groundTarget

final Vector3i groundTarget

Field groundTarget.

relativePos

final Vector3d relativePos

Field relativePos.

previewRotation

final Vector3f previewRotation

Field previewRotation.

existingScale

final EntityScaleComponent existingScale

Field existingScale.

hasBlock

final boolean hasBlock

Field hasBlock.

npcPlugin

final NPCPlugin npcPlugin

Field npcPlugin.

roleIndex

final int roleIndex

Field roleIndex.

roleBuilderInfo

final BuilderInfo roleBuilderInfo

Field roleBuilderInfo.

roleBuilder

final Builder roleBuilder

Field roleBuilder.

spawnable

final ISpawnableWithModel spawnable

Field spawnable.

spawningContext

final SpawningContext spawningContext

Field spawningContext.

npcRole

private String npcRole

Field npcRole.

itemId

private String itemId

Field itemId.

itemStackId

private String itemStackId

Field itemStackId.

tab

private String tab

Field tab.

count

private int count

Field count.

rotationOffset

private float rotationOffset

Field rotationOffset.

scale

private Float scale

Field scale.

Method Detail

EntitySpawnPage

public public EntitySpawnPage (@Nonnull final PlayerRef playerRef)

Method EntitySpawnPage.

Parameters:
@Nonnull final PlayerRef playerRef

build

public void build (@Nonnull final Ref ref, @Nonnull final UICommandBuilder commandBuilder, @Nonnull final UIEventBuilder eventBuilder, @Nonnull final Store store)

Method build.

Parameters:
@Nonnull final Ref ref
@Nonnull final UICommandBuilder commandBuilder
@Nonnull final UIEventBuilder eventBuilder
@Nonnull final Store store

EventData

public new EventData ()

Method EventData.

handleDataEvent

public void handleDataEvent (@Nonnull final Ref ref, @Nonnull final Store store, @Nonnull final EntitySpawnPageEventData data)

Method handleDataEvent.

Parameters:
@Nonnull final Ref ref
@Nonnull final Store store
@Nonnull final EntitySpawnPageEventData data

if

public else if (item.hasBlockType()

Method if.

Parameters:
item.hasBlockType( item.hasBlockType(

handleSelect

private void handleSelect (@Nonnull final Ref ref, @Nonnull final Store store, @Nonnull final EntitySpawnPageEventData data)

Method handleSelect.

Parameters:
@Nonnull final Ref ref
@Nonnull final Store store
@Nonnull final EntitySpawnPageEventData data

handleSetItemMaterial

private void handleSetItemMaterial (@Nonnull final Ref ref, @Nonnull final Store store, @Nonnull final EntitySpawnPageEventData data)

Method handleSetItemMaterial.

Parameters:
@Nonnull final Ref ref
@Nonnull final Store store
@Nonnull final EntitySpawnPageEventData data

clearSelectedItem

private void clearSelectedItem (@Nonnull final Ref ref, @Nonnull final Store store)

Method clearSelectedItem.

Parameters:
@Nonnull final Ref ref
@Nonnull final Store store

ItemGridSlot

public new ItemGridSlot ()

Method ItemGridSlot.

handleSpawn

private void handleSpawn (@Nonnull final Ref ref, @Nonnull final Store store, @Nonnull final EntitySpawnPageEventData data)

Method handleSpawn.

Parameters:
@Nonnull final Ref ref
@Nonnull final Store store
@Nonnull final EntitySpawnPageEventData data

spawnNPC

private void spawnNPC (@Nonnull final Ref ref, @Nonnull final Store store, final int count)

Method spawnNPC.

Parameters:
@Nonnull final Ref ref
@Nonnull final Store store
final int count

spawnModel

private void spawnModel (@Nonnull final Ref ref, @Nonnull final Store store, final int count)

Method spawnModel.

Parameters:
@Nonnull final Ref ref
@Nonnull final Store store
final int count

NetworkId

public new NetworkId (store.getExternalData()

Method NetworkId.

Parameters:
store.getExternalData( store.getExternalData(

TransformComponent

public new TransformComponent (this.position, spawnRotation)

Method TransformComponent.

Parameters:
this.position this.position
spawnRotation spawnRotation

ModelComponent

public new ModelComponent (model)

Method ModelComponent.

Parameters:
model model

PersistentModel

public new PersistentModel (new Model.ModelReference(this.selectedModelId, this.currentScale, null, true)

Method PersistentModel.

Parameters:
new Model.ModelReference(this.selectedModelId
this.currentScale this.currentScale
null null
true true

HeadRotation

public new HeadRotation (spawnRotation)

Method HeadRotation.

Parameters:
spawnRotation spawnRotation

onDismiss

public void onDismiss (@Nonnull final Ref ref, @Nonnull final Store store)

Method onDismiss.

Parameters:
@Nonnull final Ref ref
@Nonnull final Store store

clearPreview

private void clearPreview (@Nonnull final Store store)

Method clearPreview.

Parameters:
@Nonnull final Store store

updateTabVisibility

private void updateTabVisibility (@Nonnull final UICommandBuilder commandBuilder)

Method updateTabVisibility.

Parameters:
@Nonnull final UICommandBuilder commandBuilder

buildList

private void buildList (@Nonnull final Ref ref, @Nonnull final Store store, @Nonnull final UICommandBuilder commandBuilder, @Nonnull final UIEventBuilder eventBuilder)

Method buildList.

Parameters:
@Nonnull final Ref ref
@Nonnull final Store store
@Nonnull final UICommandBuilder commandBuilder
@Nonnull final UIEventBuilder eventBuilder

buildNPCList

private void buildNPCList (@Nonnull final Ref ref, @Nonnull final Store store, @Nonnull final UICommandBuilder commandBuilder, @Nonnull final UIEventBuilder eventBuilder)

Method buildNPCList.

Parameters:
@Nonnull final Ref ref
@Nonnull final Store store
@Nonnull final UICommandBuilder commandBuilder
@Nonnull final UIEventBuilder eventBuilder

buildModelList

private void buildModelList (@Nonnull final Ref ref, @Nonnull final Store store, @Nonnull final UICommandBuilder commandBuilder, @Nonnull final UIEventBuilder eventBuilder)

Method buildModelList.

Parameters:
@Nonnull final Ref ref
@Nonnull final Store store
@Nonnull final UICommandBuilder commandBuilder
@Nonnull final UIEventBuilder eventBuilder

buildItemsContent

private void buildItemsContent (@Nonnull final Ref ref, @Nonnull final Store store, @Nonnull final UICommandBuilder commandBuilder)

Method buildItemsContent.

Parameters:
@Nonnull final Ref ref
@Nonnull final Store store
@Nonnull final UICommandBuilder commandBuilder

selectItem

private void selectItem (@Nonnull final Ref ref, @Nonnull final Store store, @Nonnull final String itemId, @Nonnull final UICommandBuilder commandBuilder)

Method selectItem.

Parameters:
@Nonnull final Ref ref
@Nonnull final Store store
@Nonnull final String itemId
@Nonnull final UICommandBuilder commandBuilder

spawnItem

private void spawnItem (@Nonnull final Ref ref, @Nonnull final Store store, final int count)

Method spawnItem.

Parameters:
@Nonnull final Ref ref
@Nonnull final Store store
final int count

ItemComponent

public new ItemComponent (itemStack)

Method ItemComponent.

Parameters:
itemStack itemStack

BlockEntity

public new BlockEntity (this.selectedItemId)

Method BlockEntity.

Parameters:
this.selectedItemId this.selectedItemId

EntityScaleComponent

public new EntityScaleComponent (this.currentScale * 2.0f)

Method EntityScaleComponent.

Parameters:
this.currentScale * 2.0f

getItemModelId

private String getItemModelId (@Nonnull final Item item)

Method getItemModelId.

Parameters:
@Nonnull final Item item

getItemModel

private Model getItemModel (@Nonnull final Item item)

Method getItemModel.

Parameters:
@Nonnull final Item item

selectNPCRole

private void selectNPCRole (@Nonnull final Ref ref, @Nonnull final Store store, @Nonnull final String npcRole, @Nonnull final UICommandBuilder commandBuilder)

Method selectNPCRole.

Parameters:
@Nonnull final Ref ref
@Nonnull final Store store
@Nonnull final String npcRole
@Nonnull final UICommandBuilder commandBuilder

selectModel

private void selectModel (@Nonnull final Ref ref, @Nonnull final Store store, @Nonnull final String modelId, @Nonnull final UICommandBuilder commandBuilder)

Method selectModel.

Parameters:
@Nonnull final Ref ref
@Nonnull final Store store
@Nonnull final String modelId
@Nonnull final UICommandBuilder commandBuilder

initPosition

private void initPosition (@Nonnull final Ref ref, @Nonnull final Store store)

Method initPosition.

Parameters:
@Nonnull final Ref ref
@Nonnull final Store store

createOrUpdatePreview

private void createOrUpdatePreview (@Nonnull final Ref ref, @Nonnull final Store store, @Nonnull final UICommandBuilder commandBuilder, @Nullable final Model model)

Method createOrUpdatePreview.

Parameters:
@Nonnull final Ref ref
@Nonnull final Store store
@Nonnull final UICommandBuilder commandBuilder
@Nullable final Model model

updatePreviewScale

private void updatePreviewScale (@Nonnull final Ref ref, @Nonnull final Store store)

Method updatePreviewScale.

Parameters:
@Nonnull final Ref ref
@Nonnull final Store store

createOrUpdateBlockPreview

private void createOrUpdateBlockPreview (@Nonnull final Ref ref, @Nonnull final Store store, @Nonnull final String blockTypeKey)

Method createOrUpdateBlockPreview.

Parameters:
@Nonnull final Ref ref
@Nonnull final Store store
@Nonnull final String blockTypeKey

createOrUpdateItemPreview

private void createOrUpdateItemPreview (@Nonnull final Ref ref, @Nonnull final Store store, @Nonnull final String itemId)

Method createOrUpdateItemPreview.

Parameters:
@Nonnull final Ref ref
@Nonnull final Store store
@Nonnull final String itemId

getNPCModel

private Model getNPCModel ()

Method getNPCModel.

GeneralCommandException

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