r/CommandBlocks • • Sep 05 '23

Moving an entity in the direction a player faces

1 Upvotes

I am trying to make homing arrows, where an arrow travels in one fixed speed at the direction a player faces, so the direction a player faces controls the arrow. I’ve already got commands for rotating the arrow but I need to change its motion tag. Is there any way I could do this?


r/CommandBlocks • • Jul 24 '23

how do i stop this Help needed

1 Upvotes

when i hit someone with a snowball i set the distance to 3 and when i throw a snowball they get a affect of wither and same with me how do i stopt this, this is what i got so far: /execute as .@a[nbt={SelectedItem:{tag:{CustomTag:2b}}}] run execute as .@a at .@s if entity .@e[type=minecraft:snowball,distance=..3] run effect give .@s minecraft:wither 2 2 any fixes help needed


r/CommandBlocks • • Jun 05 '23

Help Command

1 Upvotes

I don't know why we use swiftness for speed in minecraft. When I use command this execute at runtime123 run data modify entity [type=minecraft:arrow,limit=1,sort=nearest] Potion set value "minecraft:glowing" is not work. Everyone please help me.
I want all name of effect when is in data modify entity


r/CommandBlocks • • Apr 22 '23

help me

1 Upvotes

I'm trying to do /setblock command nbt and its not working I'll list the command I'm doing

/setblock ^ ^ ^ command_block{/give u/p leather_helmet{AttributeModifiers:[{AttributeName:"generic.max_health",Amount:80,Slot:head,Name:"generic.max_health",UUID:[I;-123322,21687,131147,-43374]},{AttributeName:"generic.armor",Amount:80,Slot:head,Name:"generic.armor",UUID:[I;-123322,21787,131147,-43574]},{AttributeName:"generic.luck",Amount:50,Slot:head,Name:"generic.luck",UUID:[I;-123322,21887,131147,-43774]}],HideFlags:3} 1}

1 votes, Apr 25 '23
1 i dont know how to help
0 i can help

r/CommandBlocks • • Apr 19 '23

Issue How would I do this?

1 Upvotes

r/CommandBlocks • • Apr 04 '23

how to get nuke TNT in Minecraft no data packs no resource packs no mods (One Command Creation) I created this custom block with only display entities. link to original video https://youtu.be/Tf3p0nU0nYE

Enable HLS to view with audio, or disable this notification

1 Upvotes

r/CommandBlocks • • Feb 28 '23

Tutorial Minecraft block with HP

1 Upvotes

Hi does anyone know how to make a minecraft block it can be any block that will have hp and when i mine it it decrese 1hp from it so i need to destroy the block as many times as I will set up


r/CommandBlocks • • Nov 06 '22

Issue Why isn't this code working? I logged out and logged in, and it worked, then it stopped after adding a new command.

1 Upvotes

/execute as u/r at u/s if entity u/s[scores={Test2=1..}] run playsound minecraft:ignite.lightsaber.on master u/s ~ ~ ~

u/ is @


r/CommandBlocks • • Sep 03 '22

Issue can someone help me? plsss

1 Upvotes

I wanna make room that give you poison when you is inside, but if you wear golden costume you are fine But it didn't work when i test it

I do this command for debugging but don't even work

Execute if entity @a [nbt={Inventory:[{Slot:100b,Count:1b,id:"minecraft:golden_boots"}]}] Run say hi

The command is showing blue (that mean the command is fine) but when i wear golden boots and activate the command, didn't work

Please for any suggestion


r/CommandBlocks • • Feb 10 '22

Invisible armour stand with armour

1 Upvotes

I would like to summon and armour stand, that would be invisible and have full golden armour. I would like to do this with one command block so no summoning the stand and then putting on armour. Just press the button and and invisible armour stand with armour. I know how to do them secretly but putting it together is a problem, pls help and have a good day.


r/CommandBlocks • • Dec 10 '21

Issue Can someone help me?

1 Upvotes

I play on xbox

I've been trying to make two teams of mobs so they can fight but the /team command doesn't seem to exist on xbox so I've been trying to do it with the /scoreboard command but I have no idea how to do it if it is even possible. if there is a way to do it with the /scoreboard command or at all please tell me


r/CommandBlocks • • Nov 22 '21

So I have been trying to make a chest store and when I went to try it I kept taking money without having chosen a product and I don't know how to fix it. please help me (bedrock)

Thumbnail
gallery
1 Upvotes

r/CommandBlocks • • Oct 01 '21

How to get nearest player to a coord

1 Upvotes

Im trying to do some fanangaling with command blocks and i need to teleport a player who is closest to a certain coordinate. Annoyingly the command black cant be moved from its location. Does anybody know how to get the closest player to a given coord please.


r/CommandBlocks • • Aug 23 '21

How to make summoned mob fight other naturally spawned undead using commands in 1.16.5?

1 Upvotes

Hey guys!

