Tuesday, June 24, 2014

Minecraft: What is Redstone?

Rovers, I realize I've been remiss. I've jumped way into the deep end on red stone, and some of you may have no idea what the heck it is.  You may not even be a Minecraft player!  Let me treat you to the best part of Minecraft.

Minecraft is a game with a simple art style.  In the survival gamemode you are dropped alone into a wilderness to find food, find shelter, and survive.  You will craft tools, build shelters, and have to mine, farm, and fight to stay alive.

Redstone is a special ore you find while mining deep underground.  They are red speckled blocks that can only be broken with an iron mining pick (if you break it with a stone or wood pick, you won't get any dust).  When broken you get dust.


This dust forms the basis for a sort of electricity in the world of Minecraft.  This electricity can open doors, spring traps, turn on lights, move an entire stairwell.  The possibilities are largely endless because there is a way to change, move, or alter most of the things in the world.


On a deeper level, red stone could be the basis for an electrical engineering degree.  Players have made calculators, computers, digital clocks, and more just by combining red stone items to create things that exist within the electronics sitting on your desk or coffee table.  Indeed, digital and analog circuits are in every piece of electronics you own.

Red stone is great because it can be as simple or complex as you want it to be.  If you want to open a door with a level or a button, its as easy as pie.  If you want to completely automate harvesting an entire farm of wheat, believe it or not it can be done.

My next post will start from the utmost lowest level of red stone.  We'll start building your appreciation for this wonderful stuff.


Monday, June 23, 2014

Minecraft: Vending Machines



Welcome, Rovers!  Today I'm going to look at the wonderful world of vending machines.  If you play solo a lot, you probably don't have a need for a vending machine.  If you play on multiplayer servers, you may discover you'd like to put some of your hard won loot or well built goods up for sale.  The problem is you are a rover.  You don't want to have to sit there and monitor your shop personally.  Worse yet, setting up a shop with a chest full of stuff and a chest for payment is like asking to be robbed.  

The picture above is my first stab at an armor store.  The way the machine works is the customer throws (Q key) a diamond into the hopper, and the dropper spits out their purchase.  We'll be doing a deep dive on another of MrCrayfish's designs: https://www.youtube.com/watch?v=B82PxfnZkug


It starts with a 3 block deep hole in the ground.  For the benefits of showing you how it works, I'm going to build it above ground, but please remember to build it in a 3 deep hole.

The whole shebang starts with a chest, and then two hoppers feeding into it.  The top hopper is empty and just servers to receive the payment. The second will serve as a filter.  You will set it up to take a certain block as payment.

The beauty of it is if they throw the wrong block in, it will just sit in the top hopper and they can collect it back.  When you're building a vending machine you don't want to have to always come running when someone puts in something valuable to them and they need it back immediately.

If you try throwing things in right now with just these three items set up, it will all just filter into the chest.  We need to set up a circuit to stop that.  Well, it will do a lot more.

Now you'll place the above circuit.  Put two blocks down in a line away from the chest.  On the first block put down a comparator, and the next a red stone repeater.  On the right side of the comparator, put down a red stone block with a piece of red stone dust.

You  are using the comparator in its standard comparison mode.  This means it will compare the signal from the hopper against the red stone block.  The red stone block gives a strong value of 15 (the max for a red stone circuit).  The hopper varies it's input based upon how full it is.  If the value coming from the side is higher than it's input, it won't pass through any power.  This means the hopper has to be full before the comparator passes any power into the circuit.

This power will then flow into the repeater which adds a small delay to the signal.  Put some red stone dust in the next square.  To the left of that dust place a block and affix a red stone torch on the side next to your repeater.  Place another repeater behind the torch, and then a block with some dust.

The block with the torch is meant to switch the value of the circuit.  If the comparator turns on, the red stone torch will turn it off.  This makes more sense when you find out WHY this part of the circuit is on.  Its feeding a constant power to the hopper.  This stops the hopper from dispensing items.

The state the circuit is in now locks the hopper in place.  if you were to drop items in they would all stop in the second hopper.  That said, the circuit isn't complete.


To complete the circuit, you need a block placed above that solitary red stone dust, with a red stone torch pointing to the right.  This is the only reason I can tell that dust is there for, but MrCrayfish is much better with red stone than I am.  Perhaps he can shed light on its purpose.

Now that the circuit is complete, if you put items in the top hopper, they will filter through the middle hopper until it is full.  When full it will pass one item into the bottom chest.  Congratulations, you've completed the payment portion of the vending machine.

Many shop owners would love to take a payment and never have to give anyone any goods, but sadly its not the way it works.  If people don't get product, they just tend to get mad.  We need to carry this momentary


A block, torch, block combo above the redstone torch you just placed will carry your signal up above the hoppers.  This will give you some room for the payment system.


This is the last part of the circuit.  a platform of 6 blocks.  A comparator next to the block bringing signal up.  Redstone across the front (with a block to bump it up) and around into a repeater.

This comparator needs to be clicked so it's front torch is glowing.  That places the comparator in subtraction mode.  When the circuit is dark like this, it is because 0 is being subtracted by 0 and there is no power to push on.

However, when the hopper has an item flow through it, the block will receive power.  This will be compared against the dead circuit and it will momentarily power, turning the dropper on long enough to drop one item.  The power will then flow through the repeater, whose delay allows the circuit to turn on at all.

but then the delay will end and the full signal will be subtracted against the full signal turning everything off.

 A vending machine is pretty useless until you set up a currency you want to take.  The easiest way to do this is to place 4 non stacking items in the right 4 spots.  I used beds because they're pretty cheap, but you can fill each slot with 64 dirt or cobblestone just as easily.

The important slot is the far left slot.  This is where you define your currency.  If it is empty, you can only accept non stackable items like beds or doors.  I don't think those are great forms of payment, but that's really on you.

Better is a stackable item like iron, gold, emeralds, diamonds, full blocks of minerals, coal, etc.  You have to figure out what people might think is a good deal.  once you settle on an item you want, you need to place a stack of 63 of them in the left-hand slot.


Then you go to your dropper, and fill it with items to sell.  If you sell weapons or armor, you'll need to refill it often.  Once it is full, you can press shift and place a ladder over the front.  This will prevent other users from just removing the items from it without paying.

Go ahead and toss some payment in, you'll have an item spit out at you.


An important thing to remember is a normal server without mods won't protect your vending machine from being destroyed, vandalized, or broken for the items or payment.  Your best bet for using this item in practice is either to play with people you trust a lot, or play on a server with protection plugins that allow you to control your own territory.


This is just a reminder, all of the above is meant to be built in a 3-block deep hole.  It is a lot more convenient for your shoppers.

Good luck in your business endeavors, Rovers!

Sunday, June 22, 2014

Minecraft: Lever Combination Lock


Welcome, Rovers!  This simple town is being built from the ground up in Creative Mode to test out a few different red stone contraptions.  I wanted to share these contraptions with you.  

Hopefully my breakdowns make everything much clearer, because red stone can be rather confusing.  Lets start with a programmable door lock.  The benefit of redstone is that it enables you to automate things, alter things, and generally have fun.

You may ask yourself why you would want a locked door at all in a game like Minecraft.  The more you play on public servers, the more you'll see a need for it.  As you collect the rarer materials such as gold and diamonds, you'll want to keep it safe from pilferers and vagabonds.

We'll be learning how to use the programmable lock detailed here by Youtuber MrCrayFish:  https://www.youtube.com/watch?v=01AtBtaH4bo&list=PL2FC870D708AECBBA&index=19

 

This is what the lock looks like from the outside.  You can make is as many levers as you would like.  When you set it up you need to place the levers at the second block from the ground.  The only key, for me, would be to end the lever line 3 spaces from the door.


Now here's the key!  Directly behind any lever that is angled down you need to place a red stone torch.  You do this because by default any lever that has been switched down turns the block it is attached to ON.   When you then place a redstone torch on the backside, it changes that input to off.  Place some redstone dust on the ground under the torch to create a circuit.

On the other hand, when a lever is in the up position, the block behind it is turned off.  Behind that, place a block with some redstone dust on top.

The end result of the circuit behind the levers is you want the whole thing to be dark.  If it is lit up, then you have a switch out of place.


The reason you want the lever circuit dark is the bit pictured above.  If you place the red stone torch and red stone to the door you'll see it light up.  This is the same as the switches before.  The red stone torch switches the input.  So if the circuit going in is on, the torch will turn it off.  If the circuit going in is off, it will turn it on.

The red stone dust then carries this to the door.

If the levers are correct, the result is an open door as pictured.  If one is out of place, it will turn everything off.

One last aside about this locking mechanism.  It can only create a maximum number of combinations.  So if you have 2 levers, there are only 4 combinations.  Obviously someone could break into your room with a few seconds effort.

The number of combinations comes out to 2^X.  So if you use 8 levers, there are 256 combinations.  If you use 16 (an absurd number to toggle all the time) then there would be over 65,000.

If you only toggle the last lever, it will defeat the purpose of the lock.  The first thing someone does when trying to break your lock should be toggling one lever at a time.  Leaving most of the combination in place defeats the complexity.

A last concern, if you play this on an un-modded server people are just going through the wall.  There are servers that establish protected plots for players that don't allow destruction by other users.  There are the places where locks like these can shine.