SpawnNPCInteraction

public class SpawnNPCInteraction extends SimpleBlockInteraction

Class SpawnNPCInteraction. Provides spawnnpcinteraction functionality for the Hytale server.

java.lang.Object > SimpleBlockInteraction > SpawnNPCInteraction

Field Summary

entityId

protected String entityId

Field entityId.

spawnOffset

protected Vector3d spawnOffset

Field spawnOffset.

spawnYawOffset

protected float spawnYawOffset

Field spawnYawOffset.

spawnChance

protected float spawnChance

Field spawnChance.

world

final World world

Field world.

spawnData

final SpawnData spawnData

Field spawnData.

chunkIndex

final long chunkIndex

Field chunkIndex.

chunkStore

final ChunkStore chunkStore

Field chunkStore.

chunkRef

final Ref chunkRef

Field chunkRef.

worldChunkComponent

final WorldChunk worldChunkComponent

Field worldChunkComponent.

blockType

final BlockType blockType

Field blockType.

blockChunkComponent

final BlockChunk blockChunkComponent

Field blockChunkComponent.

section

final BlockSection section

Field section.

rotationIndex

final int rotationIndex

Field rotationIndex.

rotationTuple

final RotationTuple rotationTuple

Field rotationTuple.

position

final Vector3d position

Field position.

blockCenter

final Vector3d blockCenter

Field blockCenter.

rotation

final Vector3f rotation

Field rotation.

commandBuffer

final CommandBuffer commandBuffer

Field commandBuffer.

Method Detail

SpawnNPCInteraction

public public SpawnNPCInteraction ()

Method SpawnNPCInteraction.

spawnNPC

private void spawnNPC (@Nonnull final Store store, @Nonnull final Vector3i targetBlock)

Method spawnNPC.

Parameters:
@Nonnull final Store store
@Nonnull final Vector3i targetBlock

computeSpawnData

private SpawnData computeSpawnData (@Nonnull final World world, @Nonnull final Vector3i targetBlock)

Method computeSpawnData.

Parameters:
@Nonnull final World world
@Nonnull final Vector3i targetBlock

SpawnData

public new SpawnData (this.spawnOffset.clone()

Method SpawnData.

Parameters:
this.spawnOffset.clone( this.spawnOffset.clone(

Vector3f

public new Vector3f (0.0f, (float)

Method Vector3f.

Parameters:
0.0f 0.0f
(float (float

interactWithBlock

protected void interactWithBlock (@Nonnull final World world, @Nonnull final CommandBuffer commandBuffer, @Nonnull final InteractionType type, @Nonnull final InteractionContext context, @Nullable final ItemStack itemInHand, @Nonnull final Vector3i targetBlock, @Nonnull final CooldownHandler cooldownHandler)

Method interactWithBlock.

Parameters:
@Nonnull final World world
@Nonnull final CommandBuffer commandBuffer
@Nonnull final InteractionType type
@Nonnull final InteractionContext context
@Nullable final ItemStack itemInHand
@Nonnull final Vector3i targetBlock
@Nonnull final CooldownHandler cooldownHandler

simulateInteractWithBlock

protected void simulateInteractWithBlock (@Nonnull final InteractionType type, @Nonnull final InteractionContext context, @Nullable final ItemStack itemInHand, @Nonnull final World world, @Nonnull final Vector3i targetBlock)

Method simulateInteractWithBlock.

Parameters:
@Nonnull final InteractionType type
@Nonnull final InteractionContext context
@Nullable final ItemStack itemInHand
@Nonnull final World world
@Nonnull final Vector3i targetBlock

position

public Vector3d position ()

Method position.

rotation

public Vector3f rotation ()

Method rotation.