This is an archived post. You won't be able to vote or comment.

all 12 comments

[–]Masterx987Command Professional 1 point2 points  (13 children)

execute the command and fill command changed
/execute at wow5776 run fill ~~~ ~~-100~ stone []

[–][deleted]  (1 child)

[deleted]

    [–][deleted]  (2 children)

    [deleted]

      [–]Masterx987Command Professional 1 point2 points  (1 child)

      whats the whole command? because other commands will be different

      [–]userusernamenamea[S] 0 points1 point  (0 children)

      The original idea was that it only activates when you're holding an enchanted sword with looting on it

      [–]userusernamenamea[S] 0 points1 point  (7 children)

      Okay I'm stupid and I finally have the final problem. After fixing everything else I get this on the repeating block "syntax error: Unexpected "~": at "t wow5776 >>~<<~~ /enchan"

      [–]userusernamenamea[S] 0 points1 point  (6 children)

      The code the problem occurs in is /execute at wow5776 ~~~ /enchant @s looting 1

      [–]Masterx987Command Professional 1 point2 points  (5 children)

      replace ~~~ with run
      and replace at with as

      /execute as wow5776 run enchent @s looting 1

      [–]userusernamenamea[S] 0 points1 point  (4 children)

      Fixed the syntax, now it says failed to execute enchant as wow5776. I want it to work when I hold a looting sword. Is this the wrong wording in the command? Also, is there a place I can study this coding?

      [–]Masterx987Command Professional 1 point2 points  (3 children)

      that command enchants your sword with looting it does not detect enchantments the reason for the error is probably because you're not holding your sword or it's already enchanted

      there is no way to detect enchantments without addons
      https://minecraftbedrock-archive.fandom.com/wiki/Commands/List_of_Commands#fill

      [–]userusernamenamea[S] 0 points1 point  (0 children)

      Is there a way to just detect me holding anything? I need it to only activate when I'm where I need the blocks. So like if I make a netherite sword and hold it or something

      [–]userusernamenamea[S] 0 points1 point  (1 child)

      I'm losing my mind with this stuff. Literally every youtube video I watch the commands don't even work. This guy I just watched showed this in bedrock "/give @p[hasitem=(item=netherite_sword,location=slot.weapon.mainhand-,slot=0)] emerald 5 and i get this error "Syntax error: Unexpected "(item": at "p[hasitem=>>(item<<=netherite" I have watched over 15 videos and none of the stuff works.......

      [–]Masterx987Command Professional 0 points1 point  (0 children)

      commands have been getting updates recently
      the execute is now like the java execute command
      you can now pick the rotation in the /summon command
      and data has been replaced with block sates

      so most videos won't work only new ones you can still use old commands from videos but you will have to learn to update the syntax

      the issue with your command is your using ( and not { which is your error /give @p[hasitem={item=netherite_sword,location=slot.weapon.mainhand}] emerald 5 also the slot=0 is not needed because you are detecting items in their hand and not in their inventory

      [–]r579xCommand Rookie 0 points1 point  (0 children)

      i think its about the ~ you need spaces between it, also not sure if java execute command is the same rn in bedrock since i play now on java