Interface OperationFactory


public interface OperationFactory
An interface that represents the factory of an operation, used to instantiate operations for builder tools.
  • Method Details

    • create

      @Nonnull ToolOperation create(@Nonnull Ref<EntityStore> ref, @Nonnull Player playerComponent, @Nonnull PlayerRef playerRefComponent, @Nonnull BuilderToolOnUseInteraction interaction, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
      Called to create a new instance of the tool operation class.
      Parameters:
      ref - The entity reference of the instigating player entity.
      playerComponent - The player component of the instigating player entity.
      playerRefComponent - The player reference component of the instigating player entity.
      interaction - The interaction packet that we are parsing.
      componentAccessor - The ComponentAccessor for component access.
      Returns:
      the newly created ToolOperation instance from this factory.