Welcome back settling here for those of you who have played Magica it’s got a pretty cool spell system where basically you can queue up a bunch of elements and then cast a spell and depending on what elements you selected it’ll cast that spell so these command blocks allow me to do Something very similar in Minecraft so if I press the two key it’ll select my second slot and then all I’ll have queued up a bolt spell so the two indicates a bolt spell now if I press five that’ll indicate that I want to queue out fire If I press eight that I’ll communicate I want to queue up air five is another fire eight is another air so now I’ve got a bolt spell and you can see it says bolt when I select it with two fire and two air which is fireball so it says I Cast fireball and then it lands and an explosion occurs and I can cast again – I want to cast bolt five fire eight air five fire eight air and I can just go ahead and cast a spell again so basically you’re only limited by how quickly you can type out – five eight Five eight and maybe if there’s a little bit leg on the computer maybe a limited by that – which is happening because there’s a lot going on here so there’s a bunch of spells that I programmed in so – to get another bolt spell five is fire Seven is Earth and then eight air sevens earth and I can cast this this is summon creeper and wherever the snowball lands that’s where the creeper is going to appear cast another bolt spell I’m going to use a tutor and water and go ahead and toss that and that’ll summon an iron Golem so different bolt spells now there’s other kinds of spells too so for instance if I press three I’ll get a ray spell and so if I queue up fire with this race bell I can cast fire right and this is kind of cool it shoots an arrow But it also creates this this line of fire a long where I’ve shot it doesn’t do much on short distance so if I press three and then five indicating I want to cast a race spell with fire like an eye and I shoot it only this far we rollin To get one piece of fire over the wherever the Ray lands but but over long distances if I shoot it really far and let me go ahead and go into creative mode so we can take a look it draws a line of fire across the whole Thing which is pretty cool and so I’ve programmed in a couple of different Ray’s spells and so three incoming ray and then six which is water is going to cast ice ray and that’ll leave a trail of ice and then Phi Q up and earth and a Fire it’s gonna cast magma ray which which will drop a bunch of lava so then there’s one final type of spell which is splash and if I press four I’ll get a I’ll cue up a splash spell and there’s a couple of different ones of those so if I get three air and two water and I throw the splash spell I’ll get invisibility and as you notice now I’m invisible if I go to f5 mode which is what I’m in now I’m invisible ooh if I’ve come on yeah so I’m now I’m invisible by the way You’ll notice that uh I can’t place I’m in adventure mode so I can’t place the fire or anything or the dirt or so if I try and right click to place the dirt it doesn’t do anything that’s a it’s the new adventure mode in in the 13 W sorry 14 W to see snapshot it doesn’t let you place any blocks so even though I have fire in my inventory I can’t actually place it there’s one last splash spell and basically that uses one of each elements so I’ll cue up splash and hit five six seven eight for each of the four Different elements and if I throw it splash spell I’ll get blitz which lets me run around like crazy for 15 seconds at all so yeah gives me jump boost and pretty cool so I can cast these spells as much as I want I kind of like casting Fireball because it’s kind of cool to be able to throw an explosion like that I’m kind of like my grenades but a little more configurable so there’s a lot of command blocks here and I probably don’t have time to go over all of those and a lot of you probably won’t understand What’s going on anyway but I’ll I’ll just go over the gist of it how everything kind of works at a high level I’m going to turn my volume down a little bit just make sure that the sound of this clock doesn’t drive you crazy so this is a redstone block Clock it just uses this command block and with a creating a redstone block with just destroy method and so it’s the fastest kind of clock even though this redstone looks like it’s always on it’s actually blinking on and off 20 times a second and so that’s triggering all These things now these guys are checking what your selected slot is this is a new feature in the snapshot as well you can test for a player with with a specific selected item slot so in this case this one’s looking for selected item slot 2 Which is actually the number 3 so if I press 3 you’ll notice this this comparator comes on if I press 4 it’s this one five six seven and eight is this one so it’s it’s the numbers start at 0 just because that’s the way things work in programming that’s how I’m Detecting what the player is pressing with their with their keypad and what number they’re using and then there’s some logic over here to clear out one dirt from your inventory and clear out another dirt from your inventory and clear so if you it’ll clear out up to Three dirt and each dirt it clears out will add one to your Earth score here and so that way we can tell how many of each item you have in your inventory it also clears out those items as it’s counting them so if I say 3 6 7 6 7 and I go ahead and shoot this thing if we look down real quick we’ll see two of the earth ones blinked on in two of the water ones blinked on and these are water clears out water and set your water score and so that’s what how we count how many how many items you’ve Queued up of each kind and then over here we this is the stuff that actually executes the spell and so when it’s detected that you have you know two fire and two air then it’s going to cast the spell which is basically the first spell which is spell equals one and it’s going To tell you that you’ve cast fireball and as soon as the spell has finished casting which is when the snowball goes away a it’s going to summon prime T and T and then teleport oops teleport the prime T and T to a wither skull okay what’s going on with this wither skull so Basically the way this works this uses something web we came up with and I’ve linked it in the video description when you throw a snowball or fire an arrow or throw a splash potion what happens is we summon a oops that’s not the right one we some in a wither skull with no Direction and and so it’s just going to sit still and then we’re constantly teleporting that wither skull to the you know to an arrow or to a thrown potion or to a snowball and so that wither skull sort of is a marker for where that snowball is and then when the snowball Disappears the wither skull stays at the last-known position of the snowball and so when we summon that prime T and T and teleport to the wither skull it’s going to be wherever the the snowball landed so that was awesome invention by webby go check out the video if you want to See how he did it yeah that’s kind of how it works it’s a quite complicated and pretty technical I’ve included a schematic of this thing and so you can download this and play around with it you may have to restart the clocks here the redstone clocks if you import the Schematic but everything else should work I think if you just you know put the schematic somewhere in your world so yeah pretty cool stuff I really like what’s possible with the snapshot it’s about it thanks for watching you Video Information
This video, titled ‘Magicka Spell System in Minecraft’, was uploaded by SethBling on 2014-01-14 22:00:00. It has garnered 364914 views and 9329 likes. The duration of the video is 00:08:25 or 505 seconds.
A spell system like the one in Magicka, done with command blocks. Wubbi’s Video: http://www.youtube.com/watch?v=yX6Bhp0KgcQ Schematic: https://www.dropbox.com/s/wuadazxewpaiy0o/magicka.zip?dl=1
SethBling Twitter: http://twitter.com/sethbling SethBling Facebook: http://facebook.com/sethbling SethBling Website: http://sethbling.com SethBling Shirts: http://sethbling.spreadshirt.com Suggest Ideas: http://reddit.com/r/SethBlingSuggestions
Music at the end is Cipher by Kevin MacLeod