The redstone gate
a.k.a. the redstone PLA/PAL (programmable logic array/programmable array logic)
Abstract
This mod addresses the size of redstone contraptions by adding a programmable redstone gate block. The behaviour of such a block is specified by means of truth tables. Upon opening the block's GUI, the player can flag the individual sides of the block as either off, input, output or both. The GUI will automatically generate a truth table with all input combinations for each output. Each of these combinations can be flagged as either enabling or disabling the output with the click of a mouse button.
What can you actually do with a single block?
Well, a LOT! Naturally, all unary and binary gates are supported (NOT, repeaters, AND, OR, XOR, NAND, NOR, XNOR, implies, implied by, not implies, not implied by, A, not A, B, not B, True, False). Furthermore, this block can also combine two or three of these into a single block.
It is also very good at re-routing wires (vertical wiring, crossing wires, omni-directional repeaters). You can make clocks, 2-way repeaters, rs-nor latches, D,T and J/K Flip-Flops. Edge detectors, full adders, counters (or more specifically a single bit of a counter), etc..
Essentially, it reduces most of the content on the redstone circuit page on the wiki to a single block (not all). Furthermore, it can compute all these with a configurable delay from zero (instant) up to fifteen torch delays.
Videos
Here are some (now outdated) demo videos (tinypic.com). These videos are still of alpha1 which used absolute direction instead of relative ones.
The redstone gate block:
Redstone Gate v1.4.2 beta for Minecraft 1.0.0. A minor rendering/lighting update (the lighting issue which also affected repeaters and stairs). Also initialization has been adapted to the new ModLoader. This fixes a loading issue for some people.
Configuration file should be fixed now. Refer to changelog of Beta1 for details.
Signal propagation delay has been removed. The gate is now an instant gate. Whenever the signal contains a loops back onto itself a delay of a single redstone torch (2 ticks) is utilized.
You can now set a delay ranging from 0 to 15 torch delays.
Delay zero (0) is an insta-gate. It immediately responds to input changes but won't update for 1 torch delay afterwards.
Sides are no longer set to either input or output, but instead are set to off, input, output or input/output.
The input/output sides provide built-in feedback loops such that the output can depend on previous outputs. The block can directly read output values, it does not require a redstone wire or block attached to the input/output sides for this.
There is a limit on the number of possible input/output ports. The gui will prevent you from assigning sides such that the number of combinations exceeds what fits reasonably on a single screen. The exact limit is given by:
(2**(#inputs) * (#outputs)) < 32
where input/output sides count as both an input and an output. Essentially you can have max 3 input/output ports and typically only two.
The new input/output sides enables direct realization of: Clocks, edge detectors, 2 way repeaters, latches, D/T/JK Flip-Flops, Reversible signal generators, counter bits, etc...
The storage overhead per block is increased by 4bits of metadata (for the delay) and another byte in the TileEntity (now 6 total) for the input/output sides.
Added Copy/Paste buttons to quickly copy a configuration to another block.
There are two copy/paste buffers. One is accessible by a regular click and the other by shift-clicking the copy/paste buttons.
You can now type a gate-code into the block to quickly configure the gate.
These codes take the following form: IIOO-TTTTTTTT-D
where I = Inputs, O = Outputs, T=Truth Table and D=Delay.
These values are entered in hexadecimal, i.e. valid characters are: 0123456789ABCDEFabcdef
To input a new code just start typing the characters. Enter will accept the code, backspace will erase a character and Esc will abort entry. To view the code of an existing block just hit backspace once (i.e. while you are not editing the code). This will drop you into the edit dialog with the current code visible.
Using these codes, you can easily share block configurations with other Minecrafters without having to post screenshots and/or replicate truth tables. Block orientation is NOT copied, so if it is relevant (e.g. in a complex multi-block circuit) then describe that manually.
Demo worlds
Ask me if you want to have your Programmable Redstone Gate based creations added here (the older ones don't use the new input/output sides yet).
New demo world by Darquan. This was created after addition of the input/output sides. There seems to be some new door behaviour in Minecraft 1.0.0 which breaks some of the double doors.
Installation:
Install ModLoader (copy class files into Minecraft.jar); add mod class files into Minecraft.jar; add redstonegate.png to the gui folder in Minecraft.jar.
Mod motivation
Redstone has enabled the minecraft community to build extremely impressive contraptions but this level of creativity requires space, lots of space. As a consequence the suggestions board has seen many requests for integrated circuit blocks which pack entire redstone circuits into a chest. Though possible, such an approach would require a lot of storage per block and a fairly complex simulation (essentially hierarchical redstone evaluation).
This mod approaches this problem from a different point of view: truth tables. Truth tables have several significant advantages over simulation chests. First of all, they are the standard way of describing the behaviour of gates. Second, they can express all elementary gates. Third, they allow for a quick lookup to determine what the output of a block should be. Finally, they can be compactly stored (this mod adds a TileEntity which stores two bytes and one integer, i.e. 6 bytes total).
Crafting recipe
User interface
This picture demonstrates how the user interface currently looks in-game. In the upper left side there is a box which specifies which sides are inputs and which ones are outputs.
Here the left, bottom (/down) and right sides are switched off. The back is an input and the top (/up) and forward sides are specified as input/output sides (i.e. both, which allows the gate to read its own output). On the right side of the interface is the generated truth table. Each output side can be configured individually which allows multiple gates to be placed in a single block. The function shown here is an edge triggered T Flip-Flop (back is the input, forward the output and up is auxiliary state used for edge detection).
The bottom left corner contains a quick configuration box for manipulating the table and the delay box allows specification of the signal propagation delay (0 to 15 torch delays). When using delay 0, it acts as an insta-gate (immediate response, but max 1 update per torch delay). Click the delay to increase it and shift-click it to decrease it.
Connectivity wise, the redstone gate block functions like a multi-directional repeater. It can read the current from powered blocks and can send power into a block. A wire does not have to be fed directly into the block, if it visually connects then the block can read it.
Quick config box details:
This box allows you to quickly enable (ON), disable (OFF) or invert (NEG) all outputs and configure several common gates (AND, OR, XOR, NAND (AND+NEG), NOR (OR+NEG), NXOR (XOR+NEG)). For example to make an AND gate between left and right inputs. Click left and right to set them to inputs and then click AND. I hope that this will allow users which are not familiar with truth tables to more gradually roll into them.
The implication and implied by gates are not included as they don't scale to three or more inputs. These can still be created manually through the truth table or through the advanced auto config (A implies B is equivalent to not(A) or .
Advanced auto config.
Shift-clicking an input or output in the input box will cycle it through three states: regular (shown with a diode symbol), inverted (shown with a not gate symbol) or ignored (no symbol).
When pressing (AND, OR, XOR, ON or OFF) in the auto config box, the state of the inputs and outputs is taken into account. I.e. only active outputs are modified and inputs or outputs with NOT gates are reflected accordingly in the truth table.
Whenever you open the user interface it will always default to non-inverted inputs and outputs.
For instance, if you want to set the front output to left IMPLIES right, then mark left and right as inputs (left-click). Disable up/down/back by shift-clicking and invert left (shift-click). Finally press OR. Once you get more familiar with truth tables, direct manipulation of the table will be faster. In the latter case, this functionality might be useful if you have four inputs and want one of the outputs to be a basic function of exactly two inputs.
To make matters even more complicated, hitting a quick config button will normally set the truth table to exactly that function (i.e. disable all other active states). If you shift-click a quick config button, the function is added to the truth table. I.e. any existing active output states will remain active.
This functionality was easy to code and allows you to configure any boolean function without touching the truth table directly, but direct editing is a lot quicker and simpler, so I'm not exactly sure yet how useful it is.
How to read the truth table
Let's consider the example image above and focus on a single entry. For example, let's take state 001 on the row marked as front. Since it is on the row labeled as front, we are defining the output (on/off) of the block or wire directly in front of the block (sounds logical, right?). In the column header above you can see to which input sides the digits correspond. Here: U(p)F(ront)B(ack). So for 001 this means that when the block above the gate and the block in front of it are not powered but the block behind it is then the front output will be switched on since 001 is green. If it is red, then the output would be off.
The T Flip-Flop is a fairly complex gate (strictly speaking it's a circuit, not a gate). The basic logic gates (and, or, xor, nand, nor, xnor, implies, implied by, etc..) are easier to understand than this one.
Todo, requested input and feedback
I'm not a texture artist. The current block simply reuses half-slabs and repeater textures. If any community member can make a decent texture for this, I would gladly add it to the mod. Keep in mind that the block has an orientation so the top should recognizably show the front direction. Also the input/output images could be improved a lot.
Feedback on usability, behaviour and gameplay changes, other feature requests, etc. is most welcome.
Implement a blockID conversion mechanism [done, not an ideal solution, but works]
Investigate and resolve Water Shader mod conflict [unconfirmed]
Investigate and implement server support
Test compatibility with Eloraam's Redstone mod and wireless redstone. [Reported as working by users]
License:
TERMS AND CONDITIONS
0. USED TERMS
MOD - modification, plugin, a piece of software that interfaces with the Minecraft client to extend, add, change or remove original capabilities.
MOJANG - Mojang AB
OWNER - , Original author(s) of the MOD. Under the copyright terms accepted when purchasing Minecraft (http://www.minecraft.net/copyright.jsp) the OWNER has full rights over their MOD despite use of MOJANG code.
USER - End user of the mod, person installing the mod.
1. LIABILITY
THIS MOD IS PROVIDED 'AS IS' WITH NO WARRANTIES, IMPLIED OR OTHERWISE. THE OWNER OF THIS MOD TAKES NO RESPONSIBILITY FOR ANY DAMAGES INCURRED FROM THE USE OF THIS MOD. THIS MOD ALTERS FUNDAMENTAL PARTS OF THE MINECRAFT GAME, PARTS OF MINECRAFT MAY NOT WORK WITH THIS MOD INSTALLED. ALL DAMAGES CAUSED FROM THE USE OR MISUSE OF THIS MOD FALL ON THE USER.
2. USE
Use of this MOD to be installed, manually or automatically, is given to the USER without restriction.
3. REDISTRIBUTION
This MOD may only be distributed where uploaded, mirrored, or otherwise linked to by the OWNER solely. All mirrors of this mod must have advance written permission from the OWNER. ANY attempts to make money off of this MOD (selling, selling modified versions, adfly, sharecash, etc.) are STRICTLY FORBIDDEN, and the OWNER may claim damages or take other action to rectify the situation.
4. DERIVATIVE WORKS/MODIFICATION
This mod is provided freely and may be decompiled and modified for private use, either with a decompiler or a bytecode editor. Public distribution of modified versions of this MOD require advance written permission of the OWNER and may be subject to certain terms.
Not familiar with truth tables? Don't worry, it's a very simple concept. Read this:
The following image displays the typical representation of a truth table (figure A) for an AND-gate with two inputs called A and B.
This is also the shape of the truth tables as you encounter them on the Minecraft wiki pages.
Each row of a truth table lists the on/off state of all its inputs on the left and the output it generates on the right.
This table says that output O is on (1) if, and only if, both inputs A and B are turned on. In all other cases it is turned off (0).
In my mod, I represent this truth table by first joining all input combinations together, like shown in figure (B).
Then, instead of displaying the output column, I colour the inputs red if the output is off (0) and green if the output is on (1), as shown in figure (C).
Finally, I rotate it counter-clockwise and put a label of the output side on the left, as can be seen in figure (D).
Instead of using names, I mark the inputs by their relative side. For instance L(eft) and R(ight) in figure (E).
Support the Allocator! Find my inventions such as my pressure plate removal detector on the About Me page of my profile.
I'm still looking for more feedback on my configurable Redstone Gate mod. All gates and common circuits (such as e.g. clocks, edge detectors, latches and Flip-Flops) in a single block.
I've been thinking a bit more about the block and here are some ideas I'm still undecided on. I would like to have community feedback about them.
Use absolute sides (north, east,...) or relative sides (front, right,...). This one was mentioned above, currently I'm leaning towards relative sides such that gate patterns remain the same when the block is facing another direction.
Should inputs/outputs be turned on/off by clicking them or by placing a torch/wire in their slot. The latter would make the block more costly to use and scales material cost with gate complexity. On the other hand, the block requires 9 redstone dust to craft. Many of the elementary gates can be constructed with less materials than that.
Should the block cut redstone wires? Currently a wire placed underneath would connect with a wire placed next to it. I'm not yet entirely sure where to change this, but it seems related to material type.
Should the block be resistant to water/lava? Like all other redstone it can be washed away right now.
And of course, any other comments or suggestions.
Rollback Post to RevisionRollBack
Support the Allocator! Find my inventions such as my pressure plate removal detector on the About Me page of my profile.
I'm still looking for more feedback on my configurable Redstone Gate mod. All gates and common circuits (such as e.g. clocks, edge detectors, latches and Flip-Flops) in a single block.
Interesting idea, but honestly, not what I think a lot of us were looking for.
Would you be willing to motivate what you do not like about it? Do you just disagree with the idea of compact circuitry (which is often requested) or do you have specific issues with the way I addressed it?
Rollback Post to RevisionRollBack
Support the Allocator! Find my inventions such as my pressure plate removal detector on the About Me page of my profile.
I'm still looking for more feedback on my configurable Redstone Gate mod. All gates and common circuits (such as e.g. clocks, edge detectors, latches and Flip-Flops) in a single block.
If possible could you change it so you can click on a gates name(Click on XOR-Gate like you would the numbers) and it works the same way as before.
This might make no sense what so ever...lol
While that would be possible, not all gates have names and it is impossible to name them all. To give an idea of how many different gates this block allows. Consider the following computation.
Regarding unique input/output sides:
There is 1 gate with 0 inputs.
There are 6 over 1 gates (=6) with 1 input.
There are 6 over 2 gates (=15) with 2 inputs.
There are 6 over 3 gates (=20) with 3 inputs.
There are 6 over 4 gates (=15) with 4 inputs.
There are 6 over 5 gates (=6) with 5 inputs.
Some of these are just mirrors or rotations of eachother, so so far it's not too bad.
A gate with n inputs can assume 2**n input combinations and has (6-n) outputs. For each input combination each output is either on or off. So the total number of gates which can be made with n inputs is given by: 2**((6-n) * (2**n))
The amount of gates per input are given by:
0 inputs: 64
1 input: 1024
2 inputs: 65536
3 inputs: 16777216
4 inputs: 4294967296
5 inputs: 4294967296
Again, this ignores rotations and mirroring of the blocks, but as you can see the number of combinations is WAY too large to name them all.
Apologies if I screwed up my math, it's late :tongue.gif:
Support the Allocator! Find my inventions such as my pressure plate removal detector on the About Me page of my profile.
I'm still looking for more feedback on my configurable Redstone Gate mod. All gates and common circuits (such as e.g. clocks, edge detectors, latches and Flip-Flops) in a single block.
Space management has always be my number one issue with redstone. This is one hell of a good mod. Will try it out. As for relative versus absolute sides: how significant will the extra "computional overhead" be if you changed it to relative?
Thank you, glad to hear someone appreciates the idea.
As for your question, nothing to worry about. Just a couple of extra indirections.
Support the Allocator! Find my inventions such as my pressure plate removal detector on the About Me page of my profile.
I'm still looking for more feedback on my configurable Redstone Gate mod. All gates and common circuits (such as e.g. clocks, edge detectors, latches and Flip-Flops) in a single block.
Second alpha version is now available. You can find it in the download section of the original post.
Most notable change is the usage of relative directions now instead of absolute directions. This no longer requires you to know where the north is to configure the gate. More importantly, the output patterns are now independent of the blocks orientation which means a screenshot of the truth table is sufficient to copy the gate.
Rollback Post to RevisionRollBack
Support the Allocator! Find my inventions such as my pressure plate removal detector on the About Me page of my profile.
I'm still looking for more feedback on my configurable Redstone Gate mod. All gates and common circuits (such as e.g. clocks, edge detectors, latches and Flip-Flops) in a single block.
Do you ever build redstone circuits? If so, then please enlighten me what is so complicated about this. Truth tables are a well established and extremely simple way of describing the behaviour of gates.
Is the interface unclear?
Rollback Post to RevisionRollBack
Support the Allocator! Find my inventions such as my pressure plate removal detector on the About Me page of my profile.
I'm still looking for more feedback on my configurable Redstone Gate mod. All gates and common circuits (such as e.g. clocks, edge detectors, latches and Flip-Flops) in a single block.
I've always wanted something like that.
Not to useful though, because mods make Redstone way less impressive (esp. a total mod like this) so maybe just for building that cluster of microprocessors to regulate your base?
I've always wanted something like that.
Not to useful though, because mods make Redstone way less impressive (esp. a total mod like this) so maybe just for building that cluster of microprocessors to regulate your base?
Perhaps the contraptions become less impressive, perhaps they become more impressive. Miniaturization usually leads to increase in power and abstraction leads to increased complexity.
Yes, you can construct a lot of things in a very compact manner with this. I actually like to automate stuff without needing several chunks to store the automation in. I just found a design for a counter which uses 3x1x2 per bit. The biggest challenge is finding an efficient way to run your wires.
Does this mean that building counters has become boring? No, it means that using counters in regular play (as opposed to redstone megaprojects) becomes feasible.
Rollback Post to RevisionRollBack
Support the Allocator! Find my inventions such as my pressure plate removal detector on the About Me page of my profile.
I'm still looking for more feedback on my configurable Redstone Gate mod. All gates and common circuits (such as e.g. clocks, edge detectors, latches and Flip-Flops) in a single block.
I have Eloraam's redstone mods, RedLogic being the relevant mod to which I am comparing this one. I like the increased functionality of this mod, including the reverse recipe. As you said Darquan, your mod allows for many unnamed logic gates and tilted/vertical standard logic gates, something I haven't seen before. I think I'll try this out instead.
Should inputs/outputs be turned on/off by clicking them or by placing a torch/wire in their slot. The latter would make the block more costly to use and scales material cost with gate complexity. On the other hand, the block requires 9 redstone dust to craft. Many of the elementary gates can be constructed with less materials than that.
You asked if the "inputs/outputs be turned on/off by clicking them or by placing a torch/wire in their slot", I think this would be a good idea if the redstone cost in gate creation were less, perhaps 4-6 redstone instead of 9. This would even up the basic gate costs to ~9 redstone and scale with complexity. But I think I like the way it is now where in-/outputs are activated by click and a 9-cost gate. It makes the gate a bit harder to craft, but then it can be used however you want without further complications.
Should the block cut redstone wires? Currently a wire placed underneath would connect with a wire placed next to it. I'm not yet entirely sure where to change this, but it seems related to material type.
I think the block should cut wires. There are, of course, ways to work around this, but it would be easier as a user if wire were cut so I could have more precision in controlling the gate.
Should the block be resistant to water/lava? Like all other redstone it can be washed away right now.
The gate should not be washed away by water. I feel the same way about the repeaters in vanilla Minecraft. I think that the repeaters and, even more so, your gate look like strongly attached creations whereas redstone dust looks like you poured a bag of dust on the floor. Dust washes away; torches are extinguished, but contraptions should stay put.
Anyway, keep up the good work. I really like the interface and truth table. It is easier for me to think how to run my circuitry than the 2D gates previously available.
EDIT:
I was just installing your mod and had an ID conflict with another mod. No big deal I have a HEAVILY modded minecraft jar. Just made me think it would be nice if there was an simple way to change the BlockID of you gate. For now, I'll just change the other mods BlockIDs. I just wanted to suggest it in case other people use ID 129 and want to keep their mods organized i.e. 117-134 were used for BetterBlocks in my case.
I'm not a big redstone gate fan but I do use it every now and then of other projects with pistons and such, however the fact that is mod is compatible with other compact redstone devices is great and instead of like I seen the "flip flop" redstone torch theres another mod witch allows this without having to take up lots of space which in my book is great I dont like taking up lots of pace for projects. The truth table however took some time to understand how get it to work but nothing no one can't understand if they take the time and run some test trials.
In all honesty this mod allows for more complex without the max space that is needed to run redstone across a larger area, if indeed people use this mod along with other redstone device mods. Such being I'm currently using wireless redstone, and flip flop redstone torches which with this mod allows me to create projects that take up very little space at all and work perfectly.
As of right now I cant find anything wrong with your mod or based in logic as to whats wrong with it. Its impossible to use less space unless using a redstone device mod like this one. Of course mc community uses redstone in some way, form, or fashion, in all projects dealing with machines or other forms of redstone complexities.
Good mod for those who wish to cut down on the space and get more out of what they build.
Rollback Post to RevisionRollBack
"Nulpe" - Jerk
Supporter of "Build Craft, Industrial Craft, Finite Liquid, Power Craft"
Thanks for the feedback. I will add an override file for the blockID in the next version.
I've been playing around with the block to test it, by building a variety of redstone contraptions. Below you can find the 7-segment display.
Front view:
Back view:
From left to right:
Pulse clock (clock with integrated pulse generator)
4 bit counter
7-segment display
The majority of the blocks behind the display are just for compact wiring. There is a column of seven Redstone Gates in the center which does all the decoding. It counts from 0 to F and then loops.
Support the Allocator! Find my inventions such as my pressure plate removal detector on the About Me page of my profile.
I'm still looking for more feedback on my configurable Redstone Gate mod. All gates and common circuits (such as e.g. clocks, edge detectors, latches and Flip-Flops) in a single block.
Some what like that. but.. less in a binary style and more visually redstone. It pretty dam close to what i was looking for though.. ^ ,^ I'll give it a try.
a.k.a. the redstone PLA/PAL (programmable logic array/programmable array logic)
Abstract
This mod addresses the size of redstone contraptions by adding a programmable redstone gate block. The behaviour of such a block is specified by means of truth tables. Upon opening the block's GUI, the player can flag the individual sides of the block as either off, input, output or both. The GUI will automatically generate a truth table with all input combinations for each output. Each of these combinations can be flagged as either enabling or disabling the output with the click of a mouse button.
What can you actually do with a single block?
Well, a LOT! Naturally, all unary and binary gates are supported (NOT, repeaters, AND, OR, XOR, NAND, NOR, XNOR, implies, implied by, not implies, not implied by, A, not A, B, not B, True, False). Furthermore, this block can also combine two or three of these into a single block.
It is also very good at re-routing wires (vertical wiring, crossing wires, omni-directional repeaters). You can make clocks, 2-way repeaters, rs-nor latches, D,T and J/K Flip-Flops. Edge detectors, full adders, counters (or more specifically a single bit of a counter), etc..
Essentially, it reduces most of the content on the redstone circuit page on the wiki to a single block (not all). Furthermore, it can compute all these with a configurable delay from zero (instant) up to fifteen torch delays.
Videos
Here are some (now outdated) demo videos (tinypic.com). These videos are still of alpha1 which used absolute direction instead of relative ones.
The redstone gate block:
Risugami's Modloader
Download:
Older versions
The Redstone Gate mod v1.0 alpha1where input/output sides count as both an input and an output. Essentially you can have max 3 input/output ports and typically only two.
where I = Inputs, O = Outputs, T=Truth Table and D=Delay.
These values are entered in hexadecimal, i.e. valid characters are: 0123456789ABCDEFabcdef
To input a new code just start typing the characters. Enter will accept the code, backspace will erase a character and Esc will abort entry. To view the code of an existing block just hit backspace once (i.e. while you are not editing the code). This will drop you into the edit dialog with the current code visible.
Using these codes, you can easily share block configurations with other Minecrafters without having to post screenshots and/or replicate truth tables. Block orientation is NOT copied, so if it is relevant (e.g. in a complex multi-block circuit) then describe that manually.
Redstone Gate v1.4.1 beta for Minecraft 1.0.0. (No changes aside from update to 1.0.0).Demo worlds
Ask me if you want to have your Programmable Redstone Gate based creations added here (the older ones don't use the new input/output sides yet).
Install ModLoader (copy class files into Minecraft.jar); add mod class files into Minecraft.jar; add redstonegate.png to the gui folder in Minecraft.jar.
Mod motivation
Redstone has enabled the minecraft community to build extremely impressive contraptions but this level of creativity requires space, lots of space. As a consequence the suggestions board has seen many requests for integrated circuit blocks which pack entire redstone circuits into a chest. Though possible, such an approach would require a lot of storage per block and a fairly complex simulation (essentially hierarchical redstone evaluation).
This mod approaches this problem from a different point of view: truth tables. Truth tables have several significant advantages over simulation chests. First of all, they are the standard way of describing the behaviour of gates. Second, they can express all elementary gates. Third, they allow for a quick lookup to determine what the output of a block should be. Finally, they can be compactly stored (this mod adds a TileEntity which stores two bytes and one integer, i.e. 6 bytes total).
Crafting recipe
User interface
This picture demonstrates how the user interface currently looks in-game. In the upper left side there is a box which specifies which sides are inputs and which ones are outputs.
Here the left, bottom (/down) and right sides are switched off. The back is an input and the top (/up) and forward sides are specified as input/output sides (i.e. both, which allows the gate to read its own output). On the right side of the interface is the generated truth table. Each output side can be configured individually which allows multiple gates to be placed in a single block. The function shown here is an edge triggered T Flip-Flop (back is the input, forward the output and up is auxiliary state used for edge detection).
The bottom left corner contains a quick configuration box for manipulating the table and the delay box allows specification of the signal propagation delay (0 to 15 torch delays). When using delay 0, it acts as an insta-gate (immediate response, but max 1 update per torch delay). Click the delay to increase it and shift-click it to decrease it.
Connectivity wise, the redstone gate block functions like a multi-directional repeater. It can read the current from powered blocks and can send power into a block. A wire does not have to be fed directly into the block, if it visually connects then the block can read it.
Quick config box details:
This box allows you to quickly enable (ON), disable (OFF) or invert (NEG) all outputs and configure several common gates (AND, OR, XOR, NAND (AND+NEG), NOR (OR+NEG), NXOR (XOR+NEG)). For example to make an AND gate between left and right inputs. Click left and right to set them to inputs and then click AND. I hope that this will allow users which are not familiar with truth tables to more gradually roll into them.
The implication and implied by gates are not included as they don't scale to three or more inputs. These can still be created manually through the truth table or through the advanced auto config (A implies B is equivalent to not(A) or .
Advanced auto config.
Shift-clicking an input or output in the input box will cycle it through three states: regular (shown with a diode symbol), inverted (shown with a not gate symbol) or ignored (no symbol).
When pressing (AND, OR, XOR, ON or OFF) in the auto config box, the state of the inputs and outputs is taken into account. I.e. only active outputs are modified and inputs or outputs with NOT gates are reflected accordingly in the truth table.
Whenever you open the user interface it will always default to non-inverted inputs and outputs.
For instance, if you want to set the front output to left IMPLIES right, then mark left and right as inputs (left-click). Disable up/down/back by shift-clicking and invert left (shift-click). Finally press OR. Once you get more familiar with truth tables, direct manipulation of the table will be faster. In the latter case, this functionality might be useful if you have four inputs and want one of the outputs to be a basic function of exactly two inputs.
To make matters even more complicated, hitting a quick config button will normally set the truth table to exactly that function (i.e. disable all other active states). If you shift-click a quick config button, the function is added to the truth table. I.e. any existing active output states will remain active.
This functionality was easy to code and allows you to configure any boolean function without touching the truth table directly, but direct editing is a lot quicker and simpler, so I'm not exactly sure yet how useful it is.
Posters, banners and other promotional material
Top:
Bottom:
Code:
Poster:
Code:
How to read the truth table
Let's consider the example image above and focus on a single entry. For example, let's take state 001 on the row marked as front. Since it is on the row labeled as front, we are defining the output (on/off) of the block or wire directly in front of the block (sounds logical, right?). In the column header above you can see to which input sides the digits correspond. Here: U(p)F(ront)B(ack). So for 001 this means that when the block above the gate and the block in front of it are not powered but the block behind it is then the front output will be switched on since 001 is green. If it is red, then the output would be off.
The T Flip-Flop is a fairly complex gate (strictly speaking it's a circuit, not a gate). The basic logic gates (and, or, xor, nand, nor, xnor, implies, implied by, etc..) are easier to understand than this one.
Todo, requested input and feedback
I'm not a texture artist. The current block simply reuses half-slabs and repeater textures. If any community member can make a decent texture for this, I would gladly add it to the mod. Keep in mind that the block has an orientation so the top should recognizably show the front direction. Also the input/output images could be improved a lot.
Feedback on usability, behaviour and gameplay changes, other feature requests, etc. is most welcome.
Todos and changes for the next version
TERMS AND CONDITIONS
0. USED TERMS
MOD - modification, plugin, a piece of software that interfaces with the Minecraft client to extend, add, change or remove original capabilities.
MOJANG - Mojang AB
OWNER - , Original author(s) of the MOD. Under the copyright terms accepted when purchasing Minecraft (http://www.minecraft.net/copyright.jsp) the OWNER has full rights over their MOD despite use of MOJANG code.
USER - End user of the mod, person installing the mod.
1. LIABILITY
THIS MOD IS PROVIDED 'AS IS' WITH NO WARRANTIES, IMPLIED OR OTHERWISE. THE OWNER OF THIS MOD TAKES NO RESPONSIBILITY FOR ANY DAMAGES INCURRED FROM THE USE OF THIS MOD. THIS MOD ALTERS FUNDAMENTAL PARTS OF THE MINECRAFT GAME, PARTS OF MINECRAFT MAY NOT WORK WITH THIS MOD INSTALLED. ALL DAMAGES CAUSED FROM THE USE OR MISUSE OF THIS MOD FALL ON THE USER.
2. USE
Use of this MOD to be installed, manually or automatically, is given to the USER without restriction.
3. REDISTRIBUTION
This MOD may only be distributed where uploaded, mirrored, or otherwise linked to by the OWNER solely. All mirrors of this mod must have advance written permission from the OWNER. ANY attempts to make money off of this MOD (selling, selling modified versions, adfly, sharecash, etc.) are STRICTLY FORBIDDEN, and the OWNER may claim damages or take other action to rectify the situation.
4. DERIVATIVE WORKS/MODIFICATION
This mod is provided freely and may be decompiled and modified for private use, either with a decompiler or a bytecode editor. Public distribution of modified versions of this MOD require advance written permission of the OWNER and may be subject to certain terms.
Copyright © Darquan 2011.
Not familiar with truth tables? Don't worry, it's a very simple concept. Read this:
The following image displays the typical representation of a truth table (figure A) for an AND-gate with two inputs called A and B.
This is also the shape of the truth tables as you encounter them on the Minecraft wiki pages.
Each row of a truth table lists the on/off state of all its inputs on the left and the output it generates on the right.
This table says that output O is on (1) if, and only if, both inputs A and B are turned on. In all other cases it is turned off (0).
In my mod, I represent this truth table by first joining all input combinations together, like shown in figure (B).
Then, instead of displaying the output column, I colour the inputs red if the output is off (0) and green if the output is on (1), as shown in figure (C).
Finally, I rotate it counter-clockwise and put a label of the output side on the left, as can be seen in figure (D).
Instead of using names, I mark the inputs by their relative side. For instance L(eft) and R(ight) in figure (E).
Further reading: wikipedia:Truth_tables.
I'm still looking for more feedback on my configurable Redstone Gate mod. All gates and common circuits (such as e.g. clocks, edge detectors, latches and Flip-Flops) in a single block.
I'm still looking for more feedback on my configurable Redstone Gate mod. All gates and common circuits (such as e.g. clocks, edge detectors, latches and Flip-Flops) in a single block.
"Look at me still talking when there's science to do. When I look out there it makes me glad I'm not you."
Would you be willing to motivate what you do not like about it? Do you just disagree with the idea of compact circuitry (which is often requested) or do you have specific issues with the way I addressed it?
I'm still looking for more feedback on my configurable Redstone Gate mod. All gates and common circuits (such as e.g. clocks, edge detectors, latches and Flip-Flops) in a single block.
This might make no sense what so ever...lol
While that would be possible, not all gates have names and it is impossible to name them all. To give an idea of how many different gates this block allows. Consider the following computation.
Regarding unique input/output sides:
A gate with n inputs can assume 2**n input combinations and has (6-n) outputs. For each input combination each output is either on or off. So the total number of gates which can be made with n inputs is given by: 2**((6-n) * (2**n))
The amount of gates per input are given by:
Apologies if I screwed up my math, it's late :tongue.gif:
I'm still looking for more feedback on my configurable Redstone Gate mod. All gates and common circuits (such as e.g. clocks, edge detectors, latches and Flip-Flops) in a single block.
Thank you, glad to hear someone appreciates the idea.
As for your question, nothing to worry about. Just a couple of extra indirections.
I'm still looking for more feedback on my configurable Redstone Gate mod. All gates and common circuits (such as e.g. clocks, edge detectors, latches and Flip-Flops) in a single block.
Most notable change is the usage of relative directions now instead of absolute directions. This no longer requires you to know where the north is to configure the gate. More importantly, the output patterns are now independent of the blocks orientation which means a screenshot of the truth table is sufficient to copy the gate.
I'm still looking for more feedback on my configurable Redstone Gate mod. All gates and common circuits (such as e.g. clocks, edge detectors, latches and Flip-Flops) in a single block.
Do you ever build redstone circuits? If so, then please enlighten me what is so complicated about this. Truth tables are a well established and extremely simple way of describing the behaviour of gates.
Is the interface unclear?
I'm still looking for more feedback on my configurable Redstone Gate mod. All gates and common circuits (such as e.g. clocks, edge detectors, latches and Flip-Flops) in a single block.
Not to useful though, because mods make Redstone way less impressive (esp. a total mod like this) so maybe just for building that cluster of microprocessors to regulate your base?
Perhaps the contraptions become less impressive, perhaps they become more impressive. Miniaturization usually leads to increase in power and abstraction leads to increased complexity.
Yes, you can construct a lot of things in a very compact manner with this. I actually like to automate stuff without needing several chunks to store the automation in. I just found a design for a counter which uses 3x1x2 per bit. The biggest challenge is finding an efficient way to run your wires.
Does this mean that building counters has become boring? No, it means that using counters in regular play (as opposed to redstone megaprojects) becomes feasible.
I'm still looking for more feedback on my configurable Redstone Gate mod. All gates and common circuits (such as e.g. clocks, edge detectors, latches and Flip-Flops) in a single block.
You asked if the "inputs/outputs be turned on/off by clicking them or by placing a torch/wire in their slot", I think this would be a good idea if the redstone cost in gate creation were less, perhaps 4-6 redstone instead of 9. This would even up the basic gate costs to ~9 redstone and scale with complexity. But I think I like the way it is now where in-/outputs are activated by click and a 9-cost gate. It makes the gate a bit harder to craft, but then it can be used however you want without further complications.
I think the block should cut wires. There are, of course, ways to work around this, but it would be easier as a user if wire were cut so I could have more precision in controlling the gate.
The gate should not be washed away by water. I feel the same way about the repeaters in vanilla Minecraft. I think that the repeaters and, even more so, your gate look like strongly attached creations whereas redstone dust looks like you poured a bag of dust on the floor. Dust washes away; torches are extinguished, but contraptions should stay put.
Anyway, keep up the good work. I really like the interface and truth table. It is easier for me to think how to run my circuitry than the 2D gates previously available.
EDIT:
I was just installing your mod and had an ID conflict with another mod. No big deal I have a HEAVILY modded minecraft jar. Just made me think it would be nice if there was an simple way to change the BlockID of you gate. For now, I'll just change the other mods BlockIDs. I just wanted to suggest it in case other people use ID 129 and want to keep their mods organized i.e. 117-134 were used for BetterBlocks in my case.
In all honesty this mod allows for more complex without the max space that is needed to run redstone across a larger area, if indeed people use this mod along with other redstone device mods. Such being I'm currently using wireless redstone, and flip flop redstone torches which with this mod allows me to create projects that take up very little space at all and work perfectly.
As of right now I cant find anything wrong with your mod or based in logic as to whats wrong with it. Its impossible to use less space unless using a redstone device mod like this one. Of course mc community uses redstone in some way, form, or fashion, in all projects dealing with machines or other forms of redstone complexities.
Good mod for those who wish to cut down on the space and get more out of what they build.
Supporter of "Build Craft, Industrial Craft, Finite Liquid, Power Craft"
I've been playing around with the block to test it, by building a variety of redstone contraptions. Below you can find the 7-segment display.
Front view:
Back view:
From left to right:
I'm still looking for more feedback on my configurable Redstone Gate mod. All gates and common circuits (such as e.g. clocks, edge detectors, latches and Flip-Flops) in a single block.
P.S. Your rank is funny with this mod and all (Redstone Miner)
Also, how does a t-flipflop work, the old one not the piston one.