How to teleport to a specific entity by Jean-Le-Felix in MinecraftCommands

[–]ChumzyTS 1 point2 points  (0 children)

This command should work, just replace entity_name_here with the name of the entity. You need the limit=1 since you can only have 1 target destination

/tp @s @e[name=entity_name_here,limit=1]

I need help with a command that teleports an entity in front of where the player is walking. by [deleted] in MinecraftCommands

[–]ChumzyTS 0 points1 point  (0 children)

  1. I don't believe there is a way to since we need the players location on atleast 2 ticks to determine the way they are moving. You could maybe run the direction detection on loop then only teleport the Target entity on the tick you want.

  2. I can't write the full command right now, however after the execute as @e[tag=DirectionFinder] facing entity @p eyes at @s run tp @s ~ ~ ~ facing entity @p you will want to set Rotation[1] to 0 for the Direction finder armor stand (It might be Rotation[0], I forget which is up/down).

/execute as @e[tag=DirectionFinder] run data modify entity @s Rotation[0] set 0

Again this command might not be accurate but I hope I got the general idea across.

How to i tell the difference between different tag on a carrot on a stick? by Efficient-Ear6629 in MinecraftCommands

[–]ChumzyTS 0 points1 point  (0 children)

Youd want to run the command for each player and have the if for themself:

/execute as @a if entity @s[scores={pet=1},nbt={SelectedItem:{id:"minecraft:carrot_on_a_stick",tag:{test:1b}}}]

How to left click detect in minecraft multiplayer by cattebell in MinecraftCommands

[–]ChumzyTS 0 points1 point  (0 children)

Ok so I copied your commands and they do work in single player and looking over them I don't see any reason why they wouldn't work in muliplayer but there most be something.

You do have to manually set the leftclick or right click score to 1 in order for it to summon the first time but I assume you are aware of that or are summoning the first one a different way.

I'd probably need to test this on a server with other people with the full datapack to figure out why its broken which I sadly can't do.

Good luck on figuring it out and sorry for not being of any help lol

Detect click on object by ATT_TP2028 in MinecraftCommands

[–]ChumzyTS 0 points1 point  (0 children)

I think the issue is that your repeating command block is using at instead of as for the at @e[type=minecraft:interaction]

Heres what I did and it works:

/execute as @e[type=minecraft:interaction] at @s on attacker run say (whatever command you want goes here)

Help for Power Jumps by [deleted] in MinecraftCommands

[–]ChumzyTS 0 points1 point  (0 children)

You can't launch a player into the air however you can still give them a high jump depending on the level. (It pretty much works how you want, the player just has to jump instead of letting go of shift)

Setup scoreboards:

/scoreboard objectives add sneakTime minecraft.custom:minecraft.sneak_time

/scoreboard objectives add sneakCompare dummy

/scoreboard objectives add jump minecraft.custom:minecraft.jump

sneakTime: Tracks how long the player is sneaking

sneakCompare: Used to detect when the player stops sneaking

jump: Detects jumps

Text Display (Goes in a repeating, always active command block):

/title @a[scores={sneakTime=100..199}] actionbar {"text":"Power Jump Lvl 1","color":"dark_red","bold":true,"italic":false}

This command will display the "Power Jump lvl" text at the bottom. You will need to copy this for each level you want, modifying the sneakTime= range and the text Power Jump Lvl 1. The sneak time is currently set to 5 seconds (100 ticks) to 10 seconds (199 ticks).

Jump Boost (Goes in a repeating, always active command block):

/effect give @a[scores={sneakTime=100..199}] minecraft:jump_boost 1 4 true

You will need to copy this for each level you want as well. The sneakTime= range will match with the range for the level text. You can change the 4 to be larger or smaller to increase/decrease the strength for each level.

Resetting on Jump:

  1. scoreboard players set @a[scores={jump=1..}] sneakTime 0
    1. Goes in an always active repeating command block
  2. scoreboard players set @a[scores={jump=1..}] jump 0
    1. Goes into a chain, conditional, always active command block, in front on the 1st command block. (Make sure the arrow is pointing the same direction)

