Page 1 of 1

[IMPLEMENTED] Change hopper-check in spigot.yml to zero

Posted: Sun Nov 24, 2013 12:45 pm
by eah
If any have noticed, some integrated hopper-redstone circuits don't work quite the same on MineRealm as they do in vanilla MC. Automatic smelters may not work properly, automatic potion brewers may act weird, and automatic item shops may suffer. This is all for good reason. MineRealm implements a popular and cleverly modded craftbukkit server called spigot. It's the same mod that makes your item entities merge and the same mod that rids us of x-rayers. Some of the modifications do nothing but help the server, but some are questionable. The modification I'm particularly interested in is that which changes hopper timings.

Spigot allows server admins to change two values of hopper timings. One is hopper-transfer. At a default value of 8, hoppers behave as they should. Putting it lower allows items to move the hoppers quicker and higher makes it slower.

The other variable is hopper-check. This value is called when a hopper is asked to push or pull and it either has no items to push or pull or if it is powered by redstone (being prevented from working). When a hopper meets these conditions in a tick, its cooldown counter is set to the value of hopper-check (a spigot default value of 8) and decrements on each tick. When it reaches zero, the hopper tries to push or pull (if it can) and if it does, sets the cooldown to hopper-transfer. If you understand this well enough, you'll know that getting hoppers to act in a consistent manner is difficult or impossible. Furthermore, vanilla minecraft essentially does not have a hopper-check variable (equivalent to being zero). Building a hopper machine in SP and finding it doesn't work on minerealm is frustrating and discouraging.

But you ask, why did spigot change hopper timings in the first place? The answer is to reduce lag. You can no doubt imagine that with many hoppers being used to move items around and with each hopper doing things each tick, they will most definitely be a major source of lag. But I would argue changing hopper-check from 8 to 0 would not create any considerable lag. Hoppers will still receive updates every tick. Spigot only attempts to shorten the processing time in these updates when a hopper is idle. However, the vanilla code already has if statements to check whether an update should proceed. When a hopper is powered, it will not proceed to update. When there is no inventory to push to, a hopper will not proceed in pushing items.
Spoiler:
https://github.com/SpigotMC/Spigot-Serv ... opper.java contains the code spigot runs on each hopper each tick. Specifically, the h() method is the root method run each tick.
TL;DR: I want to change hoppers so they act like they should, but this could lower the TPS. If it does, I would agree to changing it back.

Re: [Suggestion] Change hopper-check in spigot.yml to zero

Posted: Sun Nov 24, 2013 1:11 pm
by Grelman
+1 I'd love to give this a shot, so we can have autoshops that vanilla is truly capable of. Along with this also helping other machines on the server to work properly. It may affect TPS but its worth just testing out IMO.

Re: [Suggestion] Change hopper-check in spigot.yml to zero

Posted: Sun Nov 24, 2013 6:10 pm
by river33
For sure +1. I would love to be able to get an auto sorter/smelter going for my bank. Would make EVERYTHING so much easier. Good suggestion. :)

Re: [Suggestion] Change hopper-check in spigot.yml to zero

Posted: Sun Nov 24, 2013 9:27 pm
by Bu1ld0g
+1 for at the least a testing phase.

Re: [Suggestion] Change hopper-check in spigot.yml to zero

Posted: Mon Nov 25, 2013 3:51 am
by Nephalem
Implement!
Does it Lag?
- Yes: Go back.
- No: Good.

Re: [Suggestion] Change hopper-check in spigot.yml to zero

Posted: Mon Nov 25, 2013 8:32 pm
by Rip_void
I don't get people who vote "no" then do not provide a reason as to why. They do not want to benefit from this great idea??

Re: [Suggestion] Change hopper-check in spigot.yml to zero

Posted: Mon Nov 25, 2013 9:30 pm
by Bu1ld0g
Rip_void wrote:I don't get people who vote "no" then do not provide a reason as to why. They do not want to benefit from this great idea??

If it doesn't benefit them, they don't want it.
So either forum trolls or people that don't use/understand rs circuitry.

Re: [ACCEPTED] Change hopper-check in spigot.yml to zero

Posted: Tue Nov 26, 2013 9:23 pm
by Bu1ld0g
Yay it was accepted.
Do we have an ETA or has it already been implemented?

Re: [ACCEPTED] Change hopper-check in spigot.yml to zero

Posted: Thu Nov 28, 2013 5:17 pm
by eah
Bu1ld0g wrote:Yay it was accepted.
Do we have an ETA or has it already been implemented?
There's now a machine on the realm at 25, -125 that tells you if it's been implemented. It's actually… not perfect. For example, it might say it has been implemented if hopper-check is changed to 6 or 7, but we assume Intelli won't troll us like that. :)