-
Notifications
You must be signed in to change notification settings - Fork 17
Taskflow improvements #82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
853ab1b to
670324f
Compare
Replaced `TaskResult` with more explicit task patterns and streamlined result handling. Improved modularity by refactoring references to `TaskFlow` into `TaskFlowModule`. Added `name` properties to various tasks for better debugging and logging.
Replaced `resultingPos` with `expectedPos` across the codebase for improved clarity and consistency in block placement and interaction handling. Introduced enhanced logic for detecting unexpected positions and added a corresponding result type `UnexpectedPosition`. Updated related event systems and modules to align with the new `BlockChange` event structure.
Simplifies the task execution flow by introducing a `Resolvable` interface to standardize task resolution. Removes redundant task nesting and pending logic, streamlining parent task management and improving readability and maintainability.
Refactored `findProcessorForState` to an extension function on `TargetState` for improved readability and consistency. Introduced `AxisPreprocessor` and `BlockFaceProcessor` to handle preprocessing based on block axis and block face properties, enhancing placement flexibility and processing logic.
Lifted placement-related logic into the BuildTask to simplify task nesting and enhance data flow. This change improves maintainability and ensures more accessible context sharing across the build process.
Implemented prioritized material and space comparators in inventory. Replaced `name` property with `description` for detailed container info. Simplified transfer and debug logic for better readability and usability.
Reorganize container classes into a dedicated `containers` package for improved modularity and clarity. Introduced new inventory transaction utilities, including `PickFromInventoryTransaction`, `DropItemInHandTransaction`, and `SwapHandsTransaction`, to streamline and enhance inventory management. Updated configurations, task flows, and dependencies to align with this new structure.
Standardize access to `disposables` and `ignoredBlocks` under specific config groups for modularity. Improved task handling by adding a new debug setting and validating rotation states in build tasks. Removed redundant logging and adjusted conditional checks for cleaner code execution.
Simplified and streamlined rotation management by consolidating `onUpdate` and `onReceive` callbacks. Improved code readability and consistency in `BuildTask` and `BreakBlock` tasks by refining placement and rotation operations. Removed unused comments and ensured proper alignment with updated rotation conventions.
Removed redundant listener management methods and replaced them with a streamlined `unsubscribe` approach. Cleaned up code to improve maintainability and consistency across Task state transitions, ensuring proper cleanup of listeners tied to task instances.
Replaced `InventoryTransfer` with `TransactionExecutor` for improved naming and functionality. Renamed `InventoryTransferTask` to `SlotTransfer` and updated method calls accordingly. Introduced `QuickCraftTransaction` and `TransferSelection` for expanded transaction capabilities and added error handling in `InventoryChanges`.
Replaced `requestRotation` with a more flexible `rotate` DSL across modules for cleaner code and enhanced rotation handling. Introduced a new `accessEnderChest` configuration in `InventoryConfig` and applied it to filter container usage. Improved `PacketMine` behavior for better break handling.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
requestRotationwith a flexiblerotateDSL for cleaner and more consistent rotation handling.TransactionExecutor,QuickCraftTransaction) and improved material prioritization. IntroducedaccessEnderChestconfiguration for better container filtering.Resolvableinterface, enhanced nesting logic, and modularizedTaskFlowModulereferences.BuildTask, addedAxisPreprocessorandBlockFaceProcessor, and improved block interaction withexpectedPoslogic.StructureRegistryfor dynamic management.unsubscribeapproach and enhanced event-driven behaviors.