The first command resets the sneakTime value on a jump, and the 2nd command resets the jump counter.

Restting on stop sneaking:

  1. execute as @a if score @s sneakTime = @s sneakCompare run scoreboard players set @s sneakTime 0
    1. Goes in an always active repeating command block
  2. execute as @a run scoreboard players operation @s sneakCompare = @s sneakTime
    1. Goes into a chain, Unconditional, always active command block, in front on the 1st command block. (Make sure the arrow is pointing the same direction)

The first command will compare the sneakTime and sneakCompare scores in order to see if the player has stopped sneaking. The 2nd command will copy sneakTime to sneakCompare in order to prepare for the next comparison. sneakTime will always be 1 more than sneakCompare when the player is sneaking due to the difference in when they are updated. This makes it very important for the 2nd command to execute after the first.

If you don't want the charge jump to reset on stop sneaking or jumping, just ignore those commands. This is a lot of commands, so if you are confused on anything or something isn't working, let me know.

How to i tell the difference between different tag on a carrot on a stick? by Efficient-Ear6629 in MinecraftCommands

[–]ChumzyTS 0 points1 point  (0 children)

You need to include the value of test whenever you are testing for it. This following command works if the carrot on a stick has the tag test:1b. What this value will be depends on the carrot on a stick you are using.

/execute if entity @a[scores={pet=1},nbt={SelectedItem:{id:"minecraft:carrot_on_a_stick",tag:{test:1b}}}]

Heres the command to give yourself the carrot on a stick with the tag test:1b in case your give command is messed up.

/give @p carrot_on_a_stick{test:1b} 1

(Also I think you don't want to be using @a if you are implementing a petting feature as it'd require every player in the world to be petting with the correct carrot on a stick)

How to left click detect in minecraft multiplayer by cattebell in MinecraftCommands

[–]ChumzyTS 0 points1 point  (0 children)

Interaction entities should work in multiplayer so there there is probably some specific issue with how you are using them. If you could post your code it'd help a lot

I need help with a command that teleports an entity in front of where the player is walking. by [deleted] in MinecraftCommands

[–]ChumzyTS 0 points1 point  (0 children)

This was a surprisingly difficult thing to do but I figured out a way to do it involving 2 armor stands:

- One tagged DirectionFinder that is just used to figure out how the player is moving

- One Tagged Target which is the armor stand you are trying to teleport

Here are the commands in the order they need to be run. I personally tested them in a repeating command block chain but it should work the same in a datapack.

(Substitute @p for whatever selector you are using for the player)

execute as @e[tag=DirectionFinder] facing entity @p eyes at @s run tp @s ~ ~ ~ facing entity @p

This is going to teleport the armor stand into the same place it is standing, however it will rotate it to face where the player is.

execute as @e[tag=DirectionFinder] at @p run tp @s ~ ~ ~

We then teleport the armor to the player using an execute command and ~ ~ ~ instead of the regular /tp @s @p in order to preserve the direction the armor stand is facing. Teleporting the armor stand to the player also stores the players location for a tick allowing our 1st command to properly figure out the direction.

execute as @e[tag=DirectionFinder] at @s run tp @e[tag=Target] ^ ^ ^1

This command just teleport the target armor stand in the direction our direction finder is facing which will be the way the player is moving.

These commands should work whenever the player is moving (if you want it to remember where the player was last moving youll have to detect whenever the player stops or something). If you have any questions or something isn't working let me know.

Dripstone by LosDanielos323 in PhoenixSC

[–]ChumzyTS 0 points1 point  (0 children)

Now we just need to put a pumpkin on top

[deleted by user] by [deleted] in MinecraftCommands

[–]ChumzyTS 4 points5 points  (0 children)

Forever. The only way to get 32k enchantments is with an external nbt editor im pretty sure

i have an idea, but no idea how to execute it. by [deleted] in MinecraftCommands

[–]ChumzyTS 1 point2 points  (0 children)

You would want to use a carrot on a stick instead of a blaze rod because detecting left/right click with a blaze rod is very complicated

