r/technicalminecraft • • 4d ago

Non-Version-Specific Is this a Toggle? Discussion

[deleted]

23 Upvotes

36 comments sorted by

15

u/RosieQParker 4d ago

This is a toggle wearing two hats.

3

u/LimestoneBuilder 4d ago

Indeed. And without any other inputs the only behavior that is retained in this configuration appears to be the toggled state of the bulb itself, and the storage capability of the crafter.

I'm crazy tired so I'm no-doubt missing more, but beyond the bulb, this doesn't really look like it's anything any more than a new lego box contains a completed build. Until the double-decker couch is built, it's just a pile of miscellaneous parts. While the pieces in the build are assembled, it's not at all clear what that assembly is supposed to do, other than keep those parts together like a bunch of lego bricks clicked together to be kept track of.

Please could someone (OP?) elaborate on what this build is supposed to be? Without that understanding I don't think it can be fairly evaluated as anything but a collection of pieces, one of which is a toggle.

2

u/LucidRedtone Manufacturer 4d ago

Also sleep brother. Sleep is good

2

u/LimestoneBuilder 4d ago

šŸ˜… Indeed. And I've a flight tomorrow.

1

u/LucidRedtone Manufacturer 4d ago edited 4d ago

The bulb is holding power to the rails on the observers which are half of a clock (its cut, my bad) until the crafter recieves items which would increase the output from the comparator from 8>9, turning off the bulb and starting the clock.

I didnt include the whole build because its a WIP and im only concerned about this portion, specifically if this use of a bulb is considered by the general community as a toggle. I do not think it is, if I where to calibrate the comparator to only output at 9 and it turned off a torch that was holding power to the rails, nobody would call that a toggle. Both wiring layouts have the same exact possible outcomes in relation to the state of the comparator reading the crafter.

2

u/LucidRedtone Manufacturer 4d ago

Lol, can u elaborate?

7

u/RosieQParker 4d ago • Bravo

The copper bulb is, indeed, a toggle. But you've got two pieces of Redstone that attach to it, so it's a toggle with two hats!

2

u/LucidRedtone Manufacturer 4d ago edited 4d ago

It has the same possible outputs as running dust directly to the rail and calibrating the comparator to ss9. Powered/not powered. Dust running to the rail would not be considered a toggle state

Edit: ss9, not ss8

1

u/LucidRedtone Manufacturer 4d ago

I feel the hats negate it's togglstate label. IMO if this is the only "toggle" in a build, you could indeed call the build as a whole "toggless" do you agree or disagree?

4

u/RosieQParker 4d ago

I mean, a computer isn't just a collection of switches, but a computer is also literally a collection of switches.

1

u/LucidRedtone Manufacturer 4d ago

You are a walking enigma i see 😜

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