Class InteractionContext
java.lang.Object
com.hypixel.hytale.server.core.entity.InteractionContext
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceDeprecated. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate InteractionChainprivate static final Function<InteractionContext, Map<String, String>> private LivingEntityprivate InteractionEntryprivate ItemStackprivate final ItemContainerprivate final intprivate final byteprivate final InteractionManagerprivate Function<InteractionContext, Map<String, String>> private Label[]private static final com.hypixel.hytale.logger.HytaleLoggerprivate final DynamicMetaStore<InteractionContext> private final Itemprivate final Ref<EntityStore> private final Ref<EntityStore> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateInteractionContext(InteractionManager interactionManager, Ref<EntityStore> owningEntity, int heldItemSectionId, ItemContainer heldItemContainer, byte heldItemSlot, ItemStack heldItem) privateInteractionContext(InteractionManager interactionManager, Ref<EntityStore> owningEntity, Ref<EntityStore> runningForEntity, int heldItemSectionId, ItemContainer heldItemContainer, byte heldItemSlot, ItemStack heldItem) -
Method Summary
Modifier and TypeMethodDescriptionboolean(package private) voiddeinitEntry(InteractionChain chain, InteractionEntry entry, LivingEntity entity) voidexecute(RootInteraction nextInteraction) static InteractionContextforInteraction(InteractionManager manager, Ref<EntityStore> ref, InteractionType type, int equipSlot, ComponentAccessor<EntityStore> componentAccessor) static InteractionContextforInteraction(InteractionManager manager, Ref<EntityStore> ref, InteractionType type, ComponentAccessor<EntityStore> componentAccessor) fork(InteractionChainData data, InteractionType type, InteractionContext context, RootInteraction rootInteraction, boolean predicted) fork(InteractionType type, InteractionContext context, RootInteraction rootInteraction, boolean predicted) fork(InteractionContext context, RootInteraction rootInteraction, boolean predicted) static InteractionContextforProxyEntity(InteractionManager manager, LivingEntity entity, Ref<EntityStore> runningForEntity) getChain()getEntry()intbytegetLabel(int index) intgetSnapshot(Ref<EntityStore> ref, ComponentAccessor<EntityStore> componentAccessor) getState()boolean(package private) voidinitEntry(InteractionChain chain, InteractionEntry entry, LivingEntity entity) voidvoidsetHeldItem(ItemStack heldItem) voidsetInteractionVarsGetter(Function<InteractionContext, Map<String, String>> interactionVarsGetter) voidvoidsetOperationCounter(int operationCounter) voidsetSnapshotProvider(InteractionContext.SnapshotProvider snapshotProvider) voidsetTimeShift(float shift) toString()static InteractionContext
-
Field Details
-
DEFAULT_VAR_GETTER
-
LOGGER
private static final com.hypixel.hytale.logger.HytaleLogger LOGGER -
heldItemSectionId
private final int heldItemSectionId -
heldItemContainer
-
heldItemSlot
private final byte heldItemSlot -
heldItem
-
originalItemType
-
interactionVarsGetter
-
interactionManager
-
owningEntity
-
runningForEntity
-
entity
-
chain
-
entry
-
labels
-
snapshotProvider
-
metaStore
-
-
Constructor Details
-
InteractionContext
private InteractionContext(@Nullable InteractionManager interactionManager, @Nullable Ref<EntityStore> owningEntity, int heldItemSectionId, @Nullable ItemContainer heldItemContainer, byte heldItemSlot, @Nullable ItemStack heldItem) -
InteractionContext
private InteractionContext(@Nullable InteractionManager interactionManager, @Nullable Ref<EntityStore> owningEntity, @Nullable Ref<EntityStore> runningForEntity, int heldItemSectionId, @Nullable ItemContainer heldItemContainer, byte heldItemSlot, @Nullable ItemStack heldItem)
-
-
Method Details
-
fork
@Nonnull public InteractionChain fork(@Nonnull InteractionContext context, @Nonnull RootInteraction rootInteraction, boolean predicted) -
fork
@Nonnull public InteractionChain fork(@Nonnull InteractionType type, @Nonnull InteractionContext context, @Nonnull RootInteraction rootInteraction, boolean predicted) -
fork
@Nonnull public InteractionChain fork(@Nonnull InteractionChainData data, @Nonnull InteractionType type, @Nonnull InteractionContext context, @Nonnull RootInteraction rootInteraction, boolean predicted) -
duplicate
-
getEntity
-
getOwningEntity
-
execute
-
getChain
-
getEntry
-
getOperationCounter
public int getOperationCounter() -
setOperationCounter
public void setOperationCounter(int operationCounter) -
jump
-
getOriginalItemType
-
getHeldItemSectionId
public int getHeldItemSectionId() -
getHeldItemContainer
-
getHeldItemSlot
public byte getHeldItemSlot() -
getHeldItem
-
setHeldItem
-
createHeldItemContext
-
getInteractionVarsGetter
-
getInteractionVars
-
setInteractionVarsGetter
public void setInteractionVarsGetter(Function<InteractionContext, Map<String, String>> interactionVarsGetter) -
getInteractionManager
-
getTargetEntity
-
getTargetBlock
-
getMetaStore
-
getState
-
getClientState
-
getServerState
-
getInstanceStore
-
allowSkipChainOnClick
public boolean allowSkipChainOnClick() -
setLabels
-
hasLabels
public boolean hasLabels() -
getLabel
-
getSnapshot
public EntitySnapshot getSnapshot(@Nonnull Ref<EntityStore> ref, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
setSnapshotProvider
-
setTimeShift
public void setTimeShift(float shift) -
getCommandBuffer
-
getRootInteractionId
-
initEntry
void initEntry(@Nonnull InteractionChain chain, InteractionEntry entry, @Nullable LivingEntity entity) -
deinitEntry
-
toString
-
forProxyEntity
@Nonnull public static InteractionContext forProxyEntity(InteractionManager manager, @Nonnull LivingEntity entity, Ref<EntityStore> runningForEntity) -
forInteraction
@Nonnull public static InteractionContext forInteraction(@Nonnull InteractionManager manager, @Nonnull Ref<EntityStore> ref, @Nonnull InteractionType type, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
forInteraction
@Nonnull public static InteractionContext forInteraction(@Nonnull InteractionManager manager, @Nonnull Ref<EntityStore> ref, @Nonnull InteractionType type, int equipSlot, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
withoutEntity
-
defaultGetVars
-