- Registered Member
Member for 11 years, 8 months, and 27 days
Last active Sat, Oct, 27 2012 16:45:32
- 0 Followers
- 988 Total Posts
- 54 Thanks
Mar 9, 2012Update for 1.2.3 is now available.Posted in: Minecraft Mods
Aug 17, 2011The redstone gatePosted in: Minecraft Mods
a.k.a. the redstone PLA/PAL (programmable logic array/programmable array logic)
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.
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:
- Part I: basic circuitry. This video shows some simple gates, vertical wiring and a clock.
- Part II: intermediate circuitry. This video demonstrates latches, Flip-Flops, Pulse generators and adders.
- The following video by CaptainSparklez demonstrates several redstone mods. Many thanks to CaptainSparklez for including my mod. This mod is shown at 5m15s mark ():
- Mediafire: Redstone Gate v1.4.3 beta for Minecraft 1.2.3
- Zippyshare: Redstone Gate v1.4.3 beta for Minecraft 1.2.3
- Mediafire: Redstone Gate v1.4.2 beta for Minecraft 1.1
- Zippyshare: Redstone Gate v1.4.2 beta for Minecraft 1.1
- 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.
The Redstone Gate mod v1.0 alpha1
- The Redstone Gate mod v1.0 alpha2 Changelog:
- Replaced absolute inputs (north, east, south, west) by relative inputs (front, right, back, left).
- Blocks are now facing a direction when placed and the texture matches that direction.
- Misc. minor tweaks
- Minecraft 1.8.1 - The Redstone Gate v1.1 Beta1
- Minecraft 1.8.1 - The Redstone Gate v1.2 Beta2 Changelog
- 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.
- RedstoneGate mod v1.3 Beta for Minecraft 1.8.1 Changelog:
- 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:
- 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.
- RedstoneGate v1.4b beta Minecraft 1.8.1 Changelog
- 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
Redstone Gate v1.4.1 beta for Minecraft 1.0.0. (No changes aside from update to 1.0.0).
(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.
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.
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).
- Demo world by Darquan.
- A nice demo world by Andoryn.
- 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.
- Demo world by Darkhog.
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.
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).
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
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
- Default truth table changed to all off. [done]
- Resolve BetterBlocks conflict [workaround implemented, might change default blockID]
- 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]
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.
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.
Use of this MOD to be installed, manually or automatically, is given to the USER without restriction.
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.
Feb 21, 2012Posted in: Redstone Discussion and MechanismsQuote from Zhul
@Darquan Please give us a schematic of that cool version in such a small vertical space.
Here is a world save. Let me know if you have any specific questions.
Oh wow. I'll have to check that in more detail tomorrow.
Feb 20, 2012Not sure if you are still working on this, but here are my latest versions:Posted in: Redstone Discussion and Mechanisms
The front one saves on vertical space but is 1 block wider, slightly deeper and wired a bit messy.
Compared to my previous design, these versions expose way less wire (2 pistons and 1 dust) and are conceptually much simpler to build. Let me know if you want it explained in detail.
- yellow wool: block detectors
- cyan wool: block detector for tree
- dark green: and-gate
- light-green: RS-NOR latch
- white: not-gate (the one above the latch contains an additional repeater and combines with a block detector to construct a missing-block detector).
- blue wool: vertical wire
- black wool: wire cutter
- red wool: block to transfer current.
Start trigger: tree has grown AND the pressure column is filled to the top.
End trigger: pressure column has been drained.
Managed to tidy and improve the wiring. It is now
11x16x510x16x5 (screenshot not updated).[/edit]
Feb 16, 2012Posted in: Minecraft ModsQuote from petrus4
Downloaded, Darquin. I will be testing this with great interest.
It is an odd coincidence that I found this tonight, actually; because I have been thinking of something similar over the past few days, although in the area of machines, not redstone circuitry.
You have a rather liberal definition of similar in my opinion :wink.gif: Anyway, this really belong in the Requests/Ideas For Mods section.
I welcome suggestions and input about how to adapt and change the mod, but I have no plans on making a BuildCraft alternative at this time. I do have a machine oriented idea which I would like to implement, but for now other projects take priority. I will share that one if and when it happens :smile.gif:
Jan 15, 2012Now supports Minecraft 1.1.Posted in: Minecraft Mods
Jan 2, 2012Posted in: Redstone Discussion and MechanismsQuote from GWigWam
Yes there is! if you mean a half redstone (You didn't mean that, did you?) tick. That tick can be twice as short. But still not shorter then a game tick.
When I say tick then I refer to a game tick, i.e. the tick as referred to in the Minecraft source. I refer to the delay of a repeater (first setting) or torch as a single torch-delay or as two ticks.
The (game) tick cannot be subdivided into a smaller unit. Mods can trigger stuff at a zero tick delay which means that the delay is variable and depends on your processor speed (and if the mod is poorly written, will crash your game when placed in a loop).
Quote from MinorIssue
I like us to think of the game tick almost as the speed of light, it is something we can approach but never pass.
I like us to think of the game tick as 1/20th of a second.
Jan 2, 2012The summary of CX gamer is pretty much spot on.Posted in: Redstone Discussion and Mechanisms
The ingame scheduler operates with ticks of 1/20th of a second. The majority of the community erroneously refers to a tick as 1/10th of a second because most redstone delays are multiples of 2 ticks (i.e. you don't normally observe a single tick in the game).
Instant gates (e.g. as seen in mods) use cascades of block updates to avoid scheduling updates which means they update as quickly as your computer can process them (essentially operating at 0 ticks).
There is no such thing in Minecraft as half a tick (i.e. 1/40th of a second) or nano-ticks.
Nov 25, 2011Posted in: Minecraft ModsQuote from mstram
Have you tried your "demo world" in MC v 1.0 ?
I've yet to install MC 1.0, as when I launch minecraft it's telling me it needs a JRE 1.5.0
What version of JRE are you using ?
Yes, I tried the demo world. Seems to work just fine. This reminds me that I need to release the new demo world done[/edit]. I use JRE 1.6.0 on Linux.
Quote from herobrineminer
nice now make the same but with rails!!!
What? Please clarify what you mean with this, because I don't get it.
Quote from Liquid Metal Slime
Question: Can you stack these to 64 and craft them back into Redstone Dust?
Yes, that is possible.
Nov 25, 2011Posted in: Minecraft ModsQuote from tomass1996
Yay MCP for MC1.0.0 is out. :smile.gif:
There is gonna be a flood of updated mods soon. XD
Thanks for the heads up, I missed that :smile.gif:
New version (no new features added yet): RedstoneGate for Minecraft 1.0.0
As always, let me know if there are any issues.
- To post a comment, please login.
Aug 22, 2011Animated Programmable PianoPosted in: Redstone Discussion and Mechanisms
Animated piston keys
Piano and Bass keyboards
12 Measures/bars stored on each Piano Roll
Easy to program
Music: J.S Bach - Air on the G string
Download Link: (Music wiped) http://www.mediafire.com/?g1r8l6lsiqtz5sn
My "OCD" texture pack will be ready soon!!!
Aug 16, 2011Posted in: Redstone Discussion and Mechanisms
Do you guys like it? Have ways to improve it?
Original/Inspiration by Darquan: http://www.minecraftforum.net/topic/472649-reed-growth-detector/#entry6228111
- To post a comment, please login.