Page 1 of 1

[mod] Hopper with hopper sorter [wip][hopper]

PostPosted: Fri Mar 17, 2017 13:20
by burli
This is a fork of the hopper mod from jordan4ibanez. I modified the original code. My hopper mod node timer instead of ABM and I reduced the code size.

I also add a new node: the sorter. He can sort up to 8 items out of a transport chain

Github: https://github.com/MarkuBu/Hoppers
Download: https://github.com/MarkuBu/Hoppers/archive/master.zip

Video: https://youtu.be/Qh0CUqHoZIM

I changed the range of the hopper. Now the hopper can be covered with a solid node
Hidden Hopper: https://youtu.be/s1dkRwZJUtg

The hopper below the chest pulls the items out of the chest. The sorter below the hopper gets the items and compares them with the items placed in the filter row. If they match the sorter moves them into the main inventory where it can pulled out by the hopper below. If the items don't match they will moved to the output inventory where they can be pulled by the next sorter. An empty filter means that all items get moved to the main inventory. Following hoppers won't get items

The sorter only work in one direction. Sorter have an input and an output (need to improve the nodebox or texture to visualize that). It is not possible to split the stream.

The feeding hopper can be placed on top or side of the first sorter

Image

Image

The top row of the inventory is for the filter. Just place one node or item into that row. These nodes will be moved in the sorter inventory and can be fetched by the hopper below and stored in the chest. Any other node/item will be moved to the next sorter. The last sorter should have no items in the filter

Image

Re: How can I make a hopper chain and chests with item filte

PostPosted: Fri Mar 17, 2017 16:58
by burli
This is the idea of my storage system. You can drop everything you found in a single chest in your living room. A hopper moves all items in the sorter chain. Each sorter can sort out up to 8 items and place them in his own inventory. All other items will be moved to the next sorter.

The first sorter can filter fuel items like coal lump. They will be moved to the furnace. In the second sorter you can have items to melt or cook. The output of the furnace is moved to a second sorter chain where you can sort for ingots, cooked food and so on.

This system is simple, but that's what I want

This is my "test house"

Image

Re: [mod] Hopper Sorter [wip]

PostPosted: Sat Mar 18, 2017 07:56
by TenPlus1
Nice feature :)

Re: [mod] Hopper Sorter [wip]

PostPosted: Sat Mar 18, 2017 10:26
by burli
TenPlus1 wrote:Nice feature :)

Thanks.

I add a video link to my first post with the sorter in action.

Re: [mod] Hopper with hopper sorter [wip][hopper]

PostPosted: Sat Mar 18, 2017 11:39
by azekill_DIABLO
very useful!

Re: [mod] Hopper with hopper sorter [wip][hopper]

PostPosted: Sat Mar 18, 2017 12:02
by burli
Add a download link to the first post. Feel free to test and report bugs. Still wip!!

Re: [mod] Hopper with hopper sorter [wip][hopper]

PostPosted: Sun Mar 19, 2017 21:15
by burli
Add some new infos, new screenshots and a new video link to the first post

I want to reduce the inventory size of the hopper and sorter because they are no storage. The inventory is only a buffer. I reduce the hopper inventory to 5 and the main and output inventory of the sorter to 3

Re: [mod] Hopper with hopper sorter [wip][hopper]

PostPosted: Mon Mar 20, 2017 10:50
by burli
Changed texture and nodebox model

Image

Re: [mod] Hopper with hopper sorter [wip][hopper]

PostPosted: Mon Mar 20, 2017 16:17
by azekill_DIABLO
hey that cool!

Re: [mod] Hopper with hopper sorter [wip][hopper]

PostPosted: Mon Mar 20, 2017 20:55
by burli
In this video I show a new update to the sorter. If the main stack is full, the sorter forwards the items to the output stack. So you can make for example a fuel loading chain.

The only disadvantage is, that you need a lot of fuel, but you can use everything as fuel you want, e.g. grass or leaves

https://youtu.be/2ZEOzUDPz1I

Re: [mod] Hopper with hopper sorter [wip][hopper]

PostPosted: Mon Mar 20, 2017 22:39
by burli
As a bonus I doubled the speed of the hopper and sorter. But they will be more expensive. Because they are some kind of machine they need energy, in this case from a Mese crystal.

I also think about a duct to move the items forward, a compressor to compress nine items into a block, a decompressor to decompress blocks on player request and a splitter to split a stream into two with a similar filter like the sorter.

Maybe I will copy the idea of the autocrafter from pipeworks, but in a slightly different form. Maybe I use this instead of the compressor to produce blocks (or the compressor is cheaper and/or faster than the autocrafter). With this autocrafter you can quickly build simple production machines (I think this is the same idea of pipeworks)

So it will be a little bit like pipeworks, but simpler and I think more efficient and specialized for storage (no fluid transport)

Re: [mod] Hopper with hopper sorter [wip][hopper]

PostPosted: Tue Mar 21, 2017 07:23
by burli
I pushed the current version to Github and add a direct download link to the first post

Re: [mod] Hopper with hopper sorter [wip][hopper]

PostPosted: Tue Mar 21, 2017 10:38
by burli
Maybe it's time to rename the mod because it becomes a completely different function than the original hopper mod. Any suggestions?

Maybe something like "Simpel Factory"

Re: [mod] Hopper with hopper sorter [wip][hopper]

PostPosted: Tue Mar 21, 2017 10:55
by texmex
Note that there's the newer hopper version by FaceDeer as well, with an API, chutes and so on. Check https://github.com/minetest-mods/hopper

Re: [mod] Hopper with hopper sorter [wip][hopper]

PostPosted: Tue Mar 21, 2017 11:39
by TenPlus1
Heh, so far we have 4 hopper mods, jordan's original which I recoded and added an api, facedeer's recode which adds chutes and burli's which adds sorting tubes :)

Re: [mod] Hopper with hopper sorter [wip][hopper]

PostPosted: Tue Mar 21, 2017 12:45
by burli
Well, my original intention for this mod was to learn more about formspecs, inventories and a few other things. Didn't expect that it will become bigger. And I didn't know that there are other hopper mods. Just found jordan's original.

But you rewrite still uses ABM's. My version is completely rewritten at this point and uses node timers. And as I mentioned I want to add more functions, but I think about to split everything in into mods plus an common API, but I'm not sure

Planned items currently are: hopper, sorter, duct, compressor, crafter, maybe some kind of storage container, maybe some kind of dispenser and everything that might be useful for a storage system. I don't want to add some kind of liquid transport, automated mining or building

Re: [mod] Hopper with hopper sorter [wip][hopper]

PostPosted: Tue Mar 21, 2017 13:01
by TenPlus1
My own hopper mod and Facedeer's uses a common api if you wanna somehow use that for compatibility :) also remember technic has an autocrafter which can be used to compress/craft/etc. if we add a main and output inventory for the hoppers to use :)

Re: [mod] Hopper with hopper sorter [wip][hopper]

PostPosted: Tue Mar 21, 2017 13:41
by burli
I'll take a look at your API, but because I have my own hopper it is not really necessary. I also think about compatibility to other mods, especially to mesecons. Connections to pipeworks and technic will be done by special nodes.

But the main goal of my mod is to be lightweight and to work stand alone

Re: [mod] Hopper with hopper sorter [wip][hopper]

PostPosted: Tue Mar 21, 2017 15:29
by burli
TenPlus1 wrote:My own hopper mod and Facedeer's uses a common api if you wanna somehow use that for compatibility :)

Well, maybe I will fork your hopper mod and rewrite it. But I have some different ideas that makes it more or less incompatible or at least useless to combine the mods. Maybe I just steel some ideas ;-). I have to think about that.

And maybe I rename my mod to "Hopper Factory"

Re: [mod] Hopper with hopper sorter [wip][hopper]

PostPosted: Mon Mar 27, 2017 01:02
by FaceDeer
I also went the node-timer route with my rewrite, so my version might have some code compatibility with yours.

I hope you don't mind, but I'm going to see if I can implement your sorters in my fork too. The joys of open source and all that. :) It seems like a good feature that'll greatly increase the versatility of these things.

I pulled an auto-crafting bench out of the Castle mod when I recently disintegrated it into a modpack, but the code looked a bit old and creaky so I don't know if you'll find it a useful starting point. here it is..

Re: [mod] Hopper with hopper sorter [wip][hopper]

PostPosted: Mon Mar 27, 2017 06:39
by burli
Feel free to implement the sorter. I think I'll pause this mod for another project. Maybe I contribute to your version if needed

Re: [mod] Hopper with hopper sorter [wip][hopper]

PostPosted: Tue Mar 28, 2017 07:00
by FaceDeer
Actually, I misremembered - my version still uses an ABM for the central item-transfer functionality. Looks like implementing your sorters in my fork will take a bit more work than I expected. Still taking a stab at it, though.

Edit: I've finished implementing a sorter in the minetest-mods hopper fork. I wound up reimplementing it from the ground up to take advantage of some of the other utility code I'd written earlier, so it behaves a bit differently from your version. Hope it's useful!