r/PhoenixSC • • 10d ago

Meme So Trueee

Post image

The Nerds tell me what does a comparator do? šŸ¤“

1.6k Upvotes

52 comments sorted by

240

u/Live_Sheepherder3099 Piracy button 10d ago

The comparator compares or smth like thatĀ 

128

u/StarBoySDLegit 10d ago

"The sun shines" typa comment 😭

51

u/JunimoZ āŽNot PhoenixSC 10d ago

I mean, he is right

10

u/Kottyara 10d ago

Well, actually not, sun does not shine, it, in fact, doesn't exist at all

7

u/Shuaiouke Wait, That's illegal 10d ago

The sun is actually a deadly laser

8

u/Bob_Bobbo 10d ago

That's literally how it works, I don't know how to explain it any further.

184

u/Pim_Wagemans Wait, That's illegal 10d ago edited 10d ago • Helpful Bravo

Compare Mode (small torch off)

In compare mode the comparator outputs the signal from the back input, if the signal from the side is NOT higher than the back input.

So, if the back input strength is 14 and the side input strength is 15, the comparator will output nothing because 15 > 14.

If the back input strength is 14 and the side input strength is 13, the comparator will output 14
because 13 < 14.

Subtract Mode (small torch on)

In subtract mode the comparator will output the side input strength subtracted from the back input strength.

So, if the back input strength is 14 and the side input strength is 13, the comparator will output 1
because 14 - 13 = 1.