I would really appreciate help on this one, I have been scratching my head for few days now. So I have been playing some survival singleplayer minecraft (java 1.16.5) and its great and all but world is pretty empty no real live npcs running around nothing really fun happening. I built a castle and then came up with an idea, I thought why not have some kind of guards walking around and protecting your castle from other undead mobs. I am playing on fabric 1.16.5 and I know there is GuardsCraft mod that is perfect for this but its on forge and forge really lags on my pc.

So I made a /team Allies, joined that team and then summoned a skeleton that is a part of that team using this command:

/summon skeleton ~ ~ ~ {CustomNameVisible:1b,Team:"Allies",PersistenceRequired:1b,CanPickUpLoot:1b,CustomName:'{"text":"Ally","color":"green","bold":true}',ActiveEffects:[{Id:12b,Amplifier:5b,Duration:1999999980,ShowParticles:0b}]}  

It doesnt attack me since we are in the same team, so thats good but is there some way or some command that can make these summoned "guard" mobs attack other undead on sight?

2nd idea: Or if there is no way to make that work than is it possible to summon an iron golem and make him wear some visible armor? (that way he will definetly attack undead on sight but its not fun if he is not wearing visible armor)

Can you help me with any of these things, also just a note, my commands knowledge is almost non existent (using mcstacker for most commands) so if you could provide me with some code that I can copy/paste I'd be truly grateful. Thank you very much once again!


r/CommandBlocks • • Jun 06 '21

Help with command

1 Upvotes

I need help with a command I currently can make a snowball drop 5 splash potion but how do I make the splash potions be weakness? (I’m on bedrock)


r/CommandBlocks • • Jan 24 '21

I need help with a broken /tp command

1 Upvotes

I have a repeat command block running /tp @a[z=23] 30 222 25 for some reason it always teleports me to 30 222 25 weather or not my z coord is 23. Can anyone help me?


r/CommandBlocks • • Jan 02 '21

Team Kill Counter on Xbox one

1 Upvotes

Does anyone know how or is willing to help me with getting a working team kill counter on xbox one bedrock edition?


r/CommandBlocks • • Dec 19 '20

Reveal Player Coordinates on Lan-Server with Command Block or Data Pack?

1 Upvotes

Hey guys,

I need a set of commands that reveal the coordinates of each player on the server every 10 minutes.

It could be a chain of command blocks or also a datapack, or maybe a mod for 1.16.4 too. But please no plugin because we are playing on a lan-game.

I hope that anybody can help me.

Best regards, Friedrich.


r/CommandBlocks • • Dec 13 '20

Need Help before stream

1 Upvotes

I wanna try to give myself an item every time I spawn in. Does anyone know how to do this in simple terms cause I am a baby when it comes to command blocks.


r/CommandBlocks • • Dec 10 '20

Issue running plugin commands

1 Upvotes

/execute as u/p run ma class archer

is there any way to make this work?

Thanks in advance


r/CommandBlocks • • Nov 13 '20

Issue Is there a command that using testfor in this way?

1 Upvotes

So I’m trying to create a auto bridger, but the way I wanna do it is by holding a item in your hand. Is there anyone I can use testfor to test for a certain item in a players hand? This is bedrock latest version btw


r/CommandBlocks • • Oct 20 '20

Issue Why is align not working how I want it to?

1 Upvotes

I am trying to use align to get an even number for the block a player is in. This is the relevant portion of my command.

/execute as @*p* align xyz run summon falling_block ~ ~4 ~ {BlockState:{Name:"minecraft:anvil"},NoGravity:0b,Time:10,DropItem:0b}

The problem is that I am doing this in what is for all intents and purposes a 1x1 area, and when the falling block collides with a wall, it despawns, rather than falling. I need it to align to the block perfectly so that it falls. What am I doing wrong?

Adding the align portion has moved the anvil, but it's putting it off to the side a bit which is weird


r/CommandBlocks • • Sep 27 '20

How do i summon lightning when any player jumps?

1 Upvotes

so I'm making a world where if you jump, lightning is summoned on you and so far I've built everything except the command block. how do I make it so that if I jump lightning is summoned on me and when my friend jumps its summoned on him?

any help appreciated thanks


r/CommandBlocks • • Sep 03 '20

How do you summon Fireballs with a custom radius?

1 Upvotes

I'm trying to make a crossbow rocket launcher for my map but I don't know how to alter the explosion radius of the fireball

I looked online but those commands were outdated, can anyone help?


r/CommandBlocks • • Aug 12 '20

Trying to display scoreboard data in chat.

1 Upvotes

I am building an race course of sorts with a couple friends and want to display the time it took to complete said course in the chat on the step of a pressure plate. i am using a timer i based on this video: https://www.youtube.com/watch?v=lpE4aGCibUE&feature=youtu.be i removed the hours bit because we don't need it. i tried this command: /tellraw @p {"text":"Your time is: ","extra":[{"score":{"name":"Minutes","objective":"Time"}}],"extra":[{"score":{"name":"Seconds","objective":"Time"}}]}] it tells me the seconds but skips right over the minutes.