Closed SDUBZ closed 5 years ago
Stockpile apparently does not implement getInvAvailableSlots()
, meaning Tubular doesn't know where to insert, thus inserting at a default inventory slot. I should probably just make it not work in such cases, but still, from my understanding, this should be fixed in Stockpile's SidedInventory implementation.
Thanks for the technical info. This should indeed be fixed in Stockpile. I've had trouble with the LibBlockAttributes wrapper I delegate Inventory to because, well, I'm kind of abusing it to get the result I want. I'll see if I can come up with something cleaner as soon as I get the chance.
After further investigation it seems like somehow the filter option in Tubular is broken as of last release. How this got past testing is beyond me.
Put this on hold for now as I try to fix this.
Will do, good luck and keep me updated if there's anything I should do on my part to make things easier.
thank you guys for all your hard work i appreciate so much :D
Quick update, I'm still working on Tubular but there were a lot of things happening lately so I didn't get much done. This should be fixed or better debugged soon.
Rewrite finished, though LibGUI version update was necessary and I had to update to 19w36a. As such, I can't really fix this right now.
Whenever 1.15 is released and we both update to it, it'll be fixed. I don't really feel like bothering the LibGUI guys with backporting new features to 1.14 just for Tubular.
oh so i gotta wait until 1.15 :(
Nevermind; backported to 1.14.4 successfully, working on this. Seems to be a weird issue though.
@branchpanic why does getInvStack()
of FixedMassItemInv
return ItemStack.EMPTY
if accessing the inbound slot?
Given it gives me such slot as available for insertion, I need to know what it contains - otherwise the system tries to insert X in a slot with Y.
This is kind of a weird workaround for hoppers so bear with me. I had something that I thought was a bit more sensible before but just couldn't get it to work within the last stack of capacity so I settled on the following. I hope this makes sense because I'm really tired right now but that doesn't stop me from responding to issues.
The inbound slot stays empty so hoppers don't try to mess with it. If I recall correctly, they directly increment stack counts, which I couldn't figure out how to observe. But I noticed that some additional checks were done if the destination slot was formerly empty, so I figured the next best plan of action was to always make the input slot empty so I could have more control over whether or not I'd accept an item into it.
When checking item validity, the intention was for isItemValidForSlot
and/or getMaxAmount
to be used for checking whether or not and how much of an item can be inserted. As the free space in a barrel decreases to below its max stack size, so does the output of getMaxAmount
for a valid item in the input slot. If your implementation allows it, maybe you could use these methods to check if you can insert?
I guess the problem with these is that they're as effective as signs in front of a bank that say "please don't rob this bank." Ideally the impossible state would be unrepresentable but I can't figure out how to achieve that when gluing my already-sketchy API code to Minecraft code via LBA.
I wish I could come up with a better solution (and hell, work on new features) but I only seem to have time when there's some other major bug to fix. If you have suggestions I'm open to a better solution because trust me I want one.
Ouch, I see it now. I'll see if there's anything I can do tomorrow.
I'll be fair, that tomorrow has been taking quite a while, though I am still working on a similar thing - in specific, Buffer, whose aim is to expose a single stack and keep the rest in an internal buffer of a special inventory type. It's been quite a ride so far given I, to say the least, suck at this right now.
That's awesome! You're of course free to reference any of Stockpile's code if it helps in any way. FWIW I've been considering relicensing as public domain by major version 2 or something like that since I clearly don't have enough time to maintain it.
Also if you ever separate out your new inventory code into a library or something like that I'd be happy to contribute to it and/or use it for Stockpile. I think having a consistent abstraction for buffer/mass storage inventories would be beneficial so mods that aren't dedicated to storage can get creative with them. All in all i suck at this too so don't worry about it 😉
It's been a while!
Buffer has been released and seems to be working relatively well aside an issue with voiding that I'll solve whenever I finish my GUI library,
I have discontinued Tubular because I've learned a lot since then and can probably make it work much better, so don't worry about this issue anymore.
@vini2003 why you stop work on something like logistical pipes :O
Glad things have gone well and good luck with Buffer! I'll close this issue now since it seems like we've figured everything out.
log: http://puu.sh/E6XOL/36d059da34.log