Really looking forward to this. There's something really great about being able to just throw all of my stuff out and have it neatly sorted that makes storage tech my favorite tech.
I completely agree, recently finished an all (stackable) item sorter utilizing basic multi sorters and a few bulk tiles, and the ability to just toss in a shulker full of materials or just random items and have all of them perfectly sorted is allowing me to actually get back into building in survival. Also have several farms hooked directly into the sorter which just makes using it even more satisfying. (Accidentally made this way longer than I thought lol)
Mojang should add a suctionless hopper, or a pipe. Still only allowing the transfer of items horizontal and downwards, but being slightly cheaper and much less laggy due to not checking for entities above it.
Made of copper. I will keep advocating for more copper uses. Because jesus christ why is copper SO common but SO useless. It needs a reason to exist, And crafting a large amount of pipes for your pipe line sounds perfect. I’m still mad about copper golems.
@@milokiss8276 Even if it isn't pipes, copper is so useless right now that something has gotta be done. Copper is almost the modern version of what Lapis Lazuli was.
Although Ilmango and Ray(sWorks) have explained hopper operations and I understood it all, that flowchart simplified it so much. Well done. Keep up the great content.
There's few things better than returning from a big mining expedition, filling a chest with valuables and trash, having a hoper suck all of it up to bring it to a system, to then see all of your important items be neatly organized and smelted in different barrels, while the trash being gone forever.
So, if we take that [double chest -> hopper -> double chest] setup, could you essentially create a lag switch? 1) Build an arbitrarily large number of those double chest setups 2) Connect all of the hoppers in the setups with redstone 3) Connect a lever to the redstone, so that all the hoppers can be turned on/off simultaneously I'm not sure what applications this might have (other than trolling servers).
Fantastic vid! I really enjoy how you explained the operations and also covered both the most and least lag friendly layouts. Can't wait to see more of this kinda thing!
Tip for those situations where you need to dump a ton of items downward: Use a sticky piston+observers+dropper setup with two hoppers feeding a downward facing dropper, and place a cobweb right in the dropper's face. Item entities aren't much of an issue since the items automatically stack as they sink through the cobweb, and then you don't even need a drop chute since cobwebs ensure items fall perfectly straight down reliably. Lot less laggy than a ton of single item entities falling or a ton of vertical hoppers.
@@tt54l32v depends on the quantity of items, you can always use a instant-unloader minecart hopper if it's bamboo generator level load, basically collecting and dumping 5 full stacks at a time. If you don't need it that heavy duty, you can always tile more than one piston-dropper setup with the comparator only reading one of the droppers on the end
@@NicoisLOST has to be that way. Imagine a hopper line. If it would be as described in the video, the items would just stack up from the first hopper, into the next and then so on. But items pass through 1 at a time. Other than that, great video!
Seeing that all of that is done every tick per hopper baffles me. I would've expected optimisations based on the connected containers to determine when they become incapable of having items pulled from or pushed into them when a respective flowchart step is reached, which're then reset whenever those containers are interacted with. Feels like it'd skip a HUGE amount of calculations, unless this is one of those really complicated things in the code that you haven't delved into. Really good video! Definitely helps a ton.
You are very underrated and taught me that composters can help the game perform better. Thank you, I subbed, and I hope you get a ton more subs in the future!
The lag part is over-stated most of the time. Okay, a "killer hopper" with two double chests of non-matching items is bad, but the average case is only bad for technical players who already eliminated many other sources of lag. Any loaded mob, and particularly villagers, will by far "out-lag" any small number of hoppers. And once you introduce the Lithium mod into the mix (it makes unlocked hoppers out of range of entities essentially as lag-free as locked hoppers) , or play on a single-player world, hopper lag is nearly inconsequential in all but the most extreme cases.
Personaly, i prefere furnaces over composter. They have only 1 slot a hopper can suck too, but are simplier to made (one source instead of two who are also have to be made) and you can put redstone lines on top of it as a hopper locking line. Furnaces where a source of lag by themself, but that was a thing of the past. After 1.15 or 16, they become lag friendly as long they didn't run or hoppers go into it. But i don't know if it is as kag friendly as composters. It would be nice to Check different container how good they are. Nevertheless, the redstone part is important for me, so i use what i have.
fun fact i found out fairly recently which Really surprised me..... but ill let you take a guess... did you know there is another way to input items into a chest?? other then hopper and minecarthopper? guess now place a dispensor or dropper facing up and but a chest above... place any item activate with redstone, i was so surprised and confused when first saw this but like dam NO one talks about this... i had a friend of a friend that barely plays miencraft show me this cuz he saw it in a really old video as a kid
@@psigreen3864 i wasnt refering to adding it as part of the video I was just interested because a hopper has a input mechanic dispensor and hopper are different and not direct do they have throw out and input mechanic or is it that the chest has a interesting item collecting feature if direct without any gaps
Darn you with the chest minecart! I've been familiar with the flowchart, but the looping part of the container logic was an eye opener to me. Lesson learned: Hoppers bad. Place items in the world and unload with TNT.
at 8:23 the highlighted path for the composter doesn't seem to have a lot more steps than if you left it open with no items over it. Which if i understand correctly would go like this : "find the source inventory -> Not found -> find items entities in pickup area -> no more item entities -> check for conditions of the comparator update -> end" it may be a dumb question but i'd like to understand and not just do it because i saw it. Is it really much less lag friendly than checking for a empty composter making it worth the effort of covering the hoppers or is it only noticeable on large scale farms etc ? That aside really good explanation and visualisation, looking forward to see the next one.
I am no expert, but following the chart having a block with an inventory is one step faster. Which isn't noticeable on a small farm but for large scale farms or just ones that rely on picking up items it is, that's why people recommend using hopper minecarts or this. Fun fact it also works for older versions by using furnaces which is the cheapest equivalent to composters now. Hope I helped (And wasn't wrong)
@@servilleta__6075 thanks for your answer, it makes sense to me so ill take it as right unless someone says it's wrong. also i didn't knew hopper minecarts were a good option i'll try to use more of these.
Entity search is relatively expensive, and an extra bonus with the composter is the single slot isn't even 'real', it is not a tile entity and the contents of that one slot is determined from block state rather than looking through NBT as with real containers. As to the scale question: individually, hopper's cause little 'lag'. You are not going to see any noticeable difference doing this on a small system, the pay off is when you are talking about many hundreds or more hoppers.
@@silnarm thanks for the precisions, I assumed it was something like that but I wanted to have a confirmation from someone more knowledgeable than myself. Didn't know the composter had that unique property at all tho
They should really optimize the hopper code, it would solve so many problems and open so many possibilities on contraptions for non technical people. I honestly never done a huge sorting system only because of lag
Very informative! I'd like to see more deep dives into storage tech. One thing I was sad to see not included in this video was how hoppers interact with entities that have an inventory, such as chest minecarts. Do they also pull from the oldest entity first, like they do with item entities? What about hopper minecarts, are there any differences in their logic? What about the potential for lag when many entities with inventories occupy one hopper's pickup region?
Would be really nice if you explained how hoppers work together. Like how several hoppers facing down move items at double speed and how the lower hopper has priority in a hopper silo. Also, how do hoppers facing down go at double speed if 1 hopper puts the other into cooldown like mentioned in this video? Those are all things I would be really happy to see covered.
The bottom hopper on a silo getting priority comes down to the fact that hoppers pull before they push. So a hopper below another hopper will pull items out before the top hopper can push its items into the chest it's pointed into.
My issue with hoppers is that they are SLOW, moving ONE ITEM at a time. I would like them to move any number of items, from one item to a stack of items at a time.
So if I understand this correctly, a hopper acts somewhat like a diode with it constantly pulling in items and pushing others out. If it stops pulling, there is no push
Not necessarily, if your hopper is filled with carrots, and the container/entity above it is all potatoes, it'll continue pushing until a slot is free to pull in potatoes
I wonder if this can be used as lag machines? Hmmm... Just think about it! An inconspicuous double chest with an innocent hopper down to another even more inconspicuous double chest! It practically writes itself! Say you portion out a few such setups in a lightly furnished base (just enough to avoid suspicion), and do so in multiple bases (to avoid even more suspicion), and viola! A lag machine so we'll hidden that not even the most paranoid of mods will suspect it!
i love sending things to my friends with the 1wt unload-proof 100% reliable 0 gt reset slice-preserving dustless slimeless noiseless variable mixed storage system
I might be mistaken, but I'm pretty sure update order is pulling BEFORE pushing, not the other way around like you said in the vid; That's why storage silos work after all - because lower hopper pulls item before upper hopper is able to push the item to chest. But - other than that, it's a really nice explaination and I think this series will be do amazing job at getting more players to understand and like redstone and storage tech
Yeah this is a common thing. What you are mentioning is the update order between two hoppers, the video focuses on within the hopper itself. For the silo case it only matters which hopper updates first not which event within the hopper. :-]
@@NicoisLOST Oh, in that case now I'm confused! I was so sure every tick game first executes pull action for all hoppers, than push action for all hoppers etc - not all actions per hopper... But it wasn't my knowledge, just only gut feeling; Now that you said it, it makes much more sense (taken how all the other blocks are updated) for game to update hoppers all actions at once. Well, this is why even experienced people should watch basics videos from time to time, thanks for opening my eyes on that topic!
Cant wait for another annual jkm video next year because his knowledge is sooo massive. When it comes to storage tech his vid doesn't even compare to this video. storage tech is really his passion✨✨
Having a stack of double chests with hoppers running into it must be quite laggy when full. Would it be beneficial to use a comparator to check if a chest is full, then lock the hopper running into it?
how to code a hopper in 5 minutes: 1. cast a ray above to see if there is a storage hitbox intersecting the ray 2. make items appear in the hopper 3. cast a ray in way the hopper is facing to see if there is a storage hitbox intersecting the ray 4. funnel items into container
@@noob1noob2real You actually don't need raycasting for detecting containers because minecraft is on a fixed cube grid. This means that every x,y,z coordinate has exactly one block in it. The hopper just asks directly "which block is at my y position +1?" Which is much more efficient than computing a raycast. For detecting entities (which are not fixed to the grid) though, you need something more expensive. The hopper actually uses an invisible collision box above it and gets a list of all entities that collide with that box. This is actually one of the reasons why hoppers are so laggy in large numbers.
there is so possibility of caching hopper data to optimize it but the trade of will be a increase of memory usage. for example when trying to pull or push a item if another of eqaul was already been checked it skips unless the adjancent blocks got updated
Now, are there mods that make hoppers less laggy, for example by: - creating a hash of the hopper's items and comparing it to any containers above and below it so it only has to go through the list if something that might be movable exists - going on an 8 tick cooldown if the push or pull was blocked - checking whether the hopper or the adjacent container had any changes before reattempting a failed push or pull?
This cool, and explains some stuff I've seen. Assuming, rightly, that I'm focused on entity pickup... I need hoppers to ... have fewer pickup options? (I think I will have to test stone types for friction, too.)
I hope for Mojang’s sake that there is also a Map of item types to slots of a block’s inventory. Scanning through an Array a bunch of times is unnecessary.
i mada a storage system using computer craft and i cached every empty slot and item stack in 3 way by Slot ID by Item ID by Chest ID so i could do instant lookups of the entire storage for free slots or not full item stacks instantly i think you could move that concept to hoppers as well that would increse the memory intensity by a lot but decrese the compution needed by a ton
@@user-zu1ix3yq2w *Speed argument* when you ignore the fact that computercraft adds extra delay throught the *lua -> java (cc) -> minectaft inventory api* steps then the diference betwen the minecraft way cycle through each slot and the caching way on a storage system with 20 double chests and 1 double echest input items is: (Time of moving 1 full double chest (input chest) of items (input items) to the storage) Minecraft way: 5 - 30 seconds (Depends on if you catch the right slots early, increses with target inventory size (storage system size)) Chaching: constant 2 seconds
@@user-zu1ix3yq2w *Memory argument* A Default size of a Hashmap is 128 bytes with 16 elements (32 bit vm) so i would guess 256 or 512 bytes extra memory per storage block
If you have all this knowledge on how to make hoppers less laggy, do you have a design using your knowledge for an item sorter that is less laggy than the standard one? Or is it already the most efficient it can be (before Ianxofour eventually posts a video)
To save a little bit of performance, could the hopper not cache the state of the inventories above and below it if they do not allow a push/pull and check if the inventories have changed before attempting again (assuming that the hopper's inventory has also not changed)? Could maybe also be a hash, if generating the hash wouldn't cost more than you save on comparison time. That could potentially cause an issue if two unique inventories have a matching hash, but it's unlikely.
I would kinda want to see the code and how it's optimized because I immediately got some ideas on how to optimize it (especially considering the most popular use cases of hoppers). But I think what we really need is new blocks/components that do less things at the same time. As many suggested it could also give copper more uses.
Thanks for the video! This really cleared some things up. In what situations does the whole hopper situation really ruin everything? Lemme rephrase that: in which situations is it critical? Hoppers are basically only used to transport items, and they do accomplish that well enough. I'm assuming certain systems that have to be fast, precise etc.?
I think the only obvious case is in spigot forks, the optimizations there can mess up things where the game is laggy. Otherwise it just will slow the game down, which isn't good of course... but this only really applies to the extreme cases, hundreds if not thousands of hoppers.
You forgot to mention how hoppers can move items to another hopper below even if it isn't facing down. Also how when this happens it can dispense 2 items every 8 ticks, 1 item to the hopper below and 1 item to the block the hopper actually is facing.
i think copper pipes would solve the lag issues, (also it would be nice for it go up and down unlike the hopper) and with the addition in the next update of auto crafting, i would also like a redstone hopper where you can sort all items instead of just stackable items.
I'm like slightly above noob level when it comes to redstone. One time I built an automatic dripstone farm without a tutorial, and I also made an infinite charcoal farm that recycles the charcoal it creates into the fuel source to cook even more charcoal, I use this machine in servers that have a money economy that I need tons of fuel in, but can't get a lot of it easily. So I just buy logs in /shop and build the machine.
Laggoggles mod renders lag. Useful for finding out which of your hoppers does 100x times the lag it should. Also finds your friend's >9k cows farm if it's within render distance.
saying that the hopper is laggy is like saying that anything that has special functionality is laggy we might as well say that redstone itself is just as laggy they definitely have problems that are fixed with some mods, but for the most part, the lag you experience is usually frame lag rather than TPS or "game" lag
What are the advantages of having water streams over hopper channel for laterally transporting large amounts of items for lag, which is better over short medium and long distances?
Wow thank you gonna add the composter idear too my auto sorter see how much it reducess lag. But quick question would it not just work if you put a solid block ontop of a hopper surly then it will detect it dont need to do a check for pull in this case?
Hopper is one of the best and worst block added into vannila. Best, because it kickstarted the automatization revolution and made so much possible, worst because of how hard impact it has on game performance. One hopper often eats as much resources as 10s other item pipes, in some cases 100. Thats the reason why big hopper sorters are able to gut punch servers to crawl.
now I know why my old Intel Extreme QX6800 started cooking with hoppers! Minecraft evolved enough to make it a hot terd lol.. That CPU was already 4 back in Beta.
oh well, i never knew that chaining chest-hopper-chest-hopper... for a silo is laggier than "daisy-chaining" hoppers underneath each other each pointing sideways to a chest.
How is a composter a “small inventory block”? AFAIK it has no inventory GUI when you click it, but just adds to the bonemeal when you right click it with a carrot or something in your hand. Am I missing something?
is there an application that you can use to easily create such diagrams as shown for the hopper logic ? Or was it custom made in blender or illustrator ?
Really looking forward to this. There's something really great about being able to just throw all of my stuff out and have it neatly sorted that makes storage tech my favorite tech.
Yeah I was always making big storages without any sorting machines and sorting it all manually was pain in the ass.
I completely agree, recently finished an all (stackable) item sorter utilizing basic multi sorters and a few bulk tiles, and the ability to just toss in a shulker full of materials or just random items and have all of them perfectly sorted is allowing me to actually get back into building in survival. Also have several farms hooked directly into the sorter which just makes using it even more satisfying.
(Accidentally made this way longer than I thought lol)
Mojang should add a suctionless hopper, or a pipe. Still only allowing the transfer of items horizontal and downwards, but being slightly cheaper and much less laggy due to not checking for entities above it.
Maybe using some copper instead of iron in the recipe to give another use for copper.
@@magicspell1780 That's brilliant. I love that. Copper pipes. Iron is already used for so much
@@magicspell1780 Right. Copper definitely needs more uses.
Made of copper. I will keep advocating for more copper uses. Because jesus christ why is copper SO common but SO useless. It needs a reason to exist, And crafting a large amount of pipes for your pipe line sounds perfect.
I’m still mad about copper golems.
@@milokiss8276 Even if it isn't pipes, copper is so useless right now that something has gotta be done. Copper is almost the modern version of what Lapis Lazuli was.
Although Ilmango and Ray(sWorks) have explained hopper operations and I understood it all, that flowchart simplified it so much.
Well done.
Keep up the great content.
This is the video that finally made me understand why composters on hoppers reduce lag
Cool video! I enjoy the way you explain things and I'm looking forward to following the storage-tech series :D
😮😮😮😮threefold
Hoppers get anxious and need to be covered up to feel better. Got it.
There's few things better than returning from a big mining expedition, filling a chest with valuables and trash, having a hoper suck all of it up to bring it to a system, to then see all of your important items be neatly organized and smelted in different barrels, while the trash being gone forever.
This is one of the best minecraft youtuber of the era. You definitely deserve more. Keep making great videos! Subbed :)
I never mess with storage systems because there is so much to sort. also you do an amazing explanation on how this stuff works!
Tracing line through the flow chart is a very very good visual aid for efficiency
this is crazy. thank yall for the work. I love in depth explanations about stuff like this and it's good to see every aspect put into graphs as well
the walkthrough of the abstract followed by the flow block diagram is great. really thorough explanation
So, if we take that [double chest -> hopper -> double chest] setup, could you essentially create a lag switch?
1) Build an arbitrarily large number of those double chest setups
2) Connect all of the hoppers in the setups with redstone
3) Connect a lever to the redstone, so that all the hoppers can be turned on/off simultaneously
I'm not sure what applications this might have (other than trolling servers).
It took me five days to reverse engineer the hopper code for my mod Tokenable Furnaces and Storage. This video is very well made.
Fantastic vid! I really enjoy how you explained the operations and also covered both the most and least lag friendly layouts. Can't wait to see more of this kinda thing!
Tip for those situations where you need to dump a ton of items downward: Use a sticky piston+observers+dropper setup with two hoppers feeding a downward facing dropper, and place a cobweb right in the dropper's face. Item entities aren't much of an issue since the items automatically stack as they sink through the cobweb, and then you don't even need a drop chute since cobwebs ensure items fall perfectly straight down reliably. Lot less laggy than a ton of single item entities falling or a ton of vertical hoppers.
You reckon that can keep up with a bedrock portal tick gold farm
@@tt54l32v depends on the quantity of items, you can always use a instant-unloader minecart hopper if it's bamboo generator level load, basically collecting and dumping 5 full stacks at a time. If you don't need it that heavy duty, you can always tile more than one piston-dropper setup with the comparator only reading one of the droppers on the end
Very much thank you for this explanation, now I know why my mansion lags so much. Storage, with double chests and hoppers.
5:09 I think the targeted hopper gets cooldown only when the targeted hopper is empty.
Yes, I think you may be right.
@@NicoisLOST has to be that way. Imagine a hopper line. If it would be as described in the video, the items would just stack up from the first hopper, into the next and then so on. But items pass through 1 at a time. Other than that, great video!
Seeing that all of that is done every tick per hopper baffles me. I would've expected optimisations based on the connected containers to determine when they become incapable of having items pulled from or pushed into them when a respective flowchart step is reached, which're then reset whenever those containers are interacted with. Feels like it'd skip a HUGE amount of calculations, unless this is one of those really complicated things in the code that you haven't delved into.
Really good video! Definitely helps a ton.
That was a great and much needed explanation for those looking to get into storage tech.
"The only block that can do that"
Hopper minecart: i shall be forgotten😢
I know that Minecraft hopper is not a block, but he said item and I'm too lazy to edit
@@LimolaGaminghopper minecarts can't push to chests tho
Super nice video for learning. Thank you!
You are very underrated and taught me that composters can help the game perform better. Thank you, I subbed, and I hope you get a ton more subs in the future!
The lag part is over-stated most of the time. Okay, a "killer hopper" with two double chests of non-matching items is bad, but the average case is only bad for technical players who already eliminated many other sources of lag. Any loaded mob, and particularly villagers, will by far "out-lag" any small number of hoppers.
And once you introduce the Lithium mod into the mix (it makes unlocked hoppers out of range of entities essentially as lag-free as locked hoppers) , or play on a single-player world, hopper lag is nearly inconsequential in all but the most extreme cases.
I am already invested in this series! Good work!
Personaly, i prefere furnaces over composter. They have only 1 slot a hopper can suck too, but are simplier to made (one source instead of two who are also have to be made) and you can put redstone lines on top of it as a hopper locking line.
Furnaces where a source of lag by themself, but that was a thing of the past. After 1.15 or 16, they become lag friendly as long they didn't run or hoppers go into it. But i don't know if it is as kag friendly as composters. It would be nice to Check different container how good they are. Nevertheless, the redstone part is important for me, so i use what i have.
fun fact i found out fairly recently which Really surprised me.....
but ill let you take a guess...
did you know there is another way to input items into a chest??
other then hopper and minecarthopper?
guess now
place a dispensor or dropper facing up and but a chest above...
place any item
activate with redstone, i was so surprised and confused when first saw this but like dam NO one talks about this...
i had a friend of a friend that barely plays miencraft show me this cuz he saw it in a really old video as a kid
it's a good way to do it, but it requires a redstone pulse and the hopper does not. they both have their use cases, for sure
@@psigreen3864 i wasnt refering to adding it as part of the video
I was just interested
because a hopper has a input mechanic
dispensor and hopper are different
and not direct
do they have throw out and input mechanic
or is it that the chest has a interesting item collecting feature if direct without any gaps
Yeah that's also the only way to move items upwards without them being entities of course. Since hoppers only move them downwards and sideways.
"Push and pull events..." Zoom out to Masahiro Sakurai smiling and nodding: "Push and pull, push and pull..."
very interesting, i didnt think hoppers would be polling every frame, you would think they only check if the relevant blocks are updated.
Darn you with the chest minecart! I've been familiar with the flowchart, but the looping part of the container logic was an eye opener to me.
Lesson learned: Hoppers bad. Place items in the world and unload with TNT.
Can you clarify how storage entities (not blocks) fit into this -- I'm looking at minecarts with chests, and the horses/mules/llamas/etc as well.
Once again a good video, clear and well edited, keep it up!
Hoping you continue this series!
hoppers are probably my favorite vanilla block
I knew the hoper was doing all the function from in game experience, not the underlying mass of calculation... Damn Good to know!
great video!! and thanks for all your awesome minecraft content, I really love it!!😊
at 8:23 the highlighted path for the composter doesn't seem to have a lot more steps than if you left it open with no items over it. Which if i understand correctly would go like this :
"find the source inventory -> Not found -> find items entities in pickup area -> no more item entities -> check for conditions of the comparator update -> end"
it may be a dumb question but i'd like to understand and not just do it because i saw it. Is it really much less lag friendly than checking for a empty composter making it worth the effort of covering the hoppers or is it only noticeable on large scale farms etc ?
That aside really good explanation and visualisation, looking forward to see the next one.
I am no expert, but following the chart having a block with an inventory is one step faster.
Which isn't noticeable on a small farm but for large scale farms or just ones that rely on picking up items it is, that's why people recommend using hopper minecarts or this. Fun fact it also works for older versions by using furnaces which is the cheapest equivalent to composters now.
Hope I helped (And wasn't wrong)
@@servilleta__6075 thanks for your answer, it makes sense to me so ill take it as right unless someone says it's wrong. also i didn't knew hopper minecarts were a good option i'll try to use more of these.
Entity search is relatively expensive, and an extra bonus with the composter is the single slot isn't even 'real', it is not a tile entity and the contents of that one slot is determined from block state rather than looking through NBT as with real containers.
As to the scale question: individually, hopper's cause little 'lag'. You are not going to see any noticeable difference doing this on a small system, the pay off is when you are talking about many hundreds or more hoppers.
@@silnarm thanks for the precisions, I assumed it was something like that but I wanted to have a confirmation from someone more knowledgeable than myself. Didn't know the composter had that unique property at all tho
They should really optimize the hopper code, it would solve so many problems and open so many possibilities on contraptions for non technical people. I honestly never done a huge sorting system only because of lag
Great video, simple and easy to understand explanation
thank you soo much for this video, it was very interesting and will deffinitly help reduce the lag on my Minecraft Server that I have
Very informative! I'd like to see more deep dives into storage tech. One thing I was sad to see not included in this video was how hoppers interact with entities that have an inventory, such as chest minecarts. Do they also pull from the oldest entity first, like they do with item entities? What about hopper minecarts, are there any differences in their logic? What about the potential for lag when many entities with inventories occupy one hopper's pickup region?
Would be really nice if you explained how hoppers work together. Like how several hoppers facing down move items at double speed and how the lower hopper has priority in a hopper silo. Also, how do hoppers facing down go at double speed if 1 hopper puts the other into cooldown like mentioned in this video? Those are all things I would be really happy to see covered.
This will come :-]
The bottom hopper on a silo getting priority comes down to the fact that hoppers pull before they push.
So a hopper below another hopper will pull items out before the top hopper can push its items into the chest it's pointed into.
Storage tech is my passion
My issue with hoppers is that they are SLOW, moving ONE ITEM at a time. I would like them to move any number of items, from one item to a stack of items at a time.
Meanwhile, in a galaxy not so far away:
“Storagetech is my passion.”
Nice video. I feel like you missed talking about how hoppers pointing to the side with hoppers below it work.
really pumped for this series
So if I understand this correctly, a hopper acts somewhat like a diode with it constantly pulling in items and pushing others out. If it stops pulling, there is no push
Not necessarily, if your hopper is filled with carrots, and the container/entity above it is all potatoes, it'll continue pushing until a slot is free to pull in potatoes
I wonder if this can be used as lag machines? Hmmm...
Just think about it! An inconspicuous double chest with an innocent hopper down to another even more inconspicuous double chest! It practically writes itself!
Say you portion out a few such setups in a lightly furnished base (just enough to avoid suspicion), and do so in multiple bases (to avoid even more suspicion), and viola! A lag machine so we'll hidden that not even the most paranoid of mods will suspect it!
So do a vertical hopper line, with every other hopper disable reduce lag.
i love sending things to my friends with the 1wt unload-proof 100% reliable 0 gt reset slice-preserving dustless slimeless noiseless variable mixed storage system
I might be mistaken, but I'm pretty sure update order is pulling BEFORE pushing, not the other way around like you said in the vid;
That's why storage silos work after all - because lower hopper pulls item before upper hopper is able to push the item to chest.
But - other than that, it's a really nice explaination and I think this series will be do amazing job at getting more players to understand and like redstone and storage tech
Yeah this is a common thing. What you are mentioning is the update order between two hoppers, the video focuses on within the hopper itself. For the silo case it only matters which hopper updates first not which event within the hopper. :-]
@@NicoisLOST Oh, in that case now I'm confused! I was so sure every tick game first executes pull action for all hoppers, than push action for all hoppers etc - not all actions per hopper... But it wasn't my knowledge, just only gut feeling;
Now that you said it, it makes much more sense (taken how all the other blocks are updated) for game to update hoppers all actions at once.
Well, this is why even experienced people should watch basics videos from time to time, thanks for opening my eyes on that topic!
Glad to help :-]. Join the discord if you want to discuss more, happy to dig more into it.
Pro
Oooh a whole series!
I'd like to troll a bit: the command block is the most complicated block....
Im still excited to watch tho :)
"Storage tech is my passion" -Nico
i didnt know why people put composters above ther hoppers, now i know that its reduses lag. nice simple video about difficult topic.
Cant wait for another annual jkm video next year because his knowledge is sooo massive. When it comes to storage tech his vid doesn't even compare to this video. storage tech is really his passion✨✨
so THATS why i need 7 composters for my item sorter for my piglin farm
Having a stack of double chests with hoppers running into it must be quite laggy when full. Would it be beneficial to use a comparator to check if a chest is full, then lock the hopper running into it?
how to code a hopper in 5 minutes:
1. cast a ray above to see if there is a storage hitbox intersecting the ray
2. make items appear in the hopper
3. cast a ray in way the hopper is facing to see if there is a storage hitbox intersecting the ray
4. funnel items into container
would be kind of amazing if you even had to cast a ray though
@@user-zu1ix3yq2w then explain to me how block detection works if you’re so smart
@@noob1noob2real I don't think you understood my comment. Get the fk out of here.
@@noob1noob2real You actually don't need raycasting for detecting containers because minecraft is on a fixed cube grid. This means that every x,y,z coordinate has exactly one block in it. The hopper just asks directly "which block is at my y position +1?" Which is much more efficient than computing a raycast.
For detecting entities (which are not fixed to the grid) though, you need something more expensive. The hopper actually uses an invisible collision box above it and gets a list of all entities that collide with that box. This is actually one of the reasons why hoppers are so laggy in large numbers.
@@lunafoxfire if theres a grid then explain slabs
there is so possibility of caching hopper data to optimize it but the trade of will be a increase of memory usage.
for example when trying to pull or push a item if another of eqaul was already been checked it skips unless the adjancent blocks got updated
Completely forgot you had a UA-cam and got surprised when I recognized Emdy in this video.
Now, are there mods that make hoppers less laggy, for example by:
- creating a hash of the hopper's items and comparing it to any containers above and below it so it only has to go through the list if something that might be movable exists
- going on an 8 tick cooldown if the push or pull was blocked
- checking whether the hopper or the adjacent container had any changes before reattempting a failed push or pull?
This cool, and explains some stuff I've seen. Assuming, rightly, that I'm focused on entity pickup... I need hoppers to ... have fewer pickup options? (I think I will have to test stone types for friction, too.)
I hope for Mojang’s sake that there is also a Map of item types to slots of a block’s inventory. Scanning through an Array a bunch of times is unnecessary.
looking at the pull/push phases, no wonder why its laggy
One of the reasons i prefer modded so much, i can entirely ignore hoopers sinxe pipes are just better and cheaper
i mada a storage system using computer craft and i cached every empty slot and item stack in 3 way by Slot ID by Item ID by Chest ID so i could do instant lookups of the entire storage for free slots or not full item stacks instantly i think you could move that concept to hoppers as well
that would increse the memory intensity by a lot
but decrese the compution needed by a ton
How much is a "lot"? Maybe caching would be the bigger issue.
@@user-zu1ix3yq2w
*Speed argument*
when you ignore the fact that computercraft adds extra delay throught the *lua -> java (cc) -> minectaft inventory api* steps then the diference betwen the minecraft way cycle through each slot and the caching way on a storage system with 20 double chests and 1 double echest input items is:
(Time of moving 1 full double chest (input chest) of items (input items) to the storage)
Minecraft way: 5 - 30 seconds
(Depends on if you catch the right slots early, increses with target inventory size (storage system size))
Chaching: constant 2 seconds
@@user-zu1ix3yq2w
*Memory argument*
A Default size of a Hashmap is 128 bytes with 16 elements (32 bit vm) so i would guess 256 or 512 bytes extra memory per storage block
If you have all this knowledge on how to make hoppers less laggy, do you have a design using your knowledge for an item sorter that is less laggy than the standard one? Or is it already the most efficient it can be (before Ianxofour eventually posts a video)
Going back to this vid, just to say that decorated pots might be more efficient than composters on top of hopper, since it's only one slot
To save a little bit of performance, could the hopper not cache the state of the inventories above and below it if they do not allow a push/pull and check if the inventories have changed before attempting again (assuming that the hopper's inventory has also not changed)? Could maybe also be a hash, if generating the hash wouldn't cost more than you save on comparison time. That could potentially cause an issue if two unique inventories have a matching hash, but it's unlikely.
I would kinda want to see the code and how it's optimized because I immediately got some ideas on how to optimize it (especially considering the most popular use cases of hoppers). But I think what we really need is new blocks/components that do less things at the same time. As many suggested it could also give copper more uses.
Thanks for the video! This really cleared some things up.
In what situations does the whole hopper situation really ruin everything? Lemme rephrase that: in which situations is it critical?
Hoppers are basically only used to transport items, and they do accomplish that well enough. I'm assuming certain systems that have to be fast, precise etc.?
I think the only obvious case is in spigot forks, the optimizations there can mess up things where the game is laggy. Otherwise it just will slow the game down, which isn't good of course... but this only really applies to the extreme cases, hundreds if not thousands of hoppers.
You forgot to mention how hoppers can move items to another hopper below even if it isn't facing down. Also how when this happens it can dispense 2 items every 8 ticks, 1 item to the hopper below and 1 item to the block the hopper actually is facing.
This is because of the hopper below's "pull" operation, which was covered in the video.
i think copper pipes would solve the lag issues, (also it would be nice for it go up and down unlike the hopper) and with the addition in the next update of auto crafting, i would also like a redstone hopper where you can sort all items instead of just stackable items.
I'm like slightly above noob level when it comes to redstone. One time I built an automatic dripstone farm without a tutorial, and I also made an infinite charcoal farm that recycles the charcoal it creates into the fuel source to cook even more charcoal, I use this machine in servers that have a money economy that I need tons of fuel in, but can't get a lot of it easily. So I just buy logs in /shop and build the machine.
Applied Energistics mod: Look What They Need to Mimic a Fraction of Our Power.
god tier explanation video
Laggoggles mod renders lag. Useful for finding out which of your hoppers does 100x times the lag it should.
Also finds your friend's >9k cows farm if it's within render distance.
"Hoppers. They suck."
saying that the hopper is laggy is like saying that anything that has special functionality is laggy
we might as well say that redstone itself is just as laggy
they definitely have problems that are fixed with some mods, but for the most part, the lag you experience is usually frame lag rather than TPS or "game" lag
What are the advantages of having water streams over hopper channel for laterally transporting large amounts of items for lag, which is better over short medium and long distances?
Wow thank you gonna add the composter idear too my auto sorter see how much it reducess lag.
But quick question would it not just work if you put a solid block ontop of a hopper surly then it will detect it dont need to do a check for pull in this case?
Awesome vid, keep up the good work!
How big is the difference between using furnaces and using composters?
Hopper is one of the best and worst block added into vannila. Best, because it kickstarted the automatization revolution and made so much possible, worst because of how hard impact it has on game performance. One hopper often eats as much resources as 10s other item pipes, in some cases 100. Thats the reason why big hopper sorters are able to gut punch servers to crawl.
now I know why my old Intel Extreme QX6800 started cooking with hoppers! Minecraft evolved enough to make it a hot terd lol.. That CPU was already 4 back in Beta.
This is gonna be a kewl series idk jack abt storage
oh well, i never knew that chaining chest-hopper-chest-hopper... for a silo is laggier than "daisy-chaining" hoppers underneath each other each pointing sideways to a chest.
I am going to troll people with this information or build an insane storage device, hard to tell.
they should split up the hopper into 4 seperate blocks in my opinion
still one of my favorite technical minecraft youtubers
since the push hape before the pull, in your eample you puhed the last coal, would it then pull cobblestone as the coal slot would now be empty?
This is really great as always
Storage tech is his passion
The composter thing was actually nice to know i knew it redices lag but fidnt know the reason for it
How is a composter a “small inventory block”?
AFAIK it has no inventory GUI when you click it, but just adds to the bonemeal when you right click it with a carrot or something in your hand.
Am I missing something?
Doesn't need a GUI to have an inventory
pls continue with this
Mojang could easily make hoppers more efficient using a method similar to Google's Regex optimizations.
is there an application that you can use to easily create such diagrams as shown for the hopper logic ? Or was it custom made in blender or illustrator ?
Custom in illustrator and animated with after effects.