Reading Blocks (small torch doesn't matter)

If you put certain Blocks in front of a comparator the comparator will output a signal strength depending on the content of the block:

Containers (chests, barrels, shulkers, hoppers, etc.)

The signal strength will be determined by how full the container is, so completely full will be 15, about half-full will be 7 or 8, and completely empty will be 0.

Jukeboxes

The signal strength will depend on the music disk, each disk a a specific signal strength associated with it.

Crafters

The signal strength will depend on the number of slot filled with items or blocked by the player in the UI. So completely empty will be strength 0, and all 9 slots filled will be strength 9.

Fitting all blocks that can be read in this comment would take too long but you can check the wiki for the full list. https://minecraft.wiki/w/Redstone_Comparator#Read_blocks

A part of this comment was copied from a comment I made a long while ago on a different post.

76

u/QuantifyTheMicrochip 10d ago

Bro actually studied for the test.

15

u/Acceptable_Nobody641 Legacy Console FTW 10d ago

In all of my 9 years of playing, never knew the compare or substract thingies lmao.

7

u/Emmennater 10d ago

One more rule: If the comparator is reading directly from source like a furnace, it will always output the signal read, but if it reading through a solid block it will output the read signal only if the input signal strength is less than 15, otherwise it outputs 15.

1

u/MrBrineplays_535 10d ago

This is the ability of the comparator to send a signal that's greater than 15 right?

2

u/Emmennater 10d ago

no, that happens when the size of the container exceeds its maximum storage capacity. the comparator never outputs more than 15, but if you subtract 1 from 16 it would output 15.

3

u/TH3_OG_JUJUBE 10d ago

I’m saving this

1

u/blankythedude 4d ago

Just read the Minecraft wiki

1

u/TH3_OG_JUJUBE 3d ago

I don’t have time to read a whole ass wiki

1

u/blankythedude 3d ago edited 3d ago

It's just 15 minutes, you lazy bum

2

u/CorinCadence828 Java FTW 10d ago

and also if it isn’t comparing anything or reading anything it outputs the same strength that it got as an input

1

u/Original-Issue2034 Waxed Lightly Weathered Cut Copper Stairs 9d ago

So basically the comparator compares

15

u/zhulkgr25 10d ago

I'm an engineer, this is the other way around. And it's exactly why we fail. The tests are easy. But you try and understand a single word in class.

7

u/_bobek_2811 10d ago

in the first mode it if its getting a signal from the side which is stronger than the one from behind it stops the signal. in the second mode it subtracts the second highest signal strength from the highest signal strength and outputs it

2

u/Aruynn_da_ASPD_being 10d ago

Almost, in subtracting mode it subtracts the side signal from the back signal regardless of which is higher, if it’s equal or higher then the output is 0

14

u/Significant_Bit649 10d ago

"tell me what does COMPARator"

Idk man myabe it cooks some icecream

7

u/Ayk1593_2 10d ago

it compares the heat required to "cook" icecream and the icecream's melting temparature to see if its safe to cook icecream or not

1

u/Kaaskaasei 10d ago

Only two words of this comment would suffice.

"Icecream melting" ofcourse

7

u/Hurakan-GM 10d ago

Comparators are actually easier to put in use than repeaters, change my mind

8

u/imachug 10d ago

Yeah, genuinely how do people find repeaters easier?

Comparators:

  • Compare/subtract signals
  • Read container fullness
  • Consistently receive updates
  • The only non-trivial mechanics are comparator priming and CUDs

Repeaters:

  • Increase signal strength
  • Delay the signal
  • Extend the signal
  • Delay the signal turning off, which can be either a different behavior from both of the above or an implication depending on how you look at it
  • Can be locked
  • Have different tile priorities depending on blocks nearby and their own state
  • Estimating behavior on chained 1-tick timings without a spreadsheet or a ton of experience is borderline impossible

Comparators are hard-working law-obeying citizens. Repeaters are sadists that look trustworthy at first glance, and then stab you in the back when you least expect it.

2

u/M4rt1m_40675 Mining Dirtmonds 10d ago

I've never heard of repeaters behvaing differently by what blocks are nearby. They literally just take some time to send the redstone signal and let you go further with it. Comparators I've got no clue what they do, like, they get different signal strengths based on how filled a storage block is but it changes depending on how many slots it has I think? Then if you put one down with redstone in the front going back to one of the sides, right click it and turn it on it just starts blinking for some reason?

2

u/imachug 10d ago

I've never heard of repeaters behvaing differently by what blocks are nearby. They literally just take some time to send the redstone signal and let you go further with it.

That's right, but how much time does it take? It turns out that, due to how Minecraft processes redstone, timing involves more than just a whole number of ticks. The specifics are tricky to explain, but to give one example of the consequences: if you build a chain of redstone repeaters and power it with a certain clock, in certain cases every redstone repeater except the last one will flicker, while the last one will consistently stay on/off: https://youtu.be/sLftwVwqPQE?t=273. Basically, the problem here is that a repeater can take very slightly different time to enable a signal vs disable a signal, and that can cause weird effects.

Comparators I've got no clue what they do, like, they get different signal strengths based on how filled a storage block is but it changes depending on how many slots it has I think?

In the most basic scenario, comparators measure the fullness of a storage block. A completely empty storage block always has fullness 0, a storage block with a single item has fullness 1, a completely full storage block has fullness 15, and everything in-between is interpolated between 1 and 15. Some function blocks behave a bit differently, but that's the general idea.

If there is no storage block behind the comparator, it instead reads the signal strength of the signal from behind. You can kinda interpret this as redstone components having a "fullness" equal to the signal strength, if that makes it feel more consistent.

After reading the fullness but before producing an output, the comparator also handles side inputs:

  • In compare mode (the default one), the comparator passes the fullness through if it's at least as big as the largest side input, and otherwise outputs 0. So the output is fullness if fullness >= max(side inputs) and 0 otherwise.
  • In subtract mode (with the light turned on), the comparator subtracts the largest side input from the fullness. So the output is fullness - max(side inputs).

In a nutshell, a comparator combines two functions: reading fullness and comparing/subtracting values. It would probably be a lot clearer if these two functions were assigned to two different redstone components, but it's often useful to combine fullness reading with comparison, so that makes some sense. For instance, if you want to check whether a crafter is full, you will want to read its fullness and compare it with 9. A comparator allows you to do both of these operations at the same time.

1

u/M4rt1m_40675 Mining Dirtmonds 10d ago

I've done a few farms with long repeater chains and that has never happened personally. Each right click on a repeater adds 0.1 or 0.2 seconds (I can't remember the exact number) but I guess if it's not anything important I probably wouldn't notice so you might be right.

I understood your explanation on comparators and it looks like programming in a way but it still looks way too complicated compared to repeaters which just do two simple things and only bug out in larger and more technical machines.

