VOOZH about

URL: https://minecraft.wiki/w/CUD

⇱ Tutorial:Comparator update detector – Minecraft Wiki


Tutorial:Comparator update detector

From Minecraft Wiki
(Redirected from CUD)
Jump to navigation Jump to search

A comparator update detector or CUD switch is a redstone mechanism that exploits a feature in the game in order to detect comparator updates. Comparator updates are updates that only update comparators, for example, interacting with a container. Block update detectors cannot detect comparator updates, but CUDs can detect block updates.

There are many different designs, but they are all based on the same general idea: a comparator is turned on while it should be turned off, or the other way around. To get a comparator in such a state, the player has to make sure that it doesn't realize that it should change. This can be done in several ways.

When the comparator gets an update, it will realize that it should change state. This update can be a block update or a comparator update. CUDs can detect comparator updates next to the comparator, but also 1 block in between, provided that the block in between is a solid block.

What it detects

[edit | edit source]

The CUD switch detects everything a BUD detects, however the CUD can detect updates from the following blocks 2 blocks away from the comparator horizontally (but only if a solid block exists between the comparator and the target block). This means that the player can have a CUD behind a wall that detects the following updates in front of the wall:

Block Placement Removal Interactions
👁 Image
Chest
Yes Yes Yes
👁 Image
Trapped Chest
Yes Yes Yes
👁 Image
Barrel
Yes Yes Yes
👁 Image
Dispenser
Yes Yes Yes
👁 Image
Dropper
Yes Yes Yes
👁 Image
Furnace
Yes Yes Yes
👁 Image
Blast Furnace
Yes Yes Yes
👁 Image
Smoker
Yes Yes Yes
👁 Image
Brewing Stand
Yes Yes Yes
👁 Image
Jukebox
Yes No Yes
👁 Image
Beacon
Yes No No
👁 Image
Command Block
Yes No Yes
👁 Image
Chain Command Block
Yes No Yes
👁 Image
Repeating Command Block
Yes No Yes
👁 Image
Sign
Yes No Yes
👁 Image
Composter
Yes Yes Yes
👁 Image
Detector Rail
Yes No Yes
👁 Image
Tripwire Hook
No No Yes

The CUD detects many things which are undetectable by any other method. Some examples of this include closing the edit mode in a sign, an item smelting in a furnace, blast furnace or smoker, a potion being brewed in a brewing stand, a slot being clicked in any of the containers in the table above, or pressing done in a command block. It also essentially turns a detector rail into a pressure plate, and the CUD will update with any entity landing on the detector rail, including arrows.

Types of CUD switches

[edit | edit source]

The CUD can be only based on a comparator because only comparators can detect comparator updates. Each time a player performs one of the actions listed above, a comparator update is sent 2 blocks away in all 4 directions.

Overview of most designs

[edit | edit source]

This video by mooing_cowmilk provides an overview of most CUD designs, and also includes an explanation of them.

Chest based

[edit | edit source]

This method uses the mechanics of a chest. When a chest is locked, the comparator doesn't realize that it shouldn't be turned on anymore. When the player updates the comparator, it realizes and resets the system.

Using an ocelot

[edit | edit source]

It's also possible to block the chest with an ocelot or cat. When an ocelot sits on a chest, the player can't open it. The player can move it using pistons, minecarts, or water. Using minecarts, players can make a silent CUD (besides the meow sound).

Cauldron based

[edit | edit source]
👁 Image
A cauldron based CUD.

This method uses a filled cauldron that is being pushed by a piston. The comparator doesn't notice that the cauldron has been pushed down and stays powered until it gets an update. Note that the cauldron should contain water.

Redirecting based

[edit | edit source]
👁 Image
A redirecting based CUD. The redstone is redirected by a detector rail. Note that the lever should always be turned on.

This method is often used in BUDs. The player can turn any repeater-based BUD into a CUD by replacing the repeater with a comparator. They can redirect redstone with a detector rail, redstone block, or a solid block, blocking 2 redstone diagonal to each other. Again, the comparator doesn't realize that the redstone isn't pointing the right direction anymore, and it will stay turned on until it receives an update.

Item frame based

[edit | edit source]
👁 Image
An Item-frame based CUD.
👁 Image
Another item-frame based CUD.

Comparators can take a redstone output from an item frame, but only if the item frame's position isn't occupied by a block. Many blocks will break the item frame if they are in the same position, but some blocks don't. Examples are water, fence gates, skulls, and flowers.

Variations

[edit | edit source]

Other devices can be built using the same underlying principle as the CUD switch. CUDs can be made stackable and even tile-able. They can be turned into a toggle-CUD. CUDs can be made pistonless using ocelots.

T-CUD

[edit | edit source]

A T-CUD toggles between 2 states. The first update will turn the comparator off, and the second update will turn the comparator on again.

Why and how it works

[edit | edit source]

History

[edit | edit source]

The earliest known CUD switch was made by LetsPlaysWithH.[1] The bug it was based on has been fixed in 1.5.

DvirWi found out that it can detect the clicking inside of chests.[2]

A short time later, NiceMarkMC made a version that used DvirWi's technique, despite not knowing it was a CUD.[3]

Redstone Sheep then found out that it would detect most block entity changes and had a chat with NiceMarkMC, giving it the name Tile Entity Data Update Detector (TEDUD).[4]

NiceMarkMC then uploaded a video of DvirWi's version and called it Tile Entity Update Detector (TEUD) to keep it shorter, and viewers suggested calling it Data Update Detector (DUD) which became a widely used name.

NiceMarkMC accepted the name DUD, but then renamed it to CUD because the other names were technically incorrect.

As of Java Edition 1.13 (17w47a), CUDs can no longer detect note blocks, since it is no longer a block entity.

References

[edit | edit source]

Navigation

[edit | edit source]
Retrieved from "https://minecraft.wiki/w/Tutorial:Comparator_update_detector?oldid=3554190"

Navigation menu