What are redstone comparators used for in minecraft

Comparators were added to Minecraft in the 1. 5 update. One of the first Redstone items to be included in the game is this one. Players have used it in numerous Redstone projects ever since its release.

Three stone blocks, three Redstone torches, and one nether quartz can be used by players to make a comparator. Players can use comparators to determine block states, such as whether a chest contains an item. Additionally, it allows users to subtract from and contrast various signal strengths.

Comparators are a vital part of many Redstone contraptions. The best applications for Redstone comparators are discussed in this article.

A redstone comparator is a block used in redstone circuits to maintain, compare, or subtract signal strength, or to measure certain block states (primarily the fullness of containers).

Natural generation

Redstone comparators generate in ancient cities.

With any tool or by hand, a redstone comparator can be destroyed instantly, dropping itself as a piece.

Block Redstone Comparator
Hardness 0
Breaking time (secs)
Default 0.05

A redstone comparator is taken away and dropped as a piece of equipment if:

  • its attachment block is moved, removed, or destroyed;
  • water flows into its space;‌[Java Edition only]
  • A block is moved into its position or a piston tries to push it.

A redstone comparator is destroyed without becoming an item if lava enters the space where it is located.

Any opaque block with a solid full-height top surface, including upside-down slabs and stairs, can have a redstone comparator placed on top of it. A comparator can also be positioned on fences and walls in the Bedrock Edition. For more information about placement on transparent blocks, see Opacity/Placement.

The arrow on top of the redstone comparator points to the front; it has a front and a back. When placed, the comparator faces away from the player. The comparator has a front and a back pair of tiny redstone torches. When the comparator output is greater than zero, the back torches illuminate (the top arrow also turns red). Using the comparator, the front torch can be switched between two states:

  • Down and unpowered (indicating the comparator is in “comparison mode”)
  • Up and powered (indicating the comparator is in “subtraction mode”)

The redstone comparator is able to accept signal strength inputs from both of its sides and from the device’s back. Only redstone dust, redstone blocks, redstone repeaters, other comparators, and observers are accepted as side inputs in certain scenarios. The redstone comparators front is its output.