2

u/Mathsboy2718 Java FTW 10d ago

I'll agree that the one specific use of repeaters, extending and delaying a signal, is easy to understand and is easier to understand than comparators.

However, it's harder to understand all the nuances of repeaters and all the ways they can behave than it is to understand all the nuances and niche behaviour of comparators.

1

u/imachug 10d ago

which just do two simple things and only bug out in larger and more technical machines.

Yeah, that sounds like a fair characterization to me. I suppose you seldom care about precise timings in everyday usage. I primarily work on complex redstone in optimized farms or for computational purposes, so I may be a little biased.

1

u/M4rt1m_40675 Mining Dirtmonds 10d ago

I mostly just do simple-ish farms in my worlds to get resources. I don't need to make the Super Duper Mega Iron Farm 9000 that produces a kiloton of iron per second. The one I mentioned about the long repeater chain was just for a creeper farm

1

u/blankythedude 4d ago edited 4d ago

And that sets the difference between casual and professional

Casuals make small DIY science projects without clear understanding of mechanics behind, fix things through their own vibe instead of math-backed science.

While a professional studies every detail, preform calculations, aiming for precise precision, making them able to handle larger projects.

For example a junior science student knows mirror reflect light and glass refract light, action and reaction, electricity pass through circuit. While a physics student use physics to calculate the angle of light passing through different materials using sine, the energy distribution in an action, how logic gates work. And casuals think everything is possible with science, while professionals know the limit of what is possible using science.

2

u/Rabrun_ crab 9d ago

Yeah but most people don’t want to do subtick calculations, they just want their signal to be 15 again

Also 95% of people in this thread have never even laid eyes on a locked repeater, let alone knew it existed

5

u/Bob_Bobbo 10d ago

Nah, both are easy but repeaters are just straight to the point.

1

u/Hurakan-GM 10d ago

Yeah, both easy to understand, and while repeaters do go straight to the point, that doesn't mean they are half as convinient most of the time

2

u/Loufey 9d ago

both are pretty simple at the end of the day

but if you give a 6 year old 10 minutes with a repeater, i figure out everything except locking

if you give a 6 year old 10 minutes with a comparator, they barely figure out anything

3

u/MrBrineplays_535 10d ago

I remember back then struggling to comprehend what the comparator even is. Tried doing a lil bit of redstone and it's actually quite simple. Well, sometimes. It's one of the redstone components that you can easily forget when you're stressed or going insane.

2

u/Most_Seaweed3811 10d ago

i've been playing this game since it came out and still don't know how to craft it not even use it😭

2

u/five_grains_of_rice 10d ago

it thinky machine make number differnt go out

2

u/Acceptable_Nobody641 Legacy Console FTW 10d ago

Well the Reapeter repeats so the Comparator compares

2

u/WorryGold4674 10d ago

The only thing I know is that it can turn stuff like books in a lectern and music disks in a jukebox into redstone energy

1

u/Most_Neat7770 10d ago

But still they are quite simple, it's just slightly mathematical

1

u/Dark303_ 10d ago

This is funny to me because redstone is a form of programming and our comp sci class teaches us nil and then tests us on really complex topics. Although i feel like it should be the other way around. At first I thought it was this but as you do more redstone you realize repeaters are really weird and complex.

1

u/Full-Reception5113 10d ago

I have been playing the game for 11 years and this thread is the first time I've ever heard anyone explain what a comparator doesĀ 

1

u/Minute-Reputation-52 10d ago

Comparators count

1

u/disappointedcreeper I make mods sometimes :3 10d ago

first off it gives off power based on how many items are in the container behind it, and it can also pass the redstone signal from behind it to the front of it with a 1 tick delay
in the first mode, when you place it and the torch is off, power from the sides gets added to the output, and in the second mode, when you click it and the torch is on, power from the sides gets subtracted from the output

1

u/GapWitty3587 9d ago

Comparator has a few main functionalities.

  1. Get redstone signal based on a block state (most common)
  2. Compare signals
  3. Substract signals (often used for a redstone ticker)

1

u/Redmix7pl 8d ago

Compactor converts block states into redstone signal or something like that