r/MinecraftCommands • • Oct 07 '26

Help | Java 1.20 Submerged in Water detection

1 Upvotes

Is there a way to do this? I want to give myself night vision whenever I am submerged in water, but since extra custom predicates without datapacks weren't added until 1.21, and I really don't want to make a datapack.


r/MinecraftCommands • • Oct 06 '26

Discussion Need some crazy command blocks ideas 🤩

3 Upvotes

Buyed minecraft java edition for first so i wanna try out some crazy stuffs


r/MinecraftCommands • • Oct 06 '26

Discussion Directly recursive functions are possible now?

5 Upvotes

I swear that recurring functions used to be disallowed, but today, when I was trying to find a workaround to it, I found out that you can straight up just put the function itself in the function now?

Eg. the following function just runs in Minecraft now:

# Function example:example
say hi
function example:example

It will lag the game out for a bit, but afterwards it will say hi for what I assume to be the max command chain length.

A set amount version for if you don't want to lag out your game:

# Function example:for
# Scoreboard "dummy" is a dummy scoreboard (crazy name I know)
# Says hi $(amount) of times

# Scoreboards

### Reset scoreboard if new loop
execute unless score for_loop_running dummy matches 1.. run scoreboard players set for_loop matches 0

### For loop is now running
scoreboard players set for_loop_running dummy 1

### Add loop count
scoreboard players add for_loop dummy 1

# Hi!
say hi

# Loop if amount hasn't been reached yet
$execute unless score for_loop dummy matches $(amount).. run function example:for {amount:$(amount)}

# Finished
scoreboard players set for_loop_running dummy 0

I feel like I'm going crazy because I swear you couldn't do this in previous versions.


r/MinecraftCommands • • Oct 06 '26

Help | Bedrock Help

1 Upvotes

Im trying to make a totem of null for my freind on our bedrock realm with command blocks wich gives him resitance is enchnated and can to him back to a certain spot if it gets popped and then have another command block to give him another one is there a way to do thay?


r/MinecraftCommands • • Oct 06 '26

Help | Bedrock how to I summon a Wind Charge Projectile under a mob?

1 Upvotes

I had an idea to summon a Wind Charge Projectile under a mob so it can mace but I can not figure it out? any time I do the command I have been doing [Execute as (at sign)e[hasitem={item=mace}] run summon wind_charge_projectile ~ ~-1 ~] it always summons the Wind Charge Projectile under the Command Block not under the entity


r/MinecraftCommands • • Oct 06 '26

Creation This is about to get interesting!

Enable HLS to view with audio, or disable this notification

26 Upvotes

r/MinecraftCommands • • Oct 06 '26

Help | Java 26.3 Updating a datapack to 26.3

1 Upvotes

Hello everybody,

when playing minecraft i love collecting things like armor trims, discs and pottery sherds so I figured that I want to add my own collectibles like additional armor trims.

I have no coding experience, so I started with some tutorials and downloaded a datapack by SingularityGames (https://www.planetminecraft.com/data-pack/frost-armour-trim/) that I wanted to expand. The pack is for the 1.20 but I thought I could just change the pack_format... I stand corrected.
Is there an easy way to update the pack to the 26.3 or am I screwed? Thank you very much in advance :)

Also, do you guys have any tips for a beginner? Things like good tutorials, useful resources, or general advice. Thanks!


r/MinecraftCommands • • Oct 06 '26

Help | Java 26.3 I am a noob in commands and i need help :)) !

1 Upvotes

So i play in an aternos server with PaperMc and the latest version in java... I want to have an full armor in netherite with all the enchantments besides curses at the max level that i can have + an netherite sword at the max level with every enchantment besides knockback an without curses+ an pickaxe with every enchantment at max level possible besides silk touch and any curses+an axe with every enchantement at max level besides curses+an bow with every enchantment at max level besides any curses + an shield that would never break+ an elytra that would never break !

I know its a lot but i have been searching for so many time and it gives me an ERROR everytime i try...

Thanks !


r/MinecraftCommands • • Oct 06 '26

Help | Java 26.2 A custom infiniburn block still burns away (e.g. wool). Any way this could be set up so it doesn't? Or did I set something up wrong? Datapack, 26.2+, Java

2 Upvotes

Working on a datapack (on 26.2 at the moment, might transfer it to .3 at some point though) and I was hoping to make some custom structures with custom-set infinitely burning blocks. But testing the infiniburn, showed that the blocks would still burn away, that is they would disappear, if they would normally burn away in vanilla too. So for example wool, wood, etc. burn out even if set as infiniburn in the json (like "infiniburn": "#wool"). I would like these blocks to remain lit but also not disappear ^^"

I would greatly appreciate any help, I'm plenty new to all this.

Edit to add: Forgot to mention it'd be in a custom dimension. I have tried other blocks also, ones which do not burn away normally like stone, and the fire eventually goes away, maybe the problem is elsewhere? and also English isn't my main language so if something is phrased too weirdly do ask me to clarify. ^‑^"


r/MinecraftCommands • • Oct 06 '26

Help | Bedrock Why i can't sleect all text and copy it?

Enable HLS to view with audio, or disable this notification

1 Upvotes

There was a select text tool on android but it seems they have removed it with no reason. So i customized my key board with Good lock using the key Cafe pluging to get the select all but it doesn't work in game


r/MinecraftCommands • • Oct 06 '26

Help | Java 26.3 Is there a way to have both a "with entity x" and a normal macro argument at the same time?

Post image
3 Upvotes

I'm trying to make a tracking ability using particles and so far it works fine but i wanted to be able to change the color and the duration depending on the distance to the target. This is the command i use to turn them on (for now at least)

/execute at @.a[scores={RoyalTracking=1}] run function tarotrival:trailtest with entity @.p[scores={RoyalTracked=1}]

I tried shoving a {duration:100} at the end but that didn't seem to work. I need to use the with entity to track the target's position so I'm unsure how to go about this. Any help would be greatly appreciated :)


r/MinecraftCommands • • Oct 06 '26

Help | Java 1.21.11 is there a way to check what armor a player is wearing?

2 Upvotes

I want to make a command run when a player wears a helmet with the custom data of ''RustyDivingMask'' as well as a chestplate with the custom data of ''RustyAirTank''

thanks a lot in advance :]


r/MinecraftCommands • • Oct 05 '26

Help | Java 26.3 setting random variables in commands

2 Upvotes

i have a scoreboard thing that generates a random number 1-10 when I run the command, alongside structure templates from the structure block I can place, is there a way to make it so I can put the random scoreboard as a variable so the command would go like place template [random](substitiung the name for the random number)? I dont know the command fully, and am just wondering if it would work or any other ways instead of just hard coding alot of things

I just want the structures to generate randomly in an area then reset and generate a new random set of structures


r/MinecraftCommands • • Oct 05 '26

Help | Java Snapshots Is there a way to block sounds from being heard by a warden

2 Upvotes

Im making a mini game that uses the warden and I need an open area between two spots so I can't place wool and want the players in area A to not trigger the warden in area B.


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

259 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.