We are currently working on new rules for what content should and shouldn't be allowed on this website, and are looking for feedback! See Esolang:2026 topicality proposal to view and give feedback on the current draft.

Redstone

From Esolang
Jump to navigation Jump to search

Redstone is used for electronics in the game Minecraft. Although not intended to be a programming language, a compiler is technically possible. All the redstone data is "mostly" boolean. That is, redstone is either on or off, but also has a signal strength of 1-15 if on.

Input can be received from buttons, pressure plates, and many other blocks. Output blocks include pistons, sticky pistons, redstone lamps, dispensers, note blocks, and many other blocks.

https://minecraft.wiki/w/File:Redstone_wire_as_circuit_component.png

Redstone dust transfers power, but the signal strength decreases each block, turning off at a strength of 0. Redstone dust can go up or down 1 block at a time, and connects to all nearby redstone dust. Redstone dust will not connect through opaque blocks. Redstone dust lights up when powered.

To continue redstone signals farther than 15 blocks, a repeater can be used. If there is power behind the repeater, redstone dust in front will have a signal strength of 15 with a editable delay. Powering a repeater by a repeater from the side causes it to "lock," keeping its output constant despite input changes until it is unlocked (no longer powered from the side). Other blocks, such as torches and comparators, also affect the strength of the dust.

A redstone torch is normally on, but when the block it is attached to is powered, the torch turns off. A comparator can either subtract the strength of the side inputs from its main input, or make the input 0 when the side inputs are greater or equal and the main input otherwise. Comparators also have the ability to read from containers, such as chests, hoppers, and lecterns.

Because Minecraft has OR gates (connecting 2 lines of redstone to each other) and NOT gates (redstone torches), any other boolean logic gate is possible, and is a Bounded-storage machine. There are claims that a suitable machine would be able to build an infinite track or tape to elevate this to Turing complete (ignoring the world border). Alternatively, using subtick mechanics, entities can be stacked and seperated from others in the same stack, allowing incrementation and decrementation in a finite space.