• 0

    posted a message on 1.13.2 If Else command

    Weird that that would be what breaks everything lol. I made a work-around for the idea already but I'm going to test that out and be able to use it again somewhere else. Thanks a lot for helping out again.

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on [SOLVED]minecraft 1.13 Help with custom item detection

    EDIT: After much trail, error, hair pulling, more trial and...more error, I finally figured it out. The corrections will be at the bottom for anyone interested or having a similar problem.



    Normally when I have a question, I can usually think of a work-around solution for if my idea doesn't work. This one, however, is pretty important that I figure out. Hopefully someone can help me.


    Ok so, I have give the player a custom iron axe with this command:


    give @p minecraft:iron_axe{CanDestroy:["minecraft:melon"],display:{Name:"{\"text\":\"Axel's Axe\",\"color\":\"dark_red\",\"bold\":\"true\",\"italic\":\"true\"}",Lore:["The axe Axel used to murder all those people in the hospital."]},HideFlags:55,Unbreakable:1b,Enchantments:[{id:"minecraft:protection",lvl:13},{id:"minecraft:sharpness",lvl:5},{id:"minecraft:smite",lvl:3},{id:"minecraft:knockback",lvl:3},{id:"minecraft:efficiency",lvl:3},{id:"minecraft:power",lvl:3},{id:"minecraft:punch",lvl:13}]} 1


    I know...It sounds like a lovely item to have. But, now that the player has this item, I can't figure out how to detect the item in the player's inventory correctly. Mainly because I suck at string escapes and whatnot, but that's besides the point. I tried this:


    execute at @p[nbt={Inventory:[{id:"minecraft:iron_axe",Count:1b,tag:{display:{Name:"{\"text\":\"Axel's Axe\",\"color\":\"dark_red\",\"bold\":\"true\",\"italic\":\"true\"}"}},CanDestroy:"{id:\"minecraft:melon\"}",Lore:"The axe Axel used to murder all those people in the hospital."}],HideFlags:"55",Unbreakable:"1b",Enchantments:"[{id:\"minecraft:protection\",lvl:13},{id:\"minecraft:sharpness\",lvl:5},{id:\"minecraft:smite\",lvl:3},{id:\"minecraft:knockback\",lvl:3},{id:\"minecraft:efficiency\",lvl:3},{id:\"minecraft:power\",lvl:3},{id:\"minecraft:punch\",lvl:13}]"}] run setblock -166 63 359 minecraft:redstone_block replace


    It doesn't throw an error but it's not detecting the correct item and thus, the event won't trigger.

    Can anyone help me understand what I'm doing wrong?


    SOLUTION:


    OK. It took me a while of rearranging but I finally made it work right. I had to adjust both the give command and the execute command that detects the item.


    give command:

    give @p minecraft:iron_axe{CanDestroy:["minecraft:melon"],HideFlags:55,Unbreakable:1b,Enchantments:[{id:"minecraft:protection",lvl:5},{id:"minecraft:thorns",lvl:3},{id:"minecraft:sharpness",lvl:3},{id:"minecraft:smite",lvl:3},{id:"minecraft:knockback",lvl:3},{id:"minecraft:efficiency",lvl:3},{id:"minecraft:power",lvl:5},{id:"minecraft:punch",lvl:5}],display:{Name:"{\"text\":\"Axel's Axe\",\"color\":\"dark_red\",\"bold\":\"true\",\"italic\":\"true\"}",Lore:["The axe Axel used to murder all those people in the hospital."]}} 1


    execute command:

    execute as @p[nbt={Inventory:[{id:"minecraft:iron_axe",Count:1b,tag:{CanDestroy:["minecraft:melon"],HideFlags:55,Unbreakable:1b,display:{Name:"{\"text\":\"Axel's Axe\",\"color\":\"dark_red\",\"bold\":\"true\",\"italic\":\"true\"}",Lore:["The axe Axel used to murder all those people in the hospital."]}}}]}] run setblock -166 63 359 minecraft:redstone_block replace


    Lesson learned...put my tags and punctuation in the right spot. There's just so much to look at uuuuuuuugh! Anyway case closed.

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on 1.13.2 If Else command
    Quote from Megacrafter107»

    In that case, try this:

    /execute as @a[...] at @s unless entity @s[nbt={Inventory:[{id:"golden_sword",Count:1}]}] run tp @s ~ ~ ~


    I really thought that was going to be the winner there but, no. No dice. It still triggers when the player has the sword. This is frustrating lol. There's something missing or I'm just completely misunderstanding the purpose of UNLESS.

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on I need help with triggers

    I'm not sure if this will help you for your particular situation but I think this may be in the same realm. Unfortunately, I haven't played with triggers much yet so I think this video can do a better job of explaining than me. Hope it helps.


    <iframe width="951" height="535" src="" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

    He talks kind of fast so you may want to slow it down a bit.

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on 1.13.2 If Else command
    Quote from Megacrafter107»

    To detect the player holding an item, use "SelectedItem:{id:"minecraft:"golden_sword}"


    I apologize, I mispoke. I should have said the command triggers regardless of whether or not the player has the item in inventory. I'm not checking for the player holding the item, just if it's in the player's inventory. But, again, that is not the issue. The issue is the "UNLESS" condition. It is not working as I expected. If the player DOESN'T have the item in their inventory I want them to teleport. If they DO have the item I want nothing to happen. This is why I thought the "UNLESS" condition would work here, but I'm not doing something right with it and I don't know what it is.

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on 1.13.2 If Else command

    I don't believe that's the issue here. My teleports are working fine. It's the unless statement that is not working. Also, for dx, dy, dz, a distance value is not needed. Distance is only necessary if you're using x=,y=,z= since it's asking for the player's relative location to a single block. The distance is already included in a dx dy dz statement since it's defining an exact area. My problem is I don't seem to understand the proper use of the unless statement since my idea clearly did not work as intended. The main issue here is that execute at @p[dx=4,dy=4,dz=2] unless entity @p[nbt={Inventory:"minecraft:golden_sword"}] run tp @p ~ ~ ~-1.5 ~180 ~ still teleports the player even if the player is holding the golden sword. I assumed the command would run only if the player DID NOT have the sword.

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on 1.13.2 If Else command

    OK I thought I had it with this...but it worked only once as a fluke and hasn't worked again since then. So I tried two repeating always active commands.


    One block with this command: execute at @p[dx=4,dy=4,dz=2] unless entity @p[nbt={Inventory:"minecraft:golden_sword"}] run tp @p ~ ~ ~-1.5 ~180 ~ which tests for the player at the location and teleports them back into the room UNLESS the player has the gold sword.In which case it should do...nothing.


    Then the second command takes over: execute at @p[nbt={Inventory:[{id:"minecraft:golden_sword",Count:1b}]},dx=4,dy=4,dz=2] as @p run tp @s -158 63 328 ~ ~ which again test the if the player is in the right spot then checks if the player has the sword then teleports the player to a different location.


    the player is teleporting back into the room regardless of whether or not the player is holding the sword.

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on I need help with triggers

    What is the event you want to be triggered? What are the conditions that trigger the event?

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on 1.13.2 If Else command

    Hey guys! Is there a way of doing an "If Else" command in one command? Or is there a decent way to make my idea work.


    I have a portal and when the player steps into the portal they will be teleported facing the opposite direction back the way they came, unless they are carrying a gold sword in their inventory. If they have the sword I want to teleport them to a different location. I could figure out a work around with two or three (maybe...I think) blocks but I would like it to be more compact. One block would be best. I tried two separate repeating, always active, command blocks both checking if the player is in a specific dx dy dz; one checking for the gold sword, that would send the player to a new location and one without the check sending the player back into the same room but facing the other direction. The problem is the command without the check supersedes the command with the check regardless if the player has the sword. Is there a way to check if the player is NOT holding a specific item? If not, what's the most compact way to achieve this?

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on 1.13.2 More Pumpkin Blur

    Is there a way to get multiple pumpkin blurs? I'd like to have two or three to switch between. Is this possible?

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Help with detecting named items in hopper command 1.13.2

    So the error said I had extra characters in my command and I swear I did this before and the command stayed red, but I just did it again and I have it working now. Thanks guys.


    the proper command is this:


    execute if block -138 95 312
    minecraft:hopper{Items:[{id:"minecraft:egg",Count:2b,tag:{display:{Name:"{\"text\":\"Human Eye\"}"}}},{id:"minecraft:nautilus_shell",Count:1b,tag:{display:{Name:"{\"text\":\"Weird
    Shell\"}"}}},{id:"minecraft:bone",Count:13b}]} run say worked[/b]


    Looks almost identical but that something you have to look out for. An extra "]}" had me confused as hell.

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Help with detecting named items in hopper command 1.13.2

    I'd rather not my players have to spend extra time doing trial and error to figure out which slot they have to place each item in order to trigger an event. I'm sure there's a way to detect if the items are just in there and not in a specific slot. Everything else seems to work that way...why would hoppers be the exception to that?

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Help with detecting named items in hopper command 1.13.2

    I'm trying to detect three different items in a hopper each with a different count and two have custom names. I have used a variation of the same command to detect the same items in the players inventory that works just fine, but the hopper is giving me trouble. Here's the command I currently have:


    execute if block -138 95 312 minecraft:hopper{Items:[{id:"minecraft:egg",Count:2b,tag:{display:{Name:"{\"text\":\"Human Eye\"}"}}},{id:"minecraft:nautilus_shell",Count:1b,tag:{display:{Name:"{\"text\":\"Weird Shell\"}"}}},{id:"minecraft:bone",Count:13b}]}]} run say worked


    Can anyone tell me what I'm doing wrong?

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Exorcist Mobs? 1.13.2
    Quote from YMbrothers»


    If the witch mob is used throughout the game, I rly can't do a thing...

    Cuz it makes no sense for a witch to wear armor and put down their arms.


    Sorry that I can't help.


    No worries. I had my doubts that it would work the way I wanted lol. I appreciate the help.

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Exorcist Mobs? 1.13.2
    Quote from YMbrothers»

    Well, if you rly need the mob's body and head to be one single entity, then it is indeed impossible (I once did it, but it was an old version, a patched bug and an unexpected behavior).


    It's up to you if you want to scrap the idea. But I don't find it strange if the armor stand wears armor and another armor stand wearing a slightly bigger head. After all, you only need the head twisting for the horror. It doesn't have to be a default mob (such as a witch or a zombie).


    The map story is following a specific character which I'm using a witch mob for, so it doesn't make sense with the story to use an armor stand since I can't make it look exactly like the witch character I'm using. No biggie tho. It was just one of many ideas I had for that moment. I just thought that idea would give the most tension.

    Posted in: Commands, Command Blocks and Functions
  • To post a comment, please or register a new account.