Hello and welcome to another command block tutorial in today’s video I’m going to teach you guys how to start thinking with portals so for today’s tutorial what we’re going to be doing is teaching you how to make your very own portal gun in Minecraft now this is based off of the Portal gun that you guys have seen from the hit game portal sure you guys have all heard of it before uh if not I’m going to just demonstrate to you how it works basically we have two different colors of wool now I will show you guys If you want to change what block you’re using or what item to activate it but I’m just using two different colors of wool uh so basically what we do is if I want to fire the Blue Portal I simply hold blue look in the direction I want To fire boom it’s going to shoot out the Blue Portal now you’ll see it deleted the old Blue Portal anytime I fire the Blue Portal it’s going to delete the old one and make a new one in whichever direction I’m facing so and it’s going to be the same Thing if I hold the red wool deletes the old red one places a new red one B the old placees the new and the cool thing is whenever I enter one of these portals takes me to the other portal it’s pretty simple but uh really neat honestly because look I just Infinitely enter one of these portals and if I want to go back through I just step out real quick step back in and it takes me directly to the other portal now in this situation it’s not that useful but here’s this nice little situation I want to get all the way over Here I don’t feel like walking all the way just shoot one close to me now I’m all the way over here or perhaps you have a gaffy one across I would to get over there but simply too far there the Blue Portal here red portal right behind Me boom now I’m across this deadly Gap without actually taking any risk myself so there’s a lot of really cool uses you can make puzzles with this um plenty of fun stuff you guys can do with this and I can’t wait to see some of the stuff That you guys create but without further Ado let’s get into the actual commands so the commands are split up in a few sections here this right here this is the firing mechanism these are the teleport commands that make the portals actually shoot forward and stay in place these portals are what actually Teleport you as the player in between the two portals and these are here just the particles you can experiment with these as you want uh another thing to note this isn’t exactly multiplayer friendly in the sense that there can only be one Blue Portal and one red Portal at the same time so multiple people could have the same portal gun but if you want to make it more multiplayer friendly you could simply do what they do portal Co-op which is just add more colors but let’s get into the actual commands now you will notice some Of these commands are conditional these two and then there’s two over there that are conditional that is very important and you’ll see why in a second but we start off and I know this looks like a long command it’s kind of scary looking but just follow me through It and it should make sense what we’re doing is checking for a player that does not have the tag sneak and you’ll see why that is in a second that has the item red wool it’s in their main hands and then we do this position 1.6 blah blah blah that’s detecting that the Player sneaking if you haven’t seen it before I have a full tutorial on how that works if you’re not interested just know that this is detecting the player sneaking then we’re going to be summoning an armor stands we’re going to be summoning it a little bit lower Because we rais it up over here we’re going to lower it down and then we’re going to spawn it in with the name red simple as that once we do that we’re going to kill anything that has the name red and has the tag use this is so that anytime I Spawn a red portal it kills any old red portals after we spawn it in we give it the tag used that means it’s ready to be killed next time we spawn a new one in and this way we’re not accidentally killing the old one H little Jolly anyways now we’re going to do the exact same command for blue so you can literally go through copy the command you had last time anywhere it said red so up here change red wool to Blue wool and red to blue it’s it’s really that simple that’s actually going to be a lot Of the commands we we just swap red and blue around same thing right here kill anything with the name blue and the tag use remember both the kill commands are on conditional only it’s not conditional you will just not ever have any portals please make sure these two are Unconditional okay next up we are EX exting add a player that does not have the tag sneak and then we’re doing the sneak detection which is what this is right here position 1.6 blah blah SN detection then we’re adding the tag sneak this way it’s not going to be Firing off a ton of portals for as long as I’m sneaking it’s going to fire off one portal every time I sneak and then stop because we don’t want to be firing a Bunch then we’re doing the opposite so this is detecting if I’m not sneaking and if that is the case it’s going to remove the tag sneak that way it’s already ready to fire new portal every time that I start my next sneak now we’re simply going to be Giving the armor stands invisibility so just effects name equals red invisibility effects name equals blue invisibility nothing complicated here then we’re going to be giving red the tag use as well as blue the tag use I know it seems like a long chain but I mean realistically it’s just the Same stuff repeated over and over again so it’s actually not as complicated as it might first appear the next St is also pretty simple all we’re doing here is anything for that is named red teleport itself in place uh the reason we’re doing this is That so if I were to fire this out a wall and there’s no floor this way the portal is not going to be falling to the ground it’s going to stay in the air now the other command we’re doing is almost exactly the same except we’re doing it uh these three carats followed By 0.6 that’s going to be teleporting the red thing uh forwards but we have true to make sure if it hits a wall it’s just going to freeze in place like we have up there uh we are doing the exact same thing with the blue once again you can Just copy these commands replace the word red with the word blue and it will work this is where it gets a little bit more complicated but I will explain it as we get through so this is how we’re going to be checking to teleport the red Player to the Blue Portal uh sorry the player at the red portal to the red portal and this is we want to be very careful because we don’t want players to get stuck in a portal Loop where they’re instantly being teleported back and forth so want to make it so once they Get teleported uh they’re kind of stuck there until they leave the portal and come back into it so you can actually control when you want to go through the portals but what we’re actually doing here is just saying hey if a player does not have the tag port and Port is the Tag that we’re going to give the player once they use a portal and they don’t have the tag sneak so that’s another thing about this if you don’t want to go through a portal you can simply sneak as you approach it and as soon as you stop Sneaking you will go through the portal so this has two benefits number one you can choose whether or not you want to go through the portal you can sneak past portals to not use them but it also is going to make it so that when I’m whenever I’m firing it doesn’t Immediately teleport me right cuz I’m sneaking already so if I’m not being teleported while I sneak it’s not going to teleport me when I fire the portal that’s the whole point here so anyways back to this command doesn’t have the tag port doesn’t have the tag snake uh it’s going to be Checking if there is a red a uh red named Portal the red portal name it’s red whatever you want to call it within half a block radius if so right we’re going to go check we’re going to move the location to the Blue Portal so this is if the Player’s at the red portal we’re going to the Blue Portal we’re going to play this sound that way the sound will be playing when the player arrives so this is technically an optional command but this is if you want the sound that we have here sounds like the Enderman Teleporting I think it’s a great addition so I like it next up we have actually pretty much the same command with a few differences so but it’s the same deal right we’re checking if the player doesn’t have the tag port the player doesn’t have the tag Sneak and the red portal is within half a block of them if so so teleport itself teleport the player to Blue simple as that next up and remember this is a conditional command that is important see conditional right here execute as same tag support and sneak if the entity blue is within half A block of the player add the tag port this means that once the player goes through the portal and they’re at the other side they’re at the Blue Portal they are G given the tag port this is going to make it so the player doesn’t accidentally go immediately back through The portal this is basically a thing that hey don’t teleport unless the player leaves so this is basically a lockout the player has the tag port they can’t go through a portal then up here we have this command which is execute at a tag equals Port so Anybody that has the port cool down it’s going to say unless there is a blue portal within half a block and unless there is a red portal within half a block remove the tag port so basically if I’m not in range of either of the portals So within half a block of either Portal it’s going to remove the tag that’s preventing me from going through the portal that makes it so after I go through a portal all I have to do step out and step back in to be teleported again that’s what this little bit at the top Means so hopefully that made sense if it doesn’t make sense it’s fine just copy it how you see it on screen and it will work for you so let’s just go through I will show you all the other commands but this is the exact same set of commands Except we replace the words red and blue again so once again same command we have blue here now and red here exact same commands we have blue here now and red here same commands except we have red here instead of blue and this is actually the same Command you don’t even need to switch it for the last one you can if you want but you don’t have to and that’s all you need for the actual teleporting this is all the functionality of the portal gun the last thing we have here is the particle effects now you’re more than Welcome to change them if you want but I’m just going to show you how I did it if you have better ideas on how to make the particles absolutely do that in your own world so for the blue particle pretty simple what we did execute at e name Equals blue doing the blue flame particle we have the first one at 0.2 then we have the exact same commands at one the only thing we’re changing here is the coordinates to raise the height of the particle and finally same thing at 1.8 and that’s for the Blue Portal for The red portal uh exact same commands except to use the Redstone or dust particle now same command but at one instead of 0.2 same command at 1.8 instead of 1 or 0.2 and that is it so you guys can just simply add these commands to your world You will have access to your very own portal gun uh there’s all kinds of cool gimmicks and challenges that you can make maybe you have a Kit PVP maybe make some puzzles or some interesting parkour with this type of command it’s really up to you guys there’s actually just a lot Of possibilities you can really do with these and I hope you guys enjoyed I hope you guys found this tutorial informative if you guys have questions do feel free to leave them in the comment section although I will recommend joining the Discord which will have a link in the Description for you guys to check out uh a lot of people in there who are always willing to help with commands as well as myself so please check out the Discord you’re more likely to get some answers quicker on there anyways uh that being said I hope you guys enjoy and God bless Bye Video Information
This video, titled ‘Minecraft Portal Gun! (Bedrock Command Block Tutorial)’, was uploaded by Guppyduck on 2023-11-24 18:40:28. It has garnered 1278 views and 75 likes. The duration of the video is 00:12:16 or 736 seconds.
Ever wanted to bring the portal gun to your Minecraft world without any mods? Check out this cool command block tutorial to learn how!
If you’re interested in Minecraft Bedrock commands, check out my discord! It’s a great place to find other people who love commands and get help from others! Discord: https://discord.gg/ykjsnwAfFH
Join this channel to get early access to my videos: https://www.youtube.com/channel/UCVWAWVotPjy39hPZMKtVKRg/join