-
Notifications
You must be signed in to change notification settings - Fork 11
Refactor to JSON and enhance crafting/smelting logic #49
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
base: master
Are you sure you want to change the base?
Conversation
Update json module import paths from "json" to "lib/json" in crafting.lua and add missing json requires in furnace.lua and grid.lua to fix module loading issues.
Remove unused bfile alias and struct definitions for string_uint16_map and reserved_items that were no longer referenced in the codebase. refactor(grid): simplify recipe requirement caching logic Simplify the recipe requirement caching logic by removing unnecessary nested loops and directly accessing recipe items. Also remove redundant saveGridRecipes call.
Restructured the tag processing logic improving readability and maintainability. Added comprehensive tag resolution with nested tag expansion, enhanced error handling, and better integration with the existing recipe processing pipeline. The changes ensure more accurate item tag mapping and improved compatibility with Minecraft's tag system.
- Refactored tag resolution logic to consolidate inventory peripheral and alias lookups - Improved candidate gathering using dictionary to prevent duplicates - Added furnace recipe loading functionality from recipes.json - Enhanced recipe management with proper craftable list updates - Fixed version number to 1.4.5
Fixed item selection logic to prioritize items we already have or can craft, instead of blindly picking the first option. Also fixed grid recipe requirement caching to properly handle integer IDs as string keys in JSON objects.
…ssues Fixed several critical bugs in the crafting module: - Corrected simulation chain handling to properly return root node instead of nil - Fixed job ID assignment to use root.jobId instead of nil - Resolved job management logic to prevent duplicate job creation and ensure proper cleanup - Fixed job status tracking to correctly handle "running" state transitions - Corrected job removal logic to use job ID instead of name for proper cleanup - Fixed job status updates to use correct job ID references These changes ensure crafting chains are properly simulated, jobs are correctly managed throughout their lifecycle, and the system maintains accurate state tracking.
…dling Fixed two issues: 1. `selectBestFromList` now properly resolves tag references (#logs) to specific items before checking inventory and crafting availability 2. Grid recipe storage now supports multiple recipes per name (e.g., Stick from Planks OR Bamboo) by storing recipes as arrays instead of single entries
…workflow Renamed the script from gen_bins.py to gen_recipes.py to better reflect its purpose of generating recipe data. Added automatic download functionality to fetch the latest Minecraft server jar from Mojang's API instead of requiring manual download. Created a new GitHub Actions workflow (gen_recipes.yml) that runs the script and automatically commits recipe updates when changes are detected.
… resilience - Removed unused bfile.lua from installer - Enhanced directDisposalHandler with pre-disposal verification to prevent threshold violations - Added pcall wrapper around disposal requests to prevent module crashes from library errors - Improved logging clarity and reduced verbosity in disposal pattern matching - Fixed potential race condition where item counts could change between threshold check and disposal
…iability - Removed bfile.lua from installer configuration as it's no longer needed - Enhanced disposal module with better error handling and race condition prevention - Added verification checks before disposal operations to prevent threshold violations - Implemented pcall protection around disposal requests to prevent module crashes - Improved logging for better debugging and monitoring of disposal operations
Added a workaround to split 64-item stack transfers into two separate operations (63 + 1) to bypass a library bug that causes incorrect item movement when pushing exactly 64 items at once.
…nction - Fixed installer.lua to prevent running default menu after child installer completes - Removed unused waitForTransfer function from inventory.lua - Added main loop for post-install actions with reboot/install more options
Fixed a bug in the inventory transfer function where items with stack sizes of 16 or 64 were not being transferred correctly. The workaround that previously only handled 64-stack items has been extended to also handle 16-stack items by splitting the transfer into two moves to bypass a library bug.
|
@SethGamer1223 I'm kind of lost here, I've been trying to figure out why suddenly item transfers dont work properly |
|
Seems to be that AIL located in the repository: |
|
I have merged a fix in #50 the problem should be resolved from my testing |
|
I had a bunch of intermittent issues with the one from the gist on 1.21.8… I’ll have to see how it works tomorrow
|
|
the main issue i had with the gist AIL was crafts and furnaces not running at all and/or requiring a server restart every time i wanted to run a craft. |
|
@SethGamer1223 Confirmed working, this is ready to merge. No clue what broke it originally either... |


Took me a while but i got it figured out, would love to see some feedback in case i missed something.