It takes 1 redstone tick (2 game ticks, or 0. For signals to pass through a redstone comparator, either from the back or from the sides, it takes about one second (lag excluded). This holds true for both turning on and off and varying signal strength.

Before updating their scheduled ticks, Redstone comparators check their power state. For example, a 1-clock input is treated as always off from the side and always on from the rear, which prevents redstone comparators from typically responding to 1-tick fluctuations of power or signal strength. This occurs because the redstone comparator checks its input states before the signal returns to its initial state. However, some configurations, such as simultaneously powering any input with two different observer pulses, will cause a Redstone comparator to react to two gametick pulses.

The four tasks performed by the redstone comparator are to maintain signal strength, compare signal strength, subtract signal strength, and measure specific block states, primarily container fill levels.

Maintain signal strength

The output signal strength of a redstone comparator with no powered sides is equal to that of its rear input.

Compare signal strength

Redstone comparator compares its rear input to its two side inputs while the front torch is off and unpowered. The comparator output is disabled if either side input is greater than the rear input. The comparator outputs the same signal strength as its rear input if neither side input is greater than the rear input.

The following equation can be used to determine the output signal strength:

output = rear × [leftrear AND rightrear]

Subtract signal strength

The signal strength of the higher side input is subtracted from the signal strength of the rear input using a redstone comparator in subtraction mode (front torch on and powered).

output = max(rear − max(left, right), 0)

For instance, the output signal has a strength of max(4 max(6, 7), 0) = max(47, 0) = max(3, 0) = 0 if the signal strength is 6 at the left input, 7 at the right input, and 4 at the rear.

The output signal’s strength is max(9 max(2, 5), 0) = max(95, 0) = 4 if the signal strength is 9 at the rear, 2, at the right input, and 5, at the left input.

Measure block state A redstone comparator can measure the fullness of a chest, as well as other block states, even through an opaque block.

Certain blocks behind it are treated by a redstone comparator as power sources, and it outputs a signal strength proportional to the state of the blocks. An opaque block may stand between the comparator and the measured block. However, in Java Edition, regardless of how full the container is, the comparator outputs 15 if the opaque block is powered to signal strength 15. [1].

Fullness of containers

Minimum Items for Container Signal Strength

Containers
Total Slots 3 5 9 27 54 1
Power Level Number of Items Music Disc
0 0 0 0 0 0 No disc
1 1 1 1 1 1 “13”
2 14 23 42 1s 60 3s 55 “cat”
3 28 46 1s 19 3s 55 7s 46 “blocks”
4 42 1s 5 1s 60 5s 51 11s 37 “chirp”
5 55 1s 28 2s 37 7s 46 15s 28 “far”
6 1s 5 1s 51 3s 14 9s 42 19s 19 “mall”
7 1s 19 2s 10 3s 55 11s 37 23s 10 “mellohi”
8 1s 32 2s 32 4s 32 13s 32 27s “stal”
9 1s 46 2s 55 5s 10 15s 28 30s 55 “strad”
10 1s 60 3s 14 5s 51 17s 23 34s 46 “ward”
11 2s 10 3s 37 6s 28 19s 19 38s 37 “11”
12 2s 23 3s 60 7s 5 21s 14 42s 28 “wait”
13 2s 37 4s 19 7s 46 23s 10 46s 19 “Pigstep”
14 2s 51 4s 42 8s 23 25s 5 50s 10 “Otherside”
15 3s 5s 9s 27s 54s “5”

How full a container is can be determined by a signal produced by a redstone comparator. (0 for empty, 15 for full, etc. (More information about the right-hand table is provided later in this section.

Containers that can be measured by a comparator include:

Generally speaking, the number of that item that make up a full stack (64, 16, or 1 for non-stackable items) determines how full the slots are on average.

The Minimum Items for Container Signal Strength table (right) lists the lowest full-stack equivalent (FSE) required to generate various signal strengths from standard containers. A full-stack-equivalent measures the number of standard 64-stackable items required to output a given signal strength. The constant s is 64, and the additional amount required comes next.

Alternatives to full-stack-equivalent include cumulative-weight and weighted-sum.

Items that stack up to 16 (such as ender pearls, signs, and snowballs) ), add 4 to each unity’s full-stack equivalent (count of 1 item). Similarly, items that stack to 1 (minecart, boat, etc. Items that add up to 64 contribute 1 and those that don’t contribute 64.

Example 1: Three ender pearls will produce a full stack equivalent of 3 x 4 = 12.

Example 2: A 16×4 60×1 = 124 full-stack-equivalent is produced by the combination of 16 ender pearls and 60 redstone dust.

Example 3: One minecart and 60 redstone dust produce an equivalent of 124 full stacks (1×64 60×1).

Example 4: A full-stack equivalent of at least 3s 14 = 206 but strictly less than 3s 37 = 229 is needed to generate a signal strength of 10 from a hopper. This can be done with 3 minecarts, and 14 dirt.

An entire large chest (54 slots), not just the portion directly behind the comparator, is measured when a large chest or large trapped chest is measured by a comparator. No matter how many items are contained in a chest or trapped chest that cannot be opened (for example, because it has an opaque block, ocelot, or cat above it), the output is always zero; however, shulker boxes can always be measured, even if they cannot be opened.

A redstone comparator can also measure some non-container blocks, such as:

Sound Subtitles Source Description Resource location Translation key Volume Pitch Attenuation distance
https://minecraft.fandom.com/wiki/File:Click.ogg Comparator clicks Blocks When a comparator is set to subtraction mode block.comparator.click subtitles.block.comparator.click 0.3 0.55 16
https://minecraft.fandom.com/wiki/File:Click.ogg Comparator clicks Blocks When a comparator is set to comparison mode block.comparator.click subtitles.block.comparator.click 0.3 0.5 16
Sound Source Description Resource location Volume Pitch
https://minecraft.fandom.com/wiki/File:Click.ogg Blocks When a comparator is set to subtraction mode block.click 0.2 0.55
https://minecraft.fandom.com/wiki/File:Click.ogg Blocks When a comparator is set to comparison mode block.click 0.2 0.5

Data values

Name Identifier Form Translation key
Redstone Comparator comparator Block & Item block.minecraft.comparator
  • Blocks Direct Item Form ID, used in add-ons and savegame files
  • ↑ a b Unavailable with /give command
  • The block’s direct item form and its identifier are the same.
Name Savegame ID
Block entity Comparator

Block statesSee also:

Name Default value Allowed values Description
facing north eastnorthsouthwest The direction from the output side to the input side of the comparator, or the opposite from the direction the player faces while placing the comparator.
mode compare comparesubtract Specifies the current mode of the redstone comparator.
powered false falsetrue True if the redstone comparator is being powered.
Name Metadata Bits Default value Allowed values Values for Metadata Bits Description
direction 0x10x2 0 0123 0123 The direction the repeater directs power.

The direction the player faces while placing the repeater.

  • 0: Facing north.
  • 1: Facing east.
  • 2: Facing south.
  • 3: Facing west.
output_lit_bit 0x8 false falsetrue 01 True if the redstone comparator is being powered.
output_subtract_bit 0x4 false falsetrue 01 Specifies the current mode of the redstone comparator.

Block data

A block entity linked to a redstone comparator contains additional information about the block.

  • Common block entity data tags include outputSignal, which represents the strength of the analog signal output from this redstone comparator.

See /Asset history for a more thorough breakdown of changes to repeater textures and models, along with a set of renders for each state combination.

Redstone comparator “items”

Java Edition
1.5 13w01a Redstone comparators have extra, unobtainable item forms corresponding to their block IDs. They can be obtained via the /give command or inventory editors with numeric item IDs 149 and 150.
1.7.2 13w37a The direct item forms of redstone comparators have been removed from the game. They can no longer exist as items in any way, only as placed blocks.
Pocket Edition Alpha
? Redstone comparators probably exist as an item.

Unpowered Comparator

Java Edition
1.5 13w01a The unpowered comparator item uses this texture in inventories, when held in first or third person view, as a dropped item or when in an item frame
13w02a The unpowered comparator item now uses this texture in inventories, when held in first or third person view, as a dropped item or when in an item frame.
This is due to major texture storage changes in this version.

Powered Comparator

Java Edition
1.5 13w01a The powered comparator item uses this texture in inventories, when held in first or third person view, as a dropped item or when in an item frame
13w02a The powered comparator item now uses this texture in inventories, when held in first or third person view, as a dropped item or when in an item frame.
This is due to major texture storage changes in this version.
Bedrock Edition
? Powered comparators use this texture.[2]
? Powered comparators use this texture.[3]

Unpowered Comparator

  • 13w01a – 13w25b: [Has no defined name; if highlighted, creates a text box with a minimum length]
  • 13w25c – 13w36b: tile.comparator.name

It is announced as tile when given using the /give command. comparator. name.

Powered Comparator

  • 13w01a – 13w25b: [Has no defined name; if highlighted, creates a text box with a minimum length]
  • 13w25c – 13w36b: tile.comparator.name

It is announced as tile when given using the /give command. comparator. name.

The bug tracker is where problems with “Redstone Comparator” are kept up to date. Report issues there.

  • In contrast to redstone torches and repeaters, comparators are purposefully made by Mojang to not emit redstone particles when powered. [4].

How to Use the Redstone Comparator in Minecraft!

FAQ

What do Redstone repeaters and comparators do?

They introduce a delay. The repeater has four positions, each of which corresponds to a different length of delay when a signal passes through it. By right-clicking on the repeater, you can move one of the tiny torches and change this delay. 1, 0. 2, 0. 4 and 0. 4 seconds. These delays can help inventors time all kinds of inventions.

How do Redstone comparators work Minecraft?

When two input voltages are compared, a comparator produces a binary signal that indicates which is higher. The output becomes high if the non-inverting () input exceeds the inverting (-) input. The output decreases if the inverting input exceeds the non-inverting input.

What do comparators do?

Redstone Repeaters typically require 1 game tick to transmit a signal to the following block. This can be lengthened by right-clicking. A click causes a delay of two ticks, three ticks, and four ticks, respectively.

Leave a Comment