Open octylFractal opened 10 years ago
Question, do we want to dispense into non-opaque blocks or just air blocks? I don't know if dispensing into glass is a good idea.
I am not sure, but vanilla dispenser dispenses in glass well.
True. I will leave as is.
The huge difficulty in this is the assumption that IInventoryEX will move it's slot contents on complete, and therefore I can't actually remove any stacks. This is a big code adaption to make.
Since we have ISidedInventory and no longer needed in IInventoryEX, so we need to rewrite most our code anyways to ISidedInventory style.
Okay, will do.
Are we going to try to remove IInventoryEX then?
Yes. Jukebox doesn't supports IInventory, (and ISided Inventories), so i suggest keeping VanillaProvider.Jukebox, rewriting it to ISidedInventory.
Okay, will do.
Did, modifying IInventoryProviders now.
Deprecated IInventoryEX while I rewrite.
Okay, everything has been rewritten to IInventory. There are still problems with the current allocator handling that I am working on fixing now.
I need some time to fully check code, but i have already seen your text about direction and metadata. Metadata of Allocator equal to number of side of allocator's input face.
Oh, much easier to handle then. Will probably take a few hours to rewrite it properly.
I can handle it. What is id of input and output for ISidedInventory.getAccessibleSlotsFromSide()?
For getAccessibleSlotsFromSide you give it a side and it gives you an array of slot ids you can access.
I'll be gone the next few hours, so do what you can.
ok, getAccessibleSlotsFromSide takes integer, which indicates is it input or output, right? The problem is that, I don't know magics for Input and Output
Modified TileEntityAllocator hardly, not only because of modifying to IInventory, but also for refactoring.
getAccessibleSlotsFromSide does not take magics for input/output, just a side.
Got it. applied in f8cfd5d8795828090c0558724402201d05503da3
Let me check it, hold on.
I think our sides are backwards. It's still not following vanilla rules...
Ok, i will test it for bugs now.
Yes, just came to same conclusion testing against furnace.
I have a plan, give me a moment.
Even with fix there, still ignoring extraction rules for some reason.
Also, it moves two stacks at a time, possibly more.
Are you sure? it calls getRandomItemIndexFromContainer only once per transaction.
I am sure. It might be a side effect of something from TileEntityHopper.
Try it with chests.
Is the randomness in the allocator for a reason?
There is a randomness of taking random itemstack from inventory, not more.
I have tested different cases, and allocator takes one stack at time.
Hmm, I always get it with this setup:
(Ignore the dirt block)
Hmm, works for me. Show, please, contents of chests and allocator.
Ah, the grass block IS important. With it there, it happens. Try filling the chest, then putting the block on it and try it. Never mind, it's not happening anymore.
I have an idea, let me check old code...
Nothing bad. Did you mean to say that the bug doesn't happen or that the grass block don't affects allocator?
Bug doesn't happen. Must have fixed it somewhere. shrug
Whoops.
Well. We have a small issue in that we didn't quite get our sides right. Somehow they were half backwards. Or something. I'm trying to patch it up.
Oh my. It looks like our dirvecs don't match Minecraft. Switching to rip-off of ForgeDirection
Okay, for some reason sides work on my special block from my mod, but not on the furnace. I know my block deals it right, so I assume this is not our problem.
Yes, I was right, Furnace only exposes bottom for output slot, not sides.
So, now it's ok, right?
Mostly, however I want to check one last thing.
On Wednesday, March 26, 2014, cdkrot notifications@github.com wrote:
So, now it's ok, right?
Reply to this email directly or view it on GitHubhttps://github.com/cdkrot/Mechanics/issues/3#issuecomment-38686481 .
~Kenzie Togami
Almost done with this, but somethings not letting it take. Might be the assumption that we use hopper directional meta.