InteractionContext

public class InteractionContext

Class InteractionContext. Provides interactioncontext functionality for the Hytale server.

java.lang.Object > InteractionContext

Field Summary

heldItem

private ItemStack heldItem

Field heldItem.

entity

private LivingEntity entity

Field entity.

chain

private InteractionChain chain

Field chain.

entry

private InteractionEntry entry

Field entry.

labels

private Label[] labels

Field labels.

snapshotProvider

private SnapshotProvider snapshotProvider

Field snapshotProvider.

data

final InteractionChainData data

Field data.

targetEntity

final Ref targetEntity

Field targetEntity.

commandBuffer

final CommandBuffer commandBuffer

Field commandBuffer.

networkComponent

final NetworkId networkComponent

Field networkComponent.

hitLocation

final Vector4d hitLocation

Field hitLocation.

hitDetail

final String hitDetail

Field hitDetail.

targetBlock

final BlockPosition targetBlock

Field targetBlock.

index

final int index

Field index.

newChainId

final ForkedChainId newChainId

Field newChainId.

forkChain

final InteractionChain forkChain

Field forkChain.

tempData

final InteractionChain.TempChain tempData

Field tempData.

ctx

final InteractionContext ctx

Field ctx.

networkIdComponent

final NetworkId networkIdComponent

Field networkIdComponent.

networkId

final int networkId

Field networkId.

snapshotBufferComponent

final SnapshotBuffer snapshotBufferComponent

Field snapshotBufferComponent.

snapshot

final EntitySnapshot snapshot

Field snapshot.

transformComponent

final TransformComponent transformComponent

Field transformComponent.

interactions

final Interactions interactions

Field interactions.

interactionId

final String interactionId

Field interactionId.

unarmedInteraction

final UnarmedInteractions unarmedInteraction

Field unarmedInteraction.

gameMode

final GameMode gameMode

Field gameMode.

settings

final RootInteractionSettings settings

Field settings.

entityInventory

final Inventory entityInventory

Field entityInventory.

primary

final ItemStack primary

Field primary.

secondary

final ItemStack secondary

Field secondary.

prioPrimary

final int prioPrimary

Field prioPrimary.

prioSecondary

final int prioSecondary

Field prioSecondary.

item

final Item item

Field item.

Method Detail

InteractionContext

public private InteractionContext (@Nullable final InteractionManager interactionManager, @Nullable final Ref owningEntity, final int heldItemSectionId, @Nullable final ItemContainer heldItemContainer, final byte heldItemSlot, @Nullable final ItemStack heldItem)

Method InteractionContext.

Parameters:
@Nullable final InteractionManager interactionManager
@Nullable final Ref owningEntity
final int heldItemSectionId
@Nullable final ItemContainer heldItemContainer
final byte heldItemSlot
@Nullable final ItemStack heldItem

fork

public InteractionChain fork (@Nonnull final InteractionContext context, @Nonnull final RootInteraction rootInteraction, final boolean predicted)

Method fork.

Parameters:
@Nonnull final InteractionContext context
@Nonnull final RootInteraction rootInteraction
final boolean predicted

InteractionChainData

