• 0

posted a message on 2-Digit Addition Calculator

Finally got around to building a redstone calculator...

First thing's first: I'm a bio major, not a computer science major. All I really know is that computers work in binary, so that's all I had to go off of when trying to design this monstrosity. I was basically starting from scratch, but I think I have a working design.

The keypad is laid out the one on the keyboard (button on bottom is zero), the red button is clear, and the green button is a +/= button.

I think it all fits within what chunks would normally be rendered, but it is mighty long.

Okay, now for the nuts-and-bolts of how this thing works...

This first stage, in lime wool, is simply getting outputs from the keypad. However, since it's a 2-digit calculator, when you type in a "6," you don't know if that "6" is just "6" or if it's actually "60," so I had to convert each number twice: once for if it's the ones-digit and once for it it's the tens-digit. The white-and-black lines below convert it to binary for the ones-digit, and the grey and dark grey lines above convert it to binary for if it's a tens-digit.

This next part (in pink) essentially just figures out which digit it is, ones or tens, before it actually stores those values in the calculator. You can see that the numbers you punch in are stored in T-flip-flops on either side.

It decides which one to put in based largely on this dropper, which has 2 non-stackable items in it. Each time you press a number button, it pushes one into the hopper, so then if you press another number button, it will know that the last number you put in is a tens-place and that this number is a ones-place. Pressing the "+/=" button is the red line, and if that's pressed, it just adds the number in as a ones digit and prepares everything for another number to be put in (it empties the hopper and resets the T-flip-flops that store the actual binary numbers). The yellow line is the clear circuit, and it also resets everything here.

Here's where the actual addition happens, and I used a binary counter to actually add everything. Sethbling posted about a tiny binary counter, and I used that to add the binary numbers together (multiple digits implies addition, so everything works out to just be slammed in here).

Although, the reset circuit for this part was very tricky. I needed to push the slime block towers down, then I needed to pull the observer down, pull it back, then push it back up.

The redstone blocks on top of those slime block towers send a signal up here, where we can finally get to the 198 AND gates I had to make. One for each possible number.

Here they are. The torches represent where a one needs to be in order for the answer to be that number.

However, those "AND" gates only work partially. I'm only testing for ones, not zeroes. So, if the answer in the calculator is 00000001, the "AND" gate for "1" turns on, but if the calculator spits out 0000011, then the "AND" gates for "3," "2," and "1" all turn on. Therefore, I need to only take the greatest number whose "AND" gate is on. that's what this circuit on top of the "AND" gates does. It locks out all the previous outputs.

