Okay I’m going to go hard on this intro here we go ho ho ho Mery Christmas I have just spent way too long making this uh this Santa hat which you can barely even see uh but today we are going to be making something very cool After the success of Chunk lock me and Avid got to thinking what’s next and we’ve had some ideas which I won’t foil just yet but uh basically there are a lot of new mechanics we’re going to need to develop and one of them is a teleporter so this is going to be a Placeable teleporter you’re going to place down an entrance in one place you’re going to place down an exit in another place and then basically when you enter the teleporter magic ensues and you pop out of the exit so super simple but my goal is to make this look and feel really Cool as with chunk lock everything here is going to be implemented using a data pack so first things first I’m going to go ahead and just create a empty data pack that I can play around with if you’re not too sure how data packs work I have got a tutorial which I’ll link in the description but I’m going to be talking you through it every step of the way all I’ve done now is I’ve created a very simple data pack that I’ve put into this world’s data packs folder and as You can see in the corner there it’s just saying tick every tick so that’s proof that it’s working now we can try and do something fun the next question is what do I want the teleporter to look like for now I’m going to use use this daylight detector cuz I think that looks Kind of teleport like that okay here it goes I’m going to reload and nothing’s happened which is expected that’s fine don’t panic but when I write slash give teleporter I’m expecting that this will give me two spawn eggs perfect I chose the piglin spawn egg for the teleporter entrance because It’s Pig Lin and you go in and I chose a which spawn egg for the teleporter exit because uh that way you always know which is which I’m sorry whether or not this next bit works I honestly have no idea because I’ve not done this before apparently you can use custom NBT data On a spawn egg to change the entity that gets spawned I have no idea if that’s going to work probably not let’s see well we’ve got our teleporter entrance now fingers crossed great it spawns a piglin still I think my NBT data was malformed so we’re going to try this again we’re Going to expect to see not a piglin but a block display that’s kind of worked s like a jawy angle but I kind of like it so I’ve got the particles kind of working as you can see but I’ve realized when you use a spawn egg the Rotation is just random and you can see this as well if I spawn a sheep uh each time the rotation is just completely random so that’s why they’re just at such crazy angles what I would really like is if it stayed at the angle kind of like that you facing I’ve Got it now so that as soon as I spawn the teleporter it flicks around to face me so if I just place a bunch of these you can see that they’re all facing in towards the middle which is kind of cool this is super easy to do as well all I’m Doing is once they’ve spawned I’m there’s literally a command to make them face another entity and in this case I just say face towards the nearest player well this isn’t quite what I had in mind but it is Christmas and this does kind of look like a Christmas tree all right I’ve just done a little bit of work to refine the particles they still look not great but um I’ve used this barrier particle here to differentiate between the entrance and the exit so you can see at a glance which one to go in obviously doesn’t do anything yet but we’re Getting there this is where things start getting a little bit complicated so I’ll just give you a quick summary basically what I’m doing here is I’m linking each teleporter to the player that placed it via the player’s uuid which is just a unique ID that every player has we store This on a scoreboard so that the teleporter can just look at the scoreboard to figure out who placed it yes look at that the fact that it’s spawning that particle means that the teleporter knows that it’s owned by me so that seems to be working all right I have been hard at Work like a squirrel and uh we’re about to see the results so in particular now the teleporters should check uh whether the player has a corresponding entrance or exit so if I just place an entrance you can oh I’m actually surprised it works you can see that there’s smoke coming Off it uh and that’s because it’s inactive it’s not currently going to work because there’s no exit as soon as I place an exit and this is where I get nervous oh look at that it just worked that was literally first time first time on Camera I can’t believe it and then if I run a want to destroy one of these or in fact if I just place a new one because I’ve also enforced the fact that the player can only have one of each active at a time so if I place a new teleport Entrance the old one should get destroyed which it did but it also broke the the exit uh I think I know why that’s happened do I know why that’s happened but this is really it’s getting somewhere the only thing that’s really missing is the actual teleport functionality okay I’m just going to Repeat that same experiment again we place an entrance we place an exit they’re linked we place another entrance but now the new one is automatically linked to the exit and the way this is working is using an ID system so if I run this command to show the teleport Entrance ID Scoreboard on screen you’ll see see that the teleport entrance ID of both myself and this teleporter is four if I place another one then it becomes five so a teleporter can only exist if its ID matches your own ID the reason this is important is because teleporters Might not always be loaded if I place a teleporter halfway across the map and then come to some other location and place a new one we need to make make sure that the old one gets destroyed but how can we destroy an entity that’s not loaded well the simple answer is as soon As it does get loaded it destroys itself because it notices that its own teleport entrance ID no longer matches the owner’s teleport entrance ID okay I once again as always I have no idea if this is going to work but I’m going to place my entrance I’m going to place my Exit and fingers crossed oh oh oh no oh no that wasn’t going to happen okay it looks like that was a simple copy paste error if I print out where it thinks my teleport exit location is it’s the same coordinate three times because I I just I didn’t Change the uh the index so let’s try that again okay here we go entrance exit and no why would you believe it it was another copy paste error I had an X instead of a y so third times the charm H it worked this is not editing magic this is literally a working Teleporter that is so cool I wonder okay I’m going to place the exit facing towards the entrance Now is it going to teleport me ah it’s not currently uh respecting the facing so that will be the next thing to address okay I think I’ve got this Working now so I’m going to place the teleporter exit here facing the entrance and that means when we go in here we should come out facing the entrance and that’s working like a charm I think all that’s left to do is add some more visual effects make them look Really flashy add some sounds and to have the teleporters respect the players team I’ve just joined team red and I’m going to place my Teleporters and they they should have red particles uh I think I fixed the issue not really my fault it turns out that uh the team Target selector that is if you want to Target all entities in a given team apparently just doesn’t work for non-living entities so it wasn’t working for my Teleporters so I’ve used a scoreboard instead fingers crossed they are now red which is good because I am on team red but if I go ahead and join team blue uh well that’s problematic because I created the teleporters when I was on team red um but sure enough if I place New ones now they turn blue because I’m now on Blue so obviously if we do change teams mid game we would need to uh fix the teleporters or or probably just destroy the teleporters but the good news is these teleporters will now match the color of the team they will match The color of the team of the player who placed them which is awesome and also they will only teleport you if you’re on that team so if I join team red again now I’m now on red the teleporters are blue they shouldn’t teleport me anymore it works I’ve just spent some time trying to ensure that the Slime which is which I’m using as a hit boox for the teleporter uh shares the same orientation as the teleporter only to discover that the actual hitbox that the Slime uses doesn’t seem to rotate if I Summon a slime the hit Box is always axis aligned it’s always like uh parallel to the world axis this kind of explains why slimes can be slightly janky at times like when this guy rotates part of his uh part of the Slime is actually sticking out of the hit boox And that part can’t be attacked you see that I’m hitting visually whoops visually I’m hitting the Slime but because it’s the part of the Slime that’s not inside the hitbox it doesn’t do any damage so basically uh I’ve just sacked that off it doesn’t really matter Which way the Slime is facing the point is there is now a slime which acts as a hitbox I’m going to make it invisible but the idea is you hit the teleporter by hitting the Slime here it is again but this time it’s invisible um it did Pop up for a second there which I will fix there’s a few problems that I still need to work out the reason I’ve chosen to use a slime for the hit box instead of something like an interaction entity uh is basically because interaction entities only support punching essentially or hitting With a melee weapon whereas with a slime it will take damage from all sources such as bows all right here it goes I’ve played around with a few things and we now have a cat why why does it look like that it’s supposed to be invisible oh what is That it’s like a ghost cat so as I was saying easiest way to uh detect when the teleporter has been hit is just use interaction entities which is what I’ve done now and uh we’ll forget all about those invisible slimes cuz they were just all kinds of problematic maybe I can revisit This later but for now it’s working pretty nicely so there’s just one thing left which is to see what a thinks heyo oh there you are hello look at your little Christmas hat did you like it it I love it looks so good thanks so you should have Cter okay couple of spa eggs I have them it should be fairly intuitive what to do with them I think I can understand what’s going on uh should I do it oh actually no not just yet I need to put you on a team sorry ooh I like that so that is currently Inactive because there’s no exit Okay Okay Okay Okay cool so can’t enter that one and I shouldn’t be able to enter either cuz I’m on the other team ooh yeah that was cool I’ve never seen it in like third person before oh that’s awesome and it should play sound but I Think I can’t hear a sound maybe the the sound’s not working oh am I hurting it oh I broke it w you thought of everything good is this one ended up at a funny angle for you uh it’s because I think I was I was in the uh I was in the Air and I placed it like here okay that’s that’s a bug I found two bugs in the first 30 seconds but thankfully they were pretty easy to fix how do you do this is this a particle or what is this above it is yeah I don’t know if I like it we can Probably come up with something better it’s just I wanted a way to differentiate the exit from the entrance I got you is amazing I mean like all I can imagine now is I am going to use this thing to Get frog I haven’t actually given away too many details about the game mode in this video but uh yeah I’m very excited to see whatever mysterious things we do with this yeah new featur I have no idea what this is even for but whatever it’s Going to be holy cow quby it’s going to be amazing dude thanks see you later see y bye A Video Information
This video, titled ‘I made a Placeable Teleporter in Minecraft’, was uploaded by Quillbee on 2023-12-15 16:22:04. It has garnered 430 views and 50 likes. The duration of the video is 00:15:08 or 908 seconds.
I made a data pack that allows you to place your own Teleporter Entrance and Teleporter Exit.
This is the start of a new project in collaboration with @AvidMc.
Data pack tutorial: https://youtu.be/x3ZSJr9NHGE
#minecraft