public new InteractionChainData (this.chain.getChainData()

Method InteractionChainData.

Parameters:
this.chain.getChainData( this.chain.getChainData(

Vector3f

public new Vector3f ((float)

Method Vector3f.

Parameters:
(float (float

ForkedChainId

public new ForkedChainId (this.entry.getIndex()

Method ForkedChainId.

Parameters:
this.entry.getIndex( this.entry.getIndex(

duplicate

public InteractionContext duplicate ()

Method duplicate.

getEntity

public Ref getEntity ()

Method getEntity.

getOwningEntity

public Ref getOwningEntity ()

Method getOwningEntity.

execute

public void execute (@Nonnull final RootInteraction nextInteraction)

Method execute.

Parameters:
@Nonnull final RootInteraction nextInteraction

getChain

public InteractionChain getChain ()

Method getChain.

getEntry

public InteractionEntry getEntry ()

Method getEntry.

getOperationCounter

public int getOperationCounter ()

Method getOperationCounter.

setOperationCounter

public void setOperationCounter (final int operationCounter)

Method setOperationCounter.

Parameters:
final int operationCounter

jump

public void jump (@Nonnull final Label label)

Method jump.

Parameters:
@Nonnull final Label label

getOriginalItemType

public Item getOriginalItemType ()

Method getOriginalItemType.

getHeldItemSectionId

public int getHeldItemSectionId ()

Method getHeldItemSectionId.

getHeldItemContainer

public ItemContainer getHeldItemContainer ()

Method getHeldItemContainer.

getHeldItemSlot

public byte getHeldItemSlot ()

Method getHeldItemSlot.

getHeldItem

public ItemStack getHeldItem ()

Method getHeldItem.

setHeldItem

public void setHeldItem (@Nullable final ItemStack heldItem)

Method setHeldItem.

Parameters:
@Nullable final ItemStack heldItem

createHeldItemContext

public ItemContext createHeldItemContext ()

Method createHeldItemContext.

getInteractionVarsGetter

public > getInteractionVarsGetter ()

Method getInteractionVarsGetter.

getInteractionVars

public String> getInteractionVars ()

Method getInteractionVars.

setInteractionVarsGetter

public void setInteractionVarsGetter (final Function> interactionVarsGetter)

Method setInteractionVarsGetter.

Parameters:
final Function> interactionVarsGetter

getInteractionManager

public InteractionManager getInteractionManager ()

Method getInteractionManager.

getTargetEntity

public Ref getTargetEntity ()

Method getTargetEntity.

getTargetBlock

public BlockPosition getTargetBlock ()

Method getTargetBlock.

getMetaStore

public DynamicMetaStore getMetaStore ()

Method getMetaStore.

getState

public InteractionSyncData getState ()

Method getState.

getClientState

public InteractionSyncData getClientState ()

Method getClientState.

getServerState

public InteractionSyncData getServerState ()

Method getServerState.

getInstanceStore

public DynamicMetaStore getInstanceStore ()

Method getInstanceStore.

allowSkipChainOnClick

public boolean allowSkipChainOnClick ()

Method allowSkipChainOnClick.

setLabels

public void setLabels (final Label[] labels)

Method setLabels.

Parameters:
final Label[] labels

hasLabels

public boolean hasLabels ()

Method hasLabels.

getLabel

public Label getLabel (final int index)

Method getLabel.

Parameters:
final int index

getSnapshot

public EntitySnapshot getSnapshot (@Nonnull final Ref ref, @Nonnull final ComponentAccessor componentAccessor)

Method getSnapshot.

Parameters:
@Nonnull final Ref ref
@Nonnull final ComponentAccessor componentAccessor

EntitySnapshot

public new EntitySnapshot (transformComponent.getPosition()

Method EntitySnapshot.

Parameters:
transformComponent.getPosition( transformComponent.getPosition(

setSnapshotProvider

public void setSnapshotProvider (@Nullable final SnapshotProvider snapshotProvider)

Method setSnapshotProvider.

Parameters:
@Nullable final SnapshotProvider snapshotProvider

setTimeShift

public void setTimeShift (final float shift)

Method setTimeShift.

Parameters:
final float shift

getCommandBuffer

public CommandBuffer getCommandBuffer ()

Method getCommandBuffer.

getRootInteractionId

public String getRootInteractionId (@Nonnull final InteractionType type)

Method getRootInteractionId.

Parameters:
@Nonnull final InteractionType type

initEntry

Method initEntry.

Parameters:
@Nonnull final InteractionChain chain
final InteractionEntry entry
@Nullable final LivingEntity entity

deinitEntry

public void deinitEntry (final InteractionChain chain, final InteractionEntry entry, final LivingEntity entity)

Method deinitEntry.

Parameters:
final InteractionChain chain
final InteractionEntry entry
final LivingEntity entity

toString

public String toString ()

Method toString.

forProxyEntity

static InteractionContext forProxyEntity (final InteractionManager manager, @Nonnull final LivingEntity entity, final Ref runningForEntity)

Method forProxyEntity.

Parameters:
final InteractionManager manager
@Nonnull final LivingEntity entity
final Ref runningForEntity

if

public else if (primary != null && secondary != null)

Method if.

Parameters:
primary != null && secondary != null

withoutEntity

static InteractionContext withoutEntity ()

Method withoutEntity.

defaultGetVars

public String> defaultGetVars (@Nonnull final InteractionContext c)

Method defaultGetVars.

Parameters:
@Nonnull final InteractionContext c