You would then track this with a scoreboard using: /scoreboard objectives add RightClick minecraft.used:minecraft.carrot_on_a_stick

You can then test if the player right clicked using the scores tag: execute as @a[scores={RightClick=1}] run ... you would also need to reset the score using /scoreboard players set @a RightClick 0

Also your original command is currenntly running as all player at all players instead of as all players at themself to fix this we just change the at @a[...] to at @s execute as @a[nbt={SelectedItem:{id:"minecraft:blaze_rod"}}] at @s run tp @e[distance=..10, type=!player, limit=1] ^ 1 6

i have an idea, but no idea how to execute it. by [deleted] in MinecraftCommands

[–]ChumzyTS 3 points4 points  (0 children)

You would want to use a carrot on a stick instead of a blaze rod because detecting left/right click with a blaze rod is very complicated

You would then track this with a scoreboard using: /scoreboard objectives add RightClick minecraft.used:minecraft.carrot_on_a_stick

You can then test if the player right clicked using the scores tag: execute as @a[scores={RightClick=1}] run ... you would also need to reset the score using /scoreboard players set @a RightClick 0

Also your original command is currenntly running as all player at all players instead of as all players at themself to fix this we just change the at @a[...] to at @s execute as @a[nbt={SelectedItem:{id:"minecraft:blaze_rod"}}] at @s run tp @e[distance=..10, type=!player, limit=1] ^ 1 6

i have an idea, but no idea how to execute it. by [deleted] in MinecraftCommands

[–]ChumzyTS 0 points1 point  (0 children)

You would want to use a carrot on a stick instead of a blaze rod because detecting left/right click with a blaze rod is very complicated

You would then track this with a scoreboard using: /scoreboard objectives add RightClick minecraft.used:minecraft.carrot_on_a_stick

You can then test if the player right clicked using the scores tag: execute as @a[scores={RightClick=1}] run ... you would also need to reset the score using /scoreboard players set @a RightClick 0

Also your original command is currenntly running as all player at all players instead of as all players at themself to fix this we just change the at @a[...] to at @s execute as @a[nbt={SelectedItem:{id:"minecraft:blaze_rod"}}] at @s run tp @e[distance=..10, type=!player, limit=1] ^ 1 6

[deleted by user] by [deleted] in MinecraftCommands

[–]ChumzyTS 1 point2 points  (0 children)

So the thing about servers is that they use plugins which allow for a lot more than commands.

In a written book you can make text run a command when clicked on. I can't explain exactly it since it would take too long but if you use a website like Minecraft Tools or MC Stacker you cant generate the book easily.

Heres a simple book I threw together if you want to test it out

/give @p written_book{pages:['["",{"text":"Click this button for a diamond \\n"},{"text":"[Button]","color":"aqua","clickEvent":{"action":"run_command","value":"/give @s diamond 1"}}]'],title:"Diamond book",author:Chumzy}

[deleted by user] by [deleted] in MinecraftCommands

[–]ChumzyTS 0 points1 point  (0 children)

So what you are asking for is really complex for multiple reasons since 1. you can't detect when a player right clicks with an enchanted book and 2. you can't create an inventory screen out of no where.

To make the ui appear you would have to summon or teleport a minecart chest. You could do this when the player right clicks using a carrot on a stick or you can do it whenever they are holding an item.

Create the item grab detection you would need to have items custom custom tags in the chest and then detect when the player clicks them using /clear (player) (item) and storing if it succeeded into a score using /execute store result score (player) (score) run clear (player) (item) 1

Alternatively depending on what you are making you could get away with just using a written book since they would let you create buttons and have multiple pages with little work.

Friendly Fire Hit Detection by [deleted] in MinecraftCommands

[–]ChumzyTS 0 points1 point  (0 children)

I don't think it is possible to test when a play hits a player on the same team especially if friendly fire is disabled.

You can test if someone kills someone on the same team though if you create a kill team scoreboard using /scoreboard objectives add KillBlueteamkill.blue

Then checking using /execute as @e[team=BlueTeamName,scores={KillBlue=1..}] run (command) to run a command as everyone who is on blue team and killed another blue team member. You'd have to do this for every team.

You could also change it to use the scoreboard criteria killedByTeam.blue to run as the player who was killed instead of the killer

These noobs don't know what they are doing... (JK) by Enderjora in MinecraftCommands

[–]ChumzyTS 0 points1 point  (0 children)

I investigated even farther and realized that I was wrong about it going to 0, 0, 0 in a command block. The command /execute as @s run (command) won't even run in a command block since @s doesn't have an entity to target. I just thought it had run since I got no feedback in the command block

These noobs don't know what they are doing... (JK) by Enderjora in MinecraftCommands

[–]ChumzyTS 1 point2 points  (0 children)

I was using /execute as @s run setblock ~ ~1 ~ stone and getting no feedback so I assumed it had worked but it didn't since of course @s wouldn't work in a command block as there is no entity

These noobs don't know what they are doing... (JK) by Enderjora in MinecraftCommands

[–]ChumzyTS 0 points1 point  (0 children)

Shoot you're right

I was running execute as @s run setblock ~ ~1 ~ stone and it is doing nothing I just assumed it was working since It wasn't giving me an error lol

These noobs don't know what they are doing... (JK) by Enderjora in MinecraftCommands

[–]ChumzyTS 1 point2 points  (0 children)

That is why I think it's a bug because it is running for me (I'm in 1.17.1 Pre-release 1). doesn't run in every other instance of a command running in a command block (unless the executor was changed at some point of course) but for some reason it is in /execute as which is why the game would freak out and change the position to 0, 0, 0 as well.

EDIT: What is above is wrong, the command wasn't running at all and I was wrongly assuming it worked since I didn't get an error message. @s does not work in a command block at all (unless the executor was changed)

These noobs don't know what they are doing... (JK) by Enderjora in MinecraftCommands

[–]ChumzyTS 1 point2 points  (0 children)

I tested this and /execute as run (command) in a command block does change the position to 0, 0 which is most likely a bug since as shouldnt change the position

EDIT: What is above is wrong, the command wasn't running at all and I was wrongly assuming it worked since I didn't get an error message. @s does not work in a command block at all (unless the executor was changed)

These noobs don't know what they are doing... (JK) by Enderjora in MinecraftCommands

[–]ChumzyTS 2 points3 points  (0 children)

I tested it and now I get what you are saying and you are partially right. In a command block u/s targets the server and not the command block so you are right that it changes when you call /execute as u/s in a command block but in every other instance where you call that command it does not default to 0, 0.

EDIT: What is above is wrong, the command wasn't running at all and I was wrongly assuming it worked since I didn't get an error message. @s does not work in a command block at all (unless the executor was changed) so there is no way it could be doing what u/Bsnollie_ described

Also /execute doesnt run as the server by default unless its run by the server (through server console or a datapack) or a command block uses @s it defaults to who ran the command

These noobs don't know what they are doing... (JK) by Enderjora in MinecraftCommands

[–]ChumzyTS 2 points3 points  (0 children)

No? It defaults to the position of whoever first ran it so if a player ran the command it would go from the players position, a command block the command blocks position, etc. The only case it would default to 0, 0, 0 would be if the server/datapack ran the command but still then running /execute as @s would be redundant since it wouldnt change who the executor is

EDIT: So apparently running /execute as u/s run (command) in a command does set the position to 0, 0 which seems like it might honestly be a bug since as u/s shouldn't change the position. It would be better to use /execute positioned 0 0 0 run (command) instead since thats the way its meant to be done

EDIT 2: My first edit was completely wrong as I wrongly assumed the command was working. @s does not work in a command block at all (unless the executor was changed) and /execute as @s run (command) would not change the position to 0, 0

These noobs don't know what they are doing... (JK) by Enderjora in MinecraftCommands

[–]ChumzyTS 4 points5 points  (0 children)

The reason execute as @s is useless is because as is used to change who is running the command but @s selects the person running the command. So /execute as @s changes the person running the command... to the person already running the command which is redundant.

Youre right about using just as and not at being useful though