Hey there everyone welcome to another command block tutorial video here on the channel and I’ve got a pretty awesome tutorial for you today um I’m going to be showing you some spell books in Minecraft so it’s this Nifty little feature that I’ve added into the game and I’ve done this only Using one command block to get this to work and it’s a pretty simple command when you look into it but hopefully you will learn a lot from this video and it’s just using a like execute command logic in the game in order to get this to work but Essentially what we’re doing here is we have these a couple of these spell books right here and the idea is that if you have a spell book in your inventory so you don’t need to be holding it it just needs to be in your inventory Um it will the game will then grant that effect to the player so in this case we’ve got the Regeneration effects as you can see and if we then put the book away the effect then disappears as you can see so um we’ve now also got we’ve also got a Speed spell as well so we’ve got a speed boost as well and you can also compound the effects as well so if you have both of the spell books you get both of the effects which I think is pretty dang cool so um those are the spell books and within This video I’m going to explain what the command is like I’m going to show you the command in a text editor so that you can see more clearly what the command is the command will be broken down in the text file or in the text editor that I’m Going to be showing you uh the full command however that you need for your game that you can baste all your other commands off is going to be in the description as well so you can use that in your Minecraft world or you can copy And paste it and so on and also after I’ve shown you the command I’m going to do another one live I’m going to do a night vision spell using this method the other thing that’s pretty cool about this as well is that this is multiplayer friendly because these command blocks Are actually targeting all players in the Minecraft world whether that’s a single player world or a multiplayer world so it’s a pretty useful feature and hope you guys will like it alright everyone we’re now inside the text editor and this is the command I’m going to be showing you today uh it’s pretty Straightforward but I’m just going to explain what’s going on very quickly so you understand what’s going on and then I’m going to do the night vision spell book that I said I was going to do so to understand what’s happening here we’re going to be using an execute command Because we want to execute commands on a selection of players essentially and what we’re going to do here is we’re going to do slash execute as at a okay so what we’re saying here is that we are targeting um as a collection of entities where do actually targeting all players in the World okay or in the Minecraft world okay and then we are actually refining the search even more by checking for this data this NBT data tag data so in this case what we’re doing is we’re checking the inventory data of the player and we’re checking for a particular item in the inventory so We’re checking for a book and we’re also checking the display tag and we’re checking the name of that item now if the name is regeneration spell like that then the player is valid to be targeted so essentially all this first bit is saying right here this first bit is get All the players that have a regeneration spell book in their inventory and start targeting at that particular group okay and then the next part is a bit tricky but the next part is ass at s okay and this is a selector now you may not be aware of the selector but it’s actually Really really helpful now what the at s selector means is the entity executing the command because what ends up happening in Minecraft is when you do this first section right here it actually starts then thinking it needs to execute commands for the whole load of entities or players in that Collection so what this is saying is that for each of those players we’re then going to Target them individually so that’s what we’re using with this at s selector right here so we then do run effect give at air so what we’re saying is for this collection each person that You find or each player that you find run this command on them so run effect give at air so give an effect to that player that the command is being executed for and then this next bit is just ordinary effect command parameters so we’ve got Minecraft colon Regeneration so that’s the ID for the effect um we’re doing it for two seconds so that it’s only on for a short amount of time um zero so we’re not adding any amplifier to the effect and false so that we’re not hiding the particles now You can set that to true to hide the particles if you want but that’s up to you but that’s about it essentially we just find a bunch of valid players and then we run the effects command on each of those using the at s selector it’s that straightforward it’s once you break It down it’s quite easy but if you’ve not come across the execute command before it can seem a bit weird and daunting but that’s essentially what’s happening and because this is in a repeating command block this is being done over and over and over again so Essentially if it finds the book it will give the effect if then the player loses the book or gives away the book or whatever the effect will then stop being given to that player and then they will then lose the effect so let’s then go back into the Minecraft world and I’ll Do this night vision spell alright everyone we’re now back inside the Minecraft world right here and we now have a night vision spell book that I’ve just done on the Anvil and we’re going to uh do a new command block right here so we’re going to place down a repeating Command block we’re going to make it always is active we’re going to use the command again this will be in the description of the video and what we’re going to do here is uh inside the command I need to change that I’m not I’m no longer looking for Speed spell or Regeneration spell I’m going to be looking for Knight Vision spell like so and then along here I then need to change the effect that’s being given so instead of Minecraft colon speed we’re going to have Minecraft curl on Knight underscore vision and that is it that’s all the changes we need to do And this is now active so as you can see I’ve now been given the night vision effects and if I throw the book away I then lose the effects and then I can get it back by using the or holding the spell book and yeah that’s about it and You know it’s pretty straightforward and you can have as many of these in the world as you want and um if you want to make a spell book which does multiple effects at the same time uh what you would need to do is you’d need to have multiple repeating Command blocks for that one book so you would have to like check two times for the book and then apply each effect in turn so that’s how you would do that if you’re interested but hopefully you guys found this useful and uh yeah spell books pretty cool huh all right everyone That’s about it for this Minecraft command block tutorial video hopefully you learned something new and you enjoyed the video if you did then a subscribe and like on the video video would be very much appreciated and make sure you hit the notification Bell so you’re notified of any future videos Here on the channel and I noticed that many of you are not subscribed to the channel it’d be great if you could join the channel here and support it be very much appreciated and follow my Twitter which is in the description or on screen right now but thank you for watching Hope you have a nice day stay happy and healthy as always and I’ll see you in the next video Video Information
This video, titled ‘SPELL BOOKS in Minecraft 1.19+? Only ONE COMMAND BLOCK! Books in Inventory Give Effects to Players’, was uploaded by Drackiseries on 2023-05-13 19:17:33. It has garnered 544 views and 13 likes. The duration of the video is 00:08:47 or 527 seconds.
This tutorial was done using Minecraft 1.19.4 Java Edition.
COMMANDS:
/execute as @a[nbt={Inventory:[{id:”minecraft:book”,tag:{display:{Name:'{“text”:”Regeneration Spell”}’}}}]}]at @s run effect give @s minecraft:regeneration 2 0 false
Please leave some love by liking, sharing and subscribing!
FOLLOW ME ON TWITTER: https://www.twitter.com/drackiseries
Music and sounds provided via Epidemic Sound subscription – https://www.epidemicsound.com/
#minecraft #minecraftonly #minecraftpc #minecrafter #minecrafters #minecraftbuilds #minecraftbuild #minecraftforever #minecraftersonly #minecraftredstone #minecrafttutorial #minecrafttutorials #minecraftcommandblocks #commandblocks #minecraftcommandblocktutorials #minecraftcavesandcliffsupdate #minecraftwildupdate #minecrafttrailsandtalesupdate