public class InteractionContext
Class InteractionContext. Provides interactioncontext functionality for the Hytale server.
java.lang.Object > InteractionContext
Field Summary
heldItem
Field heldItem.
entity
Field entity.
chain
Field chain.
entry
Field entry.
labels
Field labels.
snapshotProvider
Field snapshotProvider.
data
Field data.
targetEntity
Field targetEntity.
commandBuffer
Field commandBuffer.
networkComponent
Field networkComponent.
hitLocation
Field hitLocation.
hitDetail
Field hitDetail.
targetBlock
Field targetBlock.
index
Field index.
newChainId
Field newChainId.
forkChain
Field forkChain.
tempData
Field tempData.
ctx
Field ctx.
networkIdComponent
Field networkIdComponent.
networkId
Field networkId.
snapshotBufferComponent
Field snapshotBufferComponent.
snapshot
Field snapshot.
transformComponent
Field transformComponent.
interactions
Field interactions.
interactionId
Field interactionId.
unarmedInteraction
Field unarmedInteraction.
gameMode
Field gameMode.
settings
Field settings.
entityInventory
Field entityInventory.
primary
Field primary.
secondary
Field secondary.
prioPrimary
Field prioPrimary.
prioSecondary
Field prioSecondary.
item
Field item.
Method Detail
InteractionContext
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 InteractionManagerinteractionManager@Nullable final RefowningEntityfinal intheldItemSectionId@Nullable final ItemContainerheldItemContainerfinal byteheldItemSlot@Nullable final ItemStackheldItem
fork
InteractionChain
fork
(@Nonnull final InteractionContext context, @Nonnull final RootInteraction rootInteraction, final boolean predicted)
Method fork.
- Parameters:
@Nonnull final InteractionContextcontext@Nonnull final RootInteractionrootInteractionfinal booleanpredicted
InteractionChainData
new
InteractionChainData
(this.chain.getChainData()
Method InteractionChainData.
- Parameters:
this.chain.getChainData(this.chain.getChainData(
Vector3f
new
Vector3f
((float)
Method Vector3f.
- Parameters:
(float(float
ForkedChainId
new
ForkedChainId
(this.entry.getIndex()
Method ForkedChainId.
- Parameters:
this.entry.getIndex(this.entry.getIndex(
getOperationCounter
int
getOperationCounter
()
Method getOperationCounter.
setOperationCounter
void
setOperationCounter
(final int operationCounter)
Method setOperationCounter.
- Parameters:
final intoperationCounter
getHeldItemSectionId
int
getHeldItemSectionId
()
Method getHeldItemSectionId.
getHeldItemSlot
byte
getHeldItemSlot
()
Method getHeldItemSlot.
getInteractionVarsGetter
>
getInteractionVarsGetter
()
Method getInteractionVarsGetter.
getInteractionVars
String>
getInteractionVars
()
Method getInteractionVars.
setInteractionVarsGetter
void
setInteractionVarsGetter
(final Function> interactionVarsGetter)
Method setInteractionVarsGetter.
- Parameters:
final FunctioninteractionVarsGetter>
getInteractionManager
Method getInteractionManager.
allowSkipChainOnClick
boolean
allowSkipChainOnClick
()
Method allowSkipChainOnClick.
setLabels
void
setLabels
(final Label[] labels)
Method setLabels.
- Parameters:
final Label[]labels
hasLabels
boolean
hasLabels
()
Method hasLabels.
getSnapshot
EntitySnapshot
getSnapshot
(@Nonnull final Ref ref, @Nonnull final ComponentAccessor componentAccessor)
Method getSnapshot.
- Parameters:
@Nonnull final Refref@Nonnull final ComponentAccessorcomponentAccessor
EntitySnapshot
new
EntitySnapshot
(transformComponent.getPosition()
Method EntitySnapshot.
- Parameters:
transformComponent.getPosition(transformComponent.getPosition(
setSnapshotProvider
void
setSnapshotProvider
(@Nullable final SnapshotProvider snapshotProvider)
Method setSnapshotProvider.
- Parameters:
@Nullable final SnapshotProvidersnapshotProvider
setTimeShift
void
setTimeShift
(final float shift)
Method setTimeShift.
- Parameters:
final floatshift
initEntry
void
initEntry
(@Nonnull final InteractionChain chain, final InteractionEntry entry, @Nullable final LivingEntity entity)
Method initEntry.
- Parameters:
@Nonnull final InteractionChainchainfinal InteractionEntryentry@Nullable final LivingEntityentity
deinitEntry
void
deinitEntry
(final InteractionChain chain, final InteractionEntry entry, final LivingEntity entity)
Method deinitEntry.
- Parameters:
final InteractionChainchainfinal InteractionEntryentryfinal LivingEntityentity
toString
String
toString
()
Method toString.
forProxyEntity
InteractionContext
forProxyEntity
(final InteractionManager manager, @Nonnull final LivingEntity entity, final Ref runningForEntity)
Method forProxyEntity.
- Parameters:
final InteractionManagermanager@Nonnull final LivingEntityentityfinal RefrunningForEntity
forInteraction
InteractionContext
forInteraction
(@Nonnull final InteractionManager manager, @Nonnull final Ref ref, @Nonnull final InteractionType type, @Nonnull final ComponentAccessor componentAccessor)
Method forInteraction.
- Parameters:
@Nonnull final InteractionManagermanager@Nonnull final Refref@Nonnull final InteractionTypetype@Nonnull final ComponentAccessorcomponentAccessor
if
else
if
(primary != null && secondary != null)
Method if.
- Parameters:
primary != null && secondary !=null