lassevk/DropChest — comment on commit 200bbe49ae3ac4476ffd12d4108791e8d382ed08
File:  line 0
By lassevk:

Ok, there seems to be two things you're referring to here.

First, push/pull is indeed not working. I tested it now by setting up two chests, one with a push filter for cobblestone, the other with a pull filter for cobblestone. Loaded up the first chest with lots of things, including cobblestone. Then I set a looping powered rail between the two, and a cart-with-chest on it, and started it, it now passes by both chests.

Nothing happened, as you said, so I will investigate this.

As for the suck filter being slow, this I can't reproduce.

Basically the algorithm is as follows:

1. For every floating item in the world
2. For every chest with a SUCK filter
3. Check if the item can be put, partially (like filling up a stack in the chest) or completely into that chest
4. If we get here, and there is still more left in the item stack (ie. nothing or not all has been dropped into chests), go through all chests without a SUCK filter
5. Check the item against those chests

Now, if an item survives all of this, ie. is still in the world, it means that:

1. Either there is no chest in range of the item
2. All chests in range are either filtered to not suck that item, or are full

So those items I put into a short list, with a counter of 1. The next time I check all the items in the world, if the item is on that short list, I increase the counter. This is done to increase performance. Chances are that if an item is out of range or all chests nearby are full on one tick, it's the same state on the next, so avoid all the heavy processing of the item for a short while.

Once the item has been in that short list for a while, the counter has reached a certain threshold, and the item is removed from the list, and on the next tick again processed fully.

This means that you should see the following behavior:

1. Add a SUCK chest, leave it empty
2. Add another chest (not a dropchest), fill it with items
3. Break the chest full of items
4. All the items inside will pop out into the world, and almost immediately disappear into the SUCK chest

However, if the SUCK chest is full, you'll start seeing this behavior:

1. One or more of the items disappear from the world, but not all
2. Over the course of a few seconds, the same thing as in 1. should occur
3. Eventually (we're talking seconds here), all the items that fit into a nearby chest should be removed from the world

If you see otherwise, can you describe the situation?

Vennlig hilsen

Lasse Vgsther Karlsen
lasse@vkarlsen.no

On 27. jan. 2012, at 17:09, sorklin wrote:

> It simply doesn't work. Also we noticed that the suck was delayed, it would take a good amount of time to actually suck the items. I didn't test it rigorously, just an observation.
>
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/lassevk/DropChest/commit/200bbe49ae3ac4476ffd12d4108791e8d382ed08#commitcomment-908593