All right so today i thought i would do a command block tutorial because one i’m running out of video ideas and two i’m a developer on um on my friend’s minecraft server with command blocks and i don’t see like enough tutorials like looking at this sort of stuff online so I thought i would make a video on it so the first thing you need to do is slash give as command block uni grab buttons you need three buttons that’s it so let’s just do this four i’m gonna do one two three get rid of those from the inventory Then we’re going to do here scoreboard objectives remove then the name of your objective i’m just going to call it kills so what this does is completely resets all the data on the kill scoreboard earth leaderboard or whatever you want to call it then you’re going to scoreboard objectives add kills This will add the objective so it knows hey this is an objective then you need to do dummy then i’m going to do kills then there’s a unico character that put in this the description this right here and then you can put number after it change the number or sorry the color of The um text so it goes one through zero zero is invisible so i’m gonna make it four and um this stuff in quotations here is um what’s going to show up on the leaderboard but it’s going to be called so now what we’re going to do is do scoreboard objectives set display So this will show this will be where the scoreboard shows up on your screen so under the player’s names on the side of the screen wherever we’re going to do the side of the screen sidebar you can also do below name and stuff but we’ll just do sidebar kills i believe that’s right I’m not mistaken and then do repeat always active scoreboard players and at a kills zero so what this will do add players to the scoreboard every time they join and then which is why we’re making it repeat and always active so you don’t have to press button every time Then we’re adding zero kills so if you have like 10 kills you’re not adding unnecessary extra kills i’m gonna press all these buttons make sure it works and my command block output is set to false which is why don’t see all the um text but just if it’s set to true like this Set it to false with game rule command block output false gonna do this this is this these will be chain always active chain always active so what we’re gonna do we’re gonna add barrier to the player’s inventory so whenever the player dies the barrier drops and then it’s gonna be like Then it’s gonna check hey the player closest to this is probably the player that killed the guy so you’d be like hey there’s a player clusters barrier that’s probably the killer and they could add one to the killer’s kill count when the barrier drops so what we’re going to do clear at a Barrier zero one and we’re gonna do replace item at a sorry entity at a slot dot inventory eight so the inventory is numbered the top row is zero to eight you can also do like slot dot hotbar and slot the armor.head and stuff but they um the top inventory is eight So we’re gonna do the a slot or sorry yeah technically it’s a nine slot in inventory but it goes zero through eight so it’s technically nine so we’re gonna do the top right slot in the inventory we’re gonna barrier one zero and we’re going to do curly brackets item underscore lock rotation Curly bracket quotation mode rotation lock underscore in and of course slot so what this will do is make it so that players can’t like move the barrier around in their inventory and then place it down and stuff they also can’t drop it to other players So there will be no griefing going on we did a barrier because it’s no you can’t get it in survival mode so you can’t stack the items or anything and it won’t mess with what you have in your inventory you will have the top right slot of your inventory removed But i think it’s a good trade-off to add something like this i believe that should be good sorry i added something i wasn’t supposed to let me find it so i figured out what they did wrong one i didn’t have a quotation here uh like right here And then we also needed to set this to always active and now what you want to do is set this to 80 ticks or so around there could be more could be less around 80 ticks which should work now so it replaces item in the inventory sorry about that so now And now we’re gonna do we’re gonna check hey was this barrier dropped so we’re gonna be like hey there was a player close to it let’s add a kill to him we’re gonna execute at e i’m gonna see hey is there an entity literally any entity you’re like yeah Well is it an item yeah well is it barrier i like to do capital b i don’t know why we’re like if it is we’re going to be like hey let’s add them to the kill so we’re going to scoreboard players add that piece so that i p is the closest player To the barrier that was dropped kills one so we’ve added one to the kills you’re gonna be like hey that bear is gonna stay on the ground and keep adding to the score let’s fix that so you kill e type equals item name equals barrier i get myself a barrier i drop it It doesn’t work because i’m a bit of an idiot and i forgot to make this always active let’s retry that and as you can see it has a kill every time i drop the barrier but what if you want to add something else what if i want to make it like I don’t know i get regeneration when i get a kill so i can fight more people because i’m i have more help now so what we’re going to do we’re going to make this one tick and we’re gonna do execute and we’re gonna check for this barrier again type equals item Name equals barrier and i like i have really bad ocd so um i want to be like all right we’re new effect at p closest player to that barrier regeneration [Applause] and we’re gonna do like two seconds of regeneration not even two seconds one second regeneration five That’ll bring us up to full house and pretty much instantly i’m pretty sure we set that to always active then we’re gonna do slash s i’m just going to damage myself for almost all my health give out this barrier now as you can see we have ourselves regeneration and we’re Back up to full health i’ll show you it again and problem so back to full health basically all we’re doing again here is checking for the barrier being like hey there’s a barrier let’s add that effect could we detect the barrier and then take later it kills the barrier we want to make Sure to take later because if not it’ll just instantly kill the barrier and it might sometimes add the regeneration i’m not sure but most of the time it definitely will just kill the barrier it won’t do anything for us i’ll show you it also adds one to the kill if you look Over there the ball is giving us regeneration and you can do an infinite line of these command blocks obviously they don’t have to be like one apart from each other or anything um you can just do as many things you want with this when it gets more intense You’ll see that it’s actually a really cool thing to have and so yeah and i think i might do like another video on this um i’ll add maybe like a death counter you can be like see how many deaths you have and you’ll see also sometimes your inventory will bug out When it’s replacing that um barrier um if i give myself market sometimes yes sometimes it’ll click it and it doesn’t that’s because i’m trying to place it when it’s replacing the item so it’s just like not detecting it it’s like hey i’m replacing the item you can’t be doing that right now So we’ll add a fix to that maybe in the next video let me add a death counter anyways um like subscribe whatever i don’t really care um yeah see you next time Video Information
This video, titled ‘How To Make A Kill Counter In Minecraft 1.19+ With Commands’, was uploaded by Ivy on 2022-06-12 08:03:42. It has garnered 3017 views and 47 likes. The duration of the video is 00:12:01 or 721 seconds.
Unicode Character: §