The "AND" gates run into these slime block things. These encode the digits that the calculator must display on the 7-segment display. There are actually 2 layers of "AND" gates: the bottom layer for the numbers 0-99, and the top layer for the numbers 100-198. Since the ones and tens-digits line up so nicely, I can just use another slime block tower to use the exact same digits as the circuit below it. The "AND" gates actually run out into both sides, one side for the ones digit and the other for the tens/hundreds digit (there's only ever 1 hundreds digit).

Lastly, the display is run by those brightly coloured lines.

Like I said, I'm not a computer science major, and I'm sure there are better ways to do things, but this is what I was able to come up with (mostly) on my own.

Posted in: Redstone Creations
• 1

posted a message on Non-Stackable Item Filtration System

I think I found a way to (sort of) filter non-stackable items, narrowing them down a bit.

This thing has many branching paths, but let's see where they go:

The input starts up here, in this double-chest, where it goes down into this yellow bit:

The hopper is pointed at the brewing stand, and if the non-stackable item in question is a potion, it will go into there and get taken out into the chest, which is output #1: Potions. Unfortunately, I couldn't find a way to filter out the different kinds of potions without destroying them, but if you think of one, let me know.

If the item is not a potion, it will go down into a hopper below, which is locked for a short time to ensure potions have a chance to go into the brewing stand, where it moves on to the next step:

Here, we can separate out certain items. Flint and Steel, Shears, Water Buckets (including the ones with fish in them), and Lava Buckets all stay in the dispenser. Other items are shot out. Shulker boxes get placed, but are broken and carried on by the piston.

Here you can more clearly see that items that are shot out go to the left, while anything still in the dispenser will go the right. Fish in the buckets unfortunately don't get picked up again by the dispenser, so the fish will eventually die and go the right as well.

The next step (for items that are shot out of the dispenser and went to the left in the previous image) involves filtering out both minecarts and shulker boxes. Shulker boxes can't get placed on the rail and simply get stuck in the dispenser, and are taken out from below. Minecarts get placed onto the rails and get broken by a cactus. Minecarts with a chest or furnace are broken down completely, and a non-stackable item filter will separate out the minecarts specifically. Other items are just shot out. Here you can also see that I just use a regular non-stackable item filter to get rid of the fish that would be left behind by the fish-in-a-bucket items.

This next step will separate out boats. The boats get place in the water and are then pushed over and broken by the cactus, but other items are just shot out into the hopper.

The next set of items I can filter away are armour items (including turtle shell helmets and elytra), since they can get placed onto an armour stand by a dispenser. The item is shot out, and, if it's armour, it gets placed onto the armour stand, which is then pushed off to a chamber below. If it's not armour, the item is picked up by a hopper underneath the trapdoor.

The armour stand drops into this chamber, where it triggers a tripwire, which retracts that downwards-facing piston. That allows the skeleton to see an iron golem, which prompts it to shoot. The arrow breaks the armour stand, and if one arrow does escape, the water ensures it will never reach the golem and kill it. The armour stand and whatever armour it may or may not be wearing is dropped and put into the hoppers.

The armour stand is filtered out via a non-stackable item filter and put back up top into a dispenser where it can be used to filter out more items. The armour is non-stackable and winds up in an output hopper (the chest).

Everything else, including tools, weapons, books and quills, cakes, soups, milk buckets, banner patterns, and enchanted books all wind up here. I tried to use pandas to filter out cakes, but they were way too unreliable. If you can think of any way to narrow those kinds of items down, let me know, but until something comes up, this is just the "misc." output...

However, going all the way back here, items that stay in this first dispenser (water buckets, lava buckets, flint and steel, and shears) are all going to the right (the dispenser fires multiple times so water/lava buckets are picked back up).

They first go into the dispenser on the left. Lava buckets just get shot out since you can't place lava into a trapdoor. They are picked up by a hopper and put into this chest. Flint and steel/shears both stay in the dispenser and are taken out from below it. Water buckets waterlog the trapdoor and leave just a bucket in the dispenser.

The regular bucket is separated out via a non-stackable item filter and put into the dispenser on the left, where it takes the water out and goes into the chest down below it.

Flint and steel/shears both go down here instead, where the flint and steel lights the netherrack on fire, causing a block update, which triggers an observer and allows it to flow down below, but shears don't cause any such block update and just wind up going off to the side.

So, in short, I was able to separate out potions, shulker boxes, minecarts, boats, lava buckets, water buckets, armour, flint and steels, and shears. If you can think of a way to filter out more, please let me know so this machine can be improved upon.

Posted in: Redstone Creations
• 0

posted a message on Capture-the-Point System with Optional King-of-the-Hill

Here's a device I made specifically for a minigames-type world. It's a highly configurable capture-the-point system with an option for a king-of-the-hill mode.

Standing on a pressure plate will change the beacon to that colour. If king-of-the-hill is enabled, more lamps will turn on of the side you're on for as long as the point is in your team's control.

The mechanism is pretty simple: standing on a pressure plate activates an observer clock that puts items out of one dropper and into the other. If enough items are in one dropper versus the other, a glass block is put over the beacon and hopper clocks are unlocked. These hopper clocks are for king-of-the-hill, and if you don't want that, they're entirely optional.

I think it's pretty useful. It's small, and you can configure how quickly the point captures by how many and what type of items you put in the droppers (If you want it to go super quick, you can use non-stackable items, if you want it to go super slow, use only items that stack to 64, etc.).

Posted in: Redstone Creations
• 0

posted a message on Piston Face Emulator

Yes, just like the last one. You can hook it up to whatever you want, but I just have it cycling through various faces with a feed-tape.

Posted in: Redstone Creations
• 0

posted a message on Piston Face Emulator

I finally figured out how to make my face emulator that I posted not too long ago with pistons:

Like the last one, each block of the bottom two rows are individually toggleable, you can toggle the eyebrows, and their's a "nose" block in the centre just above the mouth area.

Here you can see the circuitry. Every colour (except for the brown, which is for the piston feed-tape) just goes into a different block.

The hardest block to wire up, of course, was the central block on the second-from-the-bottom row, marked here:

This is because there is no way to avoid BUD-powering. You can't power the piston directly or else you BUD-power the piston below it, and you can't go above that piston or else you directly power the "nose" up above it.

However, I then remembered that zero-tick pulses don't trigger BUD powering, so I had to use that to power the block safely.

Posted in: Redstone Creations
• 0

posted a message on Minecart Bank

I think Sethbling did a concept like this before, but here's my attempt:

Much like my Shulker box bank, you open accounts with copies of a written book that way only you can access your account. You put your "keycard" book into the dropper and press the button. The minecart shows up on the rail to the left and you need to wait for it to go back, which is indicated by the lamp on the side.

Those yellow circuits are item sorters for the "keycards," the hopper lines simply transport items, the lime things are just structures to hold the minecarts, the magenta is the minecart line to the player, the grey is the minecart line back to its holding position, the light blue is to detect if the minecart is has left its holding position, the orange releases the minecart, the green if for the lamp indicator, and the blue is to seal off a holding position if it already has a minecart in it.

Here's a detailed look at one module:

This design could be compacted a bit more, but I think the proof-of-concept is pretty cool.

Posted in: Redstone Creations
• 0

posted a message on Searchable Storage System

For those of you who have too many items, now you can search up what you want.

You put in your search query into the two hoppers in the floor, then press one of the purple buttons to get a certain amount of items. The purple circuits run into the hopper timers (light grey) which run into the pulse multiplier (red) then into the droppers. In the meantime, the search query will place down an orange block so that the dropper can be powered. Hopper chains bring the items to the output chest. The light blue and yellow circuits are item filters, and the excess item gets put back into the search item chest.

Posted in: Redstone Creations
• 0

posted a message on Programmable 3x3 pixel display

They work now, and it looks really good.

Posted in: Redstone Creations
• 0

posted a message on Colour Combo Lock

I'm here to submit a design for a colour combo lock. It can be (relatively) easily expanded, and each slot has 16 possible entries, and since right now it has 5 slots, it has 16^5 combinations.

It uses a redcoder to get individual outputs from each of the buttons which are all placed right next to each other, and there are actually 2 piston feed-tapes to ensure a secrete combination.

Posted in: Redstone Creations
• 0

posted a message on 1-Wide Tileable Etho-Door

I'm sure someone has done this better already, but I just love watching this open and close.

All you need to do is run power into both sides. All the pistons are sticky except for the ones under the concrete powder.

Here it is in action: https://i.imgur.com/9rNSAhR.mp4

I know it isn't particularly impressive, but sometimes you need to make something just because you like it.

Posted in: Redstone Creations
• 1

posted a message on Slot Machine

I've added several layers of randomness, so I'm not sure what the odds of winning actually are. I just know they're low.

There are 3 slots, and each one will change if you press the button to spin. If it's spinning, the light is on.

Each slot has 4 possible options: blank (glass), gold, iron, or diamond. If all 3 match, you win the respective jackpot. The slots are obviously piston feed-tapes. Each piston feed tape moves randomly, and there is a 1/9 chance that your spin will end at any given moment.

The brains of the machine are actually these smaller piston feed-tapes up top, which all 3 have cauldrons inside them so that 1/3 full correlates to an iron block, 2/3 full correlates to gold blocks, and the full cauldron correlates to the diamond block. If all 3 match, which I detect using orange redcoders and the grey, white, and black AND gates, you get an output, which is the brown circuit.

This machine could definitely look nicer. The brown circuit can go to whatever you want (mine looks ugly since I made it go back to front), and the purple circuit (which controls the lamp) will just go wherever you want the lamp to go.

Posted in: Redstone Creations
• 0

posted a message on 9-Digit Combo Lock

It depends on how long you make the combination. I made mine 4 digits, which is 9^4 combinations.

Posted in: Redstone Creations
• 0

posted a message on Fully Functional Virtual Pet in Minecraft

Thank you. I think he's my go-to for building faces. I've tried doing other people, but they just don't look quite as good.

Posted in: Redstone Creations
• 0

posted a message on 9-Digit Combo Lock

You can also add an AND gate between the output and any button press so that if they punch just one too many buttons it will trip. Then just run it into the reset circuit.

Posted in: Redstone Creations
• 0

posted a message on 9-Digit Combo Lock

I haven't actually found that many of these, but I know others have made them. Nonetheless, that hasn't stopped me before:

The green button is to get an output once you've punched in the correct combination and the red button is to "reset" and restart punching in the code.

Everything before that line of comparators (everything behind that green line that runs across the machinery) is simply me trying to get the outputs from all of those 9 buttons into a straight line. The purple line is the output, which, right now, just powers a lamp. The red circuit towards the end is the "wrong number" circuit, the black line is for the reset button, and the lime line is for the "submit" button.

The actual brains of the machine are in the very back. Each time you punch in a correct number, an item moves from one of those bottom droppers into the top ones, and when all the top droppers are full it will activate the blue circuit (an AND gate) to allow an output. Every time a button is pressed, the hoppers down there de-power for a split second to allow the item to shift over by one so the next dropper pair can be powered. The reset line moves all items out of the top droppers back down into the bottom dropper and allows the item in the hopper to cycle all the way back. If you punch in a wrong number, it activates the reset line.

This way, if you punch in a wrong number, you will have to start over and the code you entered will be wrong. If you punch in the correct numbers in the wrong order, there will be items missing from some droppers (since only one can get activated at a time).

Posted in: Redstone Creations