Minecraft server commands mob griefing8/10/2023 ![]() How To Use Commandsįor truly game altering modifications we need to change the “game rules” variables with the /gamerules command. You can, for example, give yourself things in creative mode (or survival mode with the cheats turned on) using the /give command but doing so doesn’t alter the state of the game. This is the easier way so you don't need to test for the score for each of your commands.There are many commands you can execute in Minecraft via the in-game command console, but only around a dozen of them are persist changes to game variables. This will then place a Redstone block next to your command blocks and activate them. ![]() Or you could add this command, which also needs to be before the score reset:Įxecute if score TntTimer TntTimer matches 79 run setblock x y z redstone_block This is where your command comes in, ether you repeat the execute if score TntTimer TntTimer matches 79 for every one of your commands before you run the last command that resets the score. So if I activated a piece of TNT and another one 2 seconds later they would explode at the same time, 4 seconds after the first one was primed. This will also make it so any tnt that is fused will explode when the first one has reached 79 game ticks. Then next I would recommend you use a chain command block so you don't have too many 'lose' command blocks, with this command:Įxecute as if score TntTimer TntTimer matches 79 run kill command will kill the tnt so it doesn't explode, this will happen basically at the same time as the Creeper explodes.Įxecute if score TntTimer TntTimer matches 79 run scoreboard players set TntTimer TntTimer 0 Also, I changed the ExplosionRadius to 4, a tnt is set to 4 but a Creeper has a default of 3. This will summon a Creeper that explodes basically immediately. In order of closest to the first two command blocks, the commands you want to use are: scoreboard players set TNTGoBoom 1 You're going to put down three more command blocks adjacent to the redstone blocks (preferably above or below). You should see three more redstone blocks out one side. Funny stuff can start happening if part of a fill clock gets unloaded from memory, but if it's a spawn chunk or you're always near the clock, you don't have to worry. Ideally, this won't be near a chunk boundary, but mine was and it still worked fine. ![]() Put a redstone block between the two, and you have your fill clock. In the bottom, enter the following command: fill ~ ~1 ~ ~3 ~1 ~ airĪnd in the top one, enter this command: fill ~ ~-1 ~ ~3 ~-1 ~ redstone_block You'll need two command blocks in a column with an air block separating them. The first step is to set up a scoreboard objective to track TNT that's about to explode: /scoreboard objectives add TNTGoBoom dummy ![]() ![]() It's also possible to have the effect, but cause 0 damage to players or other entities, and I'll add the commands for that at the end. For this to work, you're still going to want to disable mob griefing, as I'm using ghast fireballs to create the actual explosion. This precludes the strategy I used in the linked answer a 20hz fill clock is pretty much a necessity, whereas I could use a slower, simpler clock in that other answer. The biggest difference here is that everything must happen on the same tick, and it must happen every tick. So this is complicated, but not much worse than preventing a player from crafting a diamond sword. ![]()
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |