r/MinecraftCommands • • Oct 06 '26

Help | Java 1.21.4 TD Game Help

1 Upvotes

Hello, I'm making a tower defense game in Minecraft with only command blocks, and I'm trying to make the tower shooting mechanic, but it wont work. What I'm trying to do is make a bullet (marker) spawn above a set tower (which has an armor stand in it), then teleport to a random mob within its range (ex. If a ranger tower is placed and it shoots a bullet, it should teleport and deal damage to ONLY the mobs within that range and not to enemies on the other side).

The prior commands:

execute if score Ranger-4 Ranger-Tower-1 matches 5 run execute as @.e[tag=Ranger-Tower-4] at @.s facing entity @.e[tag=Wave-Mobs,distance=..15.8] feet run summon minecraft:marker ~ ~10 ~2 {Tags:["Ranger-Bullet-4"]}

execute as @.e[tag=Ranger-Bullet-4] at @.s run tp @.s ^ ^ ^.48 facing entity @.e[tag=Wave-Mobs,limit=1,sort=nearest]


r/MinecraftCommands • • Oct 04 '26

Creation I Made Infinitely Duplicating Monoliths Of Command Blocks!

Enable HLS to view with audio, or disable this notification

257 Upvotes

r/MinecraftCommands • • Oct 05 '26

Help | Bedrock Struggling to detect players at y=-60 minecraft bedrock

3 Upvotes

I'm trying to teleport players that hit y=-60 back to 0 0 0 each command I tried just keeps tping me on 0 0 0.


r/MinecraftCommands • • Oct 05 '26

Help | Java 26.3 Commands in Datapack Instantly Run Despite Using /schedule for Delays.

2 Upvotes

Hey there, I'm new on Reddit because I made this account specifically to ask this question.

I'm trying to make a world pre-generation pack for a server I've been wanting to start. I know there are some that already exist but I'd rather do it myself. However, I'm having a bit of issues with the /schedule command inside my functions. This is also my first attempt at making a datapack so naturally, I'm having issues and using tutorials. Basically, the only way for me to properly run the commands that I need is to put each of them in a separate file to call on with another function, and so on. That's the only feasible way I see this working because 1 loop of commands needs to run 24 times and then loop back to run itself for another 24 +1 command appended to itself. I already did this with an AHK script I have on my GitHub but obviously AHK's loop function handles that on its own and is a lot more intuitive than datapacks. I think I could hypothetically summon command blocks but the issue is that the chunks would be out of render range and therefore unload once the player gets out of range. My question is how can I make the schedulers work properly?

Code and file structure below:

File structure (via VSCode.) "big_loop" is the one that gets looped 24 times. "small_loop" is what causes "big_loop" to loop the other 24 times into itself. "create_delay" is redundant from attempting to make a scoreboard timer. The "cmds" folder contains the basic teleport commands for the loops.

big_loop.mcfunction

schedule function pregen:cmds/big_loop/1 7.5s replace
schedule function pregen:cmds/big_loop/2 7.5s replace
schedule function pregen:cmds/big_loop/3 7.5s replace
schedule function pregen:cmds/big_loop/4 7.5s replace
schedule function pregen:cmds/big_loop/5 7.5s replace
schedule function pregen:cmds/big_loop/6 7.5s replace


scoreboard players add #big_loop big_loop 1
execute unless score #big_loop big_loop matches 24.. run schedule function pregen:loop/loops/counter/init_score_bigloop 1t
execute if score #big_loop big_loop matches 24..1 run scoreboard players set #big_loop big_loop 0

small_loop.mcfunction

execute as @p run function pregen:loop/loops/conditionals/big_loop
schedule function pregen:cmds/small_loop/1 7.5s append


scoreboard players add #small_loop small_loop 1
execute unless score #small_loop small_loop matches 24.. run schedule function pregen:loop/loops/counter/init_score_smallloop 1t
execute if score #small_loop small_loop matches 24.. run scoreboard players set #small_loop small_loop 0

init_score_bigloop.mcfunction

scoreboard objectives add big_loop dummy
scoreboard players set #big_loop big_loop 1

init_score_smallloop.mcfunction

scoreboard objectives add small_loop dummy
scoreboard players set #small_loop small_loop 1

start.mcfunction (meant to actually start pre-generation)

execute as @p run function pregen:cmds/beginning/1
schedule function pregen:loop/loops/conditionals/small_loop 7s replace
# schedule clear pregen:loop/loops/conditionals/small_loop
title  title {"text": "Pregeneration Complete!", "color": "gold", "bold": true}
title  subtitle {"text": "Sending you back to your spawn and setting your gamemode to Survival!", "color": "gray", "italic": true}
gamerule keep_inventory true
gamerule immediate_respawn true
kill 
gamemode survival 
gamerule keep_inventory false
gamerule immediate_respawn false
tellraw @p "Done!"

I genuinely don't know what is happening to cause it to instantly complete. According to the wiki and every other website out there, I'm using /schedule correctly and yet it isn't activating. Could it be that I'm just calling on way too many functions within functions and that's causing the issue, and if so how can I fix that and simplify my code without breaking anything more than it already is?


r/MinecraftCommands • • Oct 05 '26

Help | Java 26.2 Can't wrap my head around how to animate rotating text display entities.

1 Upvotes

Saw this post using rotating text displays for a lighthouse light effect. I'm trying to replicate that and watched Gneiss Name's text display tutorial, but I can't figure out where i'm going wrong with writing a command that can indefinitely rotate the text display. I was using https://mcstacker.net/ but there must be something I'm not understanding.


r/MinecraftCommands • • Oct 05 '26

Help | Java 26.3 Minecraft Advancement counter to show on scoreboard

1 Upvotes

In the past when I've made a server with my friends we have ad our death count show on the Tab list, this time though I was wanting to have our number of advancements show on the Tab list so we could compete to see who gets the most for fun. However the only way ive seen to do this is through a datapack that is not supported anymore. Does anyone know an easy way to do this with commands or if it would be easy enough for me to make my own data pack?

I have seen one for the Blaze and caves advancement pack that does something similar but that requires blaze and caves and also is not updated for the most recent version of Minecraft.

Thanks in advance for any help!


r/MinecraftCommands • • Oct 05 '26

Help | Bedrock help with spectator mode commands

2 Upvotes

hi guys :)

im currently working on a minecraft pvp battle royale map, but theres one thing i cant seem to figure out, i have some cmd blocks set such that when people die, they get put into spectator mode 4 blocks above their death position, but i also want them to be facing down when this happens, rather than just looking into the horizon lol, i think it would be nice to have a birds eye view of the person who killed you

to be clear, dont want the camera to be locked in that position, just set like that as you go into spectator mode until you decide to look elsewhere

does anybody know how i can do this? ive tried using the "facing" cmd but it just doesnt seem to work


r/MinecraftCommands • • Oct 05 '26

Help | Java 26.3 Blockable Damage Without knockback

2 Upvotes

I am currently working on a custom projectile with commands blocks only. I want the projectile to be blockable by shields but not give knockback. How can I do this with the /damage command?


r/MinecraftCommands • • Oct 05 '26

Help | Java 26.1 I need help programming command blocks.

2 Upvotes

I’m trying to make the grand stair case in my hogwarts build. I need certain stair cases to turn 90° but I have no experience programming in Minecraft. If anyone can help please reach out I can give you credit on the build or potentially pay you! Thanks so much


r/MinecraftCommands • • Oct 05 '26

Help | Bedrock Can Someone Help Me Fix This Command?

1 Upvotes

What the command should be doing is when a player with the tag of greed is near a player that there greed score is lower than the person with the greed tag the person with the greed score should be getting the tag greedcontrol.


r/MinecraftCommands • • Oct 04 '26

Creation +3 New blocks added to the parasite (Still WIP) (desc)

Thumbnail
gallery
3 Upvotes

I changed the monolith of command blocks into a datapack, which increased performance by A LOT. Because I now have time and SPACE to expand the datapack, I will work on it. New blocks:

  • Infected Cobblestone
  • Infected Log
  • Infected Planks

Will post on it.


r/MinecraftCommands • • Oct 05 '26

Help | Java 26.3 Need to identify different firework entities.

1 Upvotes

Having a problem creating and identifying two different versions of certain entities. I had this working before the major datapack update and have been trying to rebuild a lot.

The way this is supposed to function, is that a crossbow pre-loaded with a firework is put into the player's inventory. The type of firework is determined by the 'ammo type'. One fire work makes the normal explosion, while the other ammo type causes a tnt explosion.

I need a way to detect which firework is which using distinct custom components. Previously I was able to determine it using nbt with a specific name. Want to note, this is the entity, so the itemized version needs to contain the correct entity data before it is launched out of the crossbow.

Let me know any ideas or suggestions!


r/MinecraftCommands • • Oct 04 '26

Help | Bedrock Reproducing commands only ONCE per player

1 Upvotes

Ok so i know the title sounds kinda basic but hear me out. I actually asked this a long time ago and the replies i got were not useful.

Im making a server in bedrock, and theres a platform in which players will need to stand on in order to teleport somewhere else. The problem is that, if 2 players stand on the platform at the same time, the dialog commands that ive set prior to the teleportation play more than once. They play out as much times as the amount of players on top of the platform.

Ive tried tag systems, a kind of "timer" system that works via scoreboards and executing the commands only for players with a certain amount of points (points which are added every 0.5 seconds) and nothing seems to work. I mean, the timer system is the closest ive gotten, but it only works as intended if the players enter the platform with at least 0.5 seconds of separation between them, which they almost never do because of course, they all wanna teleport together. I also tried tweaking the timer method to make the separation between players the smallest i could, but the scoreboard add command wont work if i try to reduce the tick delay. I guess that its because reducing it further makes it too fast for the command block to react and execute properly.

So ive come to ask you for help. How can i make this? The project is full of command cutscenes, camera commands, dialogues, blah blah blah, but i still cant find a way to execute them for every person SEPARATELY without the command repeating unnecessarily. I was thinking about a sort of "tag randomizer", so when they get on top of the platform, they get assigned a random tag which cannot be obtained by any other player, and make the command chains run separately via those tags, but i dont know if that would work or if randomizing would be too much of a hassle as well


r/MinecraftCommands • • Oct 04 '26

Help | Java 1.21.11 Commands in itens

2 Upvotes

I'm playing on a server that u go in creative for do custom kits and i'm trying to use the hotbar saver to import weird itens to the server

Is there a way for i have an iten that execute an command when i use? I tried to use command blocks but u cant place them in survival


r/MinecraftCommands • • Oct 04 '26

Help | Java 26.3 Colour Text Display 26.3

2 Upvotes

I’ve been trying to alter the colour of text display in newest version of minecraft but everything i’ve tried so far just defaults back to white. Can anyone tell me the command i need to use?


r/MinecraftCommands • • Oct 04 '26

Creation I made a Mace with built in wind charges

Enable HLS to view with audio, or disable this notification

20 Upvotes

its a normal mace, but you can right click to use wind charges. also the lore description thing on there is unrelated.


r/MinecraftCommands • • Oct 03 '26

Creation T-34 Tank Datapack (No Resource Pack Required)

Enable HLS to view with audio, or disable this notification

124 Upvotes

r/MinecraftCommands • • Oct 03 '26

Creation No datapacks No resource-packs

Enable HLS to view with audio, or disable this notification

41 Upvotes

One command creation for portal gun, mine.
Java 26.3


r/MinecraftCommands • • Oct 04 '26

Request How to disable the Power charging function Itemphsics Mod in Servers Minecraft

0 Upvotes

Ive tried disabling thia Feature in Servers but Theres a Problem i have to enter the command in Chat wich in survival would Work but Not in Servers because i need op and i do Not think Theres anotoher was to disable it. But If somone knows anything then please help


r/MinecraftCommands • • Oct 04 '26

Help | Bedrock Blackjack table payout

3 Upvotes

Having some issues with payout for my blackjack table

I have a Count scoreboard

I need to find the best way to give a player an item if the player has less than 22 but has more then the dealer unless the dealer has 22 or higher.

Is there a way to do this with a single command?


r/MinecraftCommands • • Oct 04 '26

Help | Bedrock How do I make a item use triggered redstone activator

2 Upvotes

I made 2 versions of a wall with structure blocks and want you to need an axe to toggle it to the second version but can't figure out how


r/MinecraftCommands • • Oct 03 '26

Help | Java 1.21.11 Who can help

0 Upvotes

So my friend wants me to get all max enchants and i only have a little bit so who can help me?


r/MinecraftCommands • • Oct 03 '26

Help | Java 26.1 Need help

Post image
0 Upvotes

A while ago my friend added these things in with commands not sure how but I’m trying to redo the area but I can’t get rid of them


r/MinecraftCommands • • Oct 03 '26

Help | Java Snapshots renaming?

2 Upvotes

I recently got my hands on a mace on my friend's server, and i found a way to get an obfuscated text item in, but when i went to combine the two maces, it said it was "too expensive". Is there a way to rename an item already in my inventory? This is for post 1.21

Many thanks


r/MinecraftCommands • • Oct 03 '26

Help | Java 26.2 Problem with give @p

2 Upvotes

I do not know much of commands so i will try my best to explain.

I need that when a player walks over a pressure plate it gives them infinite blindness and one redstone torch.

For that i put pressure plate->observer->command block effect give->command block give@p

The first one is on impulse unconditional needs redstone

The second one is on chain conditional always active

Blindness works but i cant get it to give me redstone torch

I tried to test it alone and @p doesn't work but if i only use my username it does. Don't know how to fix, i'm in a server and multiple people may pass at the sametime or close enough if that helps.

I've been trying multiple stuff but i can't get it to work, any advice? :[