Class MemoriesConditionInteraction

java.lang.Object
com.hypixel.hytale.server.core.modules.interaction.interaction.config.Interaction
com.hypixel.hytale.builtin.adventure.memories.interactions.MemoriesConditionInteraction
All Implemented Interfaces:
JsonAsset<String>, JsonAssetWithMap<String, IndexedLookupTableAssetMap<String, Interaction>>, NetworkSerializable<Interaction>, Operation

public class MemoriesConditionInteraction extends Interaction
An interaction that routes to different interactions based on conditions of the player's memories level.
  • Field Details

  • Constructor Details

    • MemoriesConditionInteraction

      public MemoriesConditionInteraction()
  • Method Details

    • compile

      public void compile(@Nonnull OperationsBuilder builder)
      Description copied from class: Interaction
      Called when building a RootInteraction to expand this interaction into one or more Operations.

      By default, this will only add the current interaction to the operations list.

      Overrides:
      compile in class Interaction
      Parameters:
      builder - The builder to append operations to.
      See Also:
    • walk

      public boolean walk(@Nonnull Collector collector, @Nonnull InteractionContext context)
      Description copied from class: Interaction
      Called to walk this interaction for collecting data.
      Specified by:
      walk in class Interaction
      Parameters:
      collector - The collector instance.
      context - The interaction context.
      Returns:
      true to continue walking, false to stop.
    • needsRemoteSync

      public boolean needsRemoteSync()
      Description copied from class: Interaction
      Returns whether this interaction must be synced to any remote clients in order to function correctly. Ignored when the interaction is running without a client.

      This method is used as an optimization when the interactions are being run by a manager with a remote client. If all interactions in a chain don't require a client in order to function (if this method returns false for all interactions in the chain) then we can skip executing/syncing the chain to the client and instead run the chain completely server-side instead.

      This method has no effect on interaction managers that run without a remote attached. It may also be ignored in some cases as this method only functions as a hint.

      If Operation.getWaitForDataFrom() returns WaitForDataFrom.Client then this must return true.

      Specified by:
      needsRemoteSync in class Interaction
      Returns:
      whether this interaction requires being synced to remote clients in order to function correctly for them.
    • getWaitForDataFrom

      @Nonnull public WaitForDataFrom getWaitForDataFrom()