-
Notifications
You must be signed in to change notification settings - Fork 305
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
Add support for VoidProtection of Items to MultiSmelter #3650
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This "void protection" doesnt provide void protection. It will void stuffs if output bus is about to be full; it only provide protection when output bus is full already.
@HoleFish I did not manage to reproduce any voiding of materials, but I've noticed I missed a miss calculation of remaining cost, which would make it do 32x stone then 15x stone then 15x glass (3 steps), instead of 32x stone then 15 stone and 15x glass (2 steps), I'll push this fix, but I would gladly like if you could tell me how did you void items 🙏 In my setup, I'm using a LV energy hatch with Nichrome Coil Blocks, with 1 input hatch and 1 output hatch, but I've also tried with 2 output hatches. |
2 random types of smeltable item in input bus and a ULV output bus. Multismelter reasonably start processing and void one of them with this void protection enabled |
@HoleFish Alright, I noticed I was only trying with same item slot voiding kind (test 2 -> 5), and now I fixed the case of test 1 which is yours (somehow did not happen to me to test this situation, sorry). I've put down all the tests I've been doing to be sure I did not forget about another situation Context: Basic Multi Smelter with a LV Energy Hatch and Nichrome Coil Blocks, with 1 input and 1 output bus and I smelt sand and cobblestone to have two types of output. Test 1 - 2 Items with one slot (HoleFish's test)
Process
Test 2 - Simple one output
Process
Test 3 - Non-stack output available
Process
Test 4 - Testing normal functioning with multiple recipes
Process
Test 5 - Testing non-stack with multiple recipes
Process
|
Current known issues:
Everything working well now ✅ |
Allow the helper to calculate with items given as if they were already in the output buses, without having to move them in such bus to be able to perform a check
Use the new virtual item outputs in bus hability
Ended up adding the ability to the Seems to be the more fitting solution and can be used in the future by any other machine requiring it |
2 stacks of sand, ULV output bus |
As it it would be so simple to implement virtual stacks output to VoidProtectionHelper, fixed that and did all my 5 tests listed above, all working 👍 (in both normal and batch mode) |
Stocking input bus, 192 random ores + infinite sand, LV output bus |
Ready for another checkup 👍 |
int maxParallelForOutput = remainingCost; | ||
|
||
// Initialize void protection for the current output | ||
if (protectsExcessItem()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still suggest you move this void protection part and merge into Calculate parallel
part, so that subtick energy cost will be correct
@Worive any news? |
Sorry I only talked about it on discord, forgot to mention it here too: I apologize, but I don't feel like I'm able to finish this task, just looking at the code regarding what is left to fix simply bricks my mind and prevents me from thinking further. I would greatly appreciate it if someone with more experience could finish what is left of it and explain their thinking while doing it 🙏 Wish I could have finished this task by myself 😞 |
@HoleFish can you help here ? |
I may lack context as I'm an early LV player, so I'll describe quickly what I've done (to be sure I'm missing nothing):
For each possible recipe, I'll check the max possible parallel according to the
VoidProtectionHelper
, and limit them according to it. If after checking each recipe I end up with an empty output (so everything at 0 parallel), I assume it's because there's not enough space.Close GTNewHorizons/GT-New-Horizons-Modpack#17086