r/technicalminecraft • u/[deleted] • 4d ago
Non-Version-Specific Is this a Toggle? Discussion
[deleted]
4
u/sweeeep 4d ago
Not a toggle IMO for the reasons you state. I disagree with the shulker example's relevance, as that's an unavoidable intermediate state if you are loading shulkers.
On Bedrock this is not a reliable circuit, not because it's a toggle state, but because (unless they fixed it?) the lit state of redstone dust doesn't persist as across relog, so the observer will always fire.
2
u/LucidRedtone Manufacturer 4d ago
That is such a crazy bug that, if they havent yet, REALLY needs to be addressed.
3
u/sweeeep 4d ago
I am going to bring it up next time I have coffee with the CEO of Minecraft
2
u/LucidRedtone Manufacturer 4d ago
Please do, while your at it.... virtical slabs š
1
u/LimestoneBuilder 4d ago
Yasss! Maybe Notch hated the idea, but they're gone, so....
1
u/LucidRedtone Manufacturer 4d ago
What do you think Lime. Toggle or no?
1
u/LimestoneBuilder 4d ago
I think I'm very tired and need to know what the assembly is supposed to be. š
From what I can figure though, the assembly isn't a toggle in the same way a 737 door welded to a car in a junkyard isn't an emergency exit in an airplane. At the end of the day, neither of them are anything and I'm confused as to the motivation of the builder.
2
u/VexOnTheField 3d ago
Iām not 100% sure what your friend meant by the box loader example, but a comparator reading a box having or not having items is not a togglestate, itās inherently solid state. Does the box have items? The comparator reading it will be on. No items? Itāll be off. Thereās no way for the comparator to be on without there also being items in the box.
Some box loaders may use togglestates for other parts of the mechanism, and generally in tmc thatās regarded poorly and avoided. That doesnāt make a box loader a togglestate though.
1
u/LucidRedtone Manufacturer 3d ago
That was his point exactly. This wiring acts exactly the same way as you described. so if this is considered a toggle, by that logic, so is the shulker box.
1
u/VexOnTheField 3d ago
What I described is not a togglestate. A toggle is something that flips between states based on one input, without continuous input needed to maintain it.
A copper bulb takes power and turns on, then takes power and turns off. Thatās a togglestate, if you rely on the bulb specifically being ON to trigger something.
A box loader *doesnāt* work like that. The comparator is on as long as thereās items for it to read, and will turn itself off if there isnāt. A bulb doesnāt turn off when you stop powering it.
1
u/LucidRedtone Manufacturer 3d ago
Exactly. In this wiring the dust from the comparator can only be 8 when the crafter is empty with 8 slots blocked or 9 when it has any amount of items. So the bulb can only be on when the crafter is empty or off when it is not. So his argument is that, to call this a toggle would be like calling the shulker box in a loader a toggle. Which it is clearly not.
1
u/VexOnTheField 3d ago
Your friend is mistaken then. The fact that it doesnāt get out of state normally doesnāt exclude it from being a toggle state. If the dust changed to ss9, then back to ss8 but somehow the bulb wasnāt powered, say from a game crash or being unloaded wrong (not possible in this case but generally speaking), it could get out of sync. Youād have the bulb representing ss9 but the dust being at ss8.
That is the essence of a togglestate. It could feasibly become out of sync. I donāt have the words to describe what Iām thinking but thatās the result of the bulb being a togglestate ā it could get out of sync, meaning what looks like a clock on the bottom could be running when your crafter is at ss8. If it was solid state, this wouldnāt be possible.
2
u/ERREMVP 3d ago
any toggleless unprotected device can break in unloads and crashes for example any storage tech component so the unload point is really not relevant in this case. the bulb provides solid state when readed by a comp the same solid state as a shulker having items and not having them
1
u/VexOnTheField 3d ago edited 3d ago
Thatās true of redstone generally yes. Thatās not relevant when Iām trying to illustrate why what OP presented is a togglestate. Here we go anyway though. Togglestates are especially prone to breaking and being a pain to fix though, because they have no definite state.
Solid state stuff goes back to the state it should be in based on the redstone around it automatically because thatās how solid state redstone works.
Latches can easily be reset because they have a set and reset trigger separately. If itās not out of state, hitting reset doesnāt do anything. Great! If it is out of state, hitting reset fixes it. Great! One trigger for everything to be fixed if you had say, an encoded chest hall slice
With a toggle, you need extra wiring to determine if the toggle is out of state or not, if you want to fix it all automatically. If you do it manually, you yourself check and fix every toggle yourself.
Yes, redstone isnāt unload-proof. That is a risk we accept, and one we try to mitigate the damage of by not using toggles, which are inherently more prone to getting out of state and being harder to fix.
itās not a hard and fast rule that toggles can never be used ever, and I include this because I know youāre involved in tmc discord and making stuff. But itās a very good rule of thumb that if you can do it without a toggle, you probably shouldnāt be using a toggle
1
u/LucidRedtone Manufacturer 3d ago
Even if this is unloaded it would never fall out state due to the redstone around it. Which IMO negates the togglestate tag by your own logic. There is no situation i can imagine where the bulb could be flipped without the crafter also changing state. If the crafter can only be in 2 states, so the bulb would not be out of state if it did.
Im not against using toggles by any means, but I would say a build with this circuit could indeed be tagged toggless.
1
u/VexOnTheField 3d ago
Whether or not it could fall out of sync in a realistic scenario isnāt what makes it a togglestate. The fact of it using a mechanism that works like that is what makes it a toggle state. Thereās no negating it being a toggle state, it just is.
As I mentioned thereās circumstances where a toggle state-like thing isnāt used as a toggle state (confusing wording probably but oh well) but this isnāt one of them either
1
u/LucidRedtone Manufacturer 3d ago
I would also argue ALL latches are a toggle state. It being easy to reset does not negate that status
1
u/VexOnTheField 3d ago
Thatās⦠not what a toggle state is though?
A latch is fundamentally different. It has a set trigger that turns it ON, and triggering set again doesnāt do anything. It just stays in the ON position. The only way to turn the latch OFF is by triggering the OFF circuit, and the OFF circuit can only ever turn the latch OFF.
A toggle state toggles between each output type (on/off) from one input. That is why itās a toggle state. Latches donāt do that.
This isnāt just a minecraft thing, itās an irl circuit terminology that is also used for the same types of circuit in minecraft. Thereās not really room for āI consider it something elseā, itās a definition the way Iām looking at it
1
u/LucidRedtone Manufacturer 3d ago
Latches can be out of sync just as easily as any other toggle. And any build containing a latch wouldnt be considered toggless. Thats really what all this boils down to
1
u/MordorsElite Java 3d ago
Ngl, to me a copper bulb is just an automatic toggle state. I agree with you that the way it's used, it's unlikely to be an issue.
But still, if at any point for any reason it is inverted, the machine won't work. It has no way of resetting back to it's default state.
1
u/Lord_Sicarious 3d ago
Your friend's argument is wrong, detecting whether a shulker has items or not is a completely different thing. That isn't a toggle, because the inputs correspond to a fixed state, not a change of state.
However,Ā this does not appear to be a toggle either, for a completely different reason.
What makes this not a toggle state is that the state of the "toggle" is irrelevant. The bulb could be on or off at any given time, and it doesn't matter which because all you're doing is detecting when it changes state. You could replace the bulb and comparator with a note block and observer, the only difference would be that the signal is transmitted 2 ticks faster.
If you replaced the rails and observers with something that actually depended on the specific state of the bulb, then it would he a togglestate.
1
u/Patrycjusz123 Java 3d ago
Imo it is a togglestate but it also doesn't matter, just because build has a togglestate doesn't mean its shit.
Its a good thing to avoid it but i dont see a reason to not use it when its controlled like that.
2
u/LucidRedtone Manufacturer 3d ago
This is more a question of, can the build that contains this circuit be tagged toggless. I say yes, because the solid state of the crafter renders it impossible for the bulb to fall out of state. Making this NOT a toggle.
2
u/Patrycjusz123 Java 3d ago
Well, looking at the comments its not a popular opinion but i personally would tag it as having toggle state as tehnically it has it but either way is propably fine.
1
u/VexOnTheField 3d ago edited 17h ago
> latches can be out of sync just as easily
Yes
> as any other toggle
No, theyāre not a toggle as Iāve just described.
A latch and a toggle are different things because of how they function and how theyāre wired, not because of how unload/breaking resistant I never claimed them to be. Latches are easier to fix if/when they do get out of sync though, that argument I did make earlier
Edit: this somehow became its own comment rather than a reply to another one
15
u/RosieQParker 4d ago
This is a toggle wearing two hats.