• 1

    posted a message on [1.2.3] The redstone gate / PAL v1.4.3 beta [block]
    Update for 1.2.3 is now available.
    Posted in: Minecraft Mods
  • 26

    posted a message on [1.2.3] The redstone gate / PAL v1.4.3 beta [block]
    The redstone gate
    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 ():
    Risugami's Modloader

    Changes: update for Minecraft 1.2.3

    Older versions
    • 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:
      • (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.
    • 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
        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). 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.

    Posters, banners and other promotional material

    • Creator: TessaLove
    • Full:



    • Creator: Darkhog

    • Creator: tomass1996
    • Banner:




    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]

    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.


    2. USE
    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.

    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.
    Posted in: Minecraft Mods
  • 1

    posted a message on Automatic Tree Farm?
    Quote 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.

    @JL2579's design.
    Oh wow. I'll have to check that in more detail tomorrow.
    Posted in: Redstone Discussion and Mechanisms
  • 2

    posted a message on Automatic Tree Farm?
    Not sure if you are still working on this, but here are my latest versions:

    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.

    Quick legend:
    - 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.

    [edit]Managed to tidy and improve the wiring. It is now 11x16x5 10x16x5 (screenshot not updated).[/edit]
    Posted in: Redstone Discussion and Mechanisms
  • 1

    posted a message on [1.2.3] The redstone gate / PAL v1.4.3 beta [block]
    Quote 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:
    Posted in: Minecraft Mods
  • 1

    posted a message on [1.2.3] The redstone gate / PAL v1.4.3 beta [block]
    Now supports Minecraft 1.1.
    Enjoy and please let me know if there are any issues.
    Posted in: Minecraft Mods
  • 1

    posted a message on Nano-tick science
    Quote 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.
    Posted in: Redstone Discussion and Mechanisms
  • 1

    posted a message on Nano-tick science
    The summary of CX gamer is pretty much spot on.

    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.
    Posted in: Redstone Discussion and Mechanisms
  • 1

    posted a message on [1.2.3] The redstone gate / PAL v1.4.3 beta [block]
    Quote 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 [edit]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.

    Question: Can you stack these to 64 and craft them back into Redstone Dust?

    Yes, that is possible.
    Posted in: Minecraft Mods
  • 1

    posted a message on [1.2.3] The redstone gate / PAL v1.4.3 beta [block]
    Quote 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.
    Posted in: Minecraft Mods
  • To post a comment, please .