All users will need to merge their Minecraft Forum account with a new or existing Twitch account starting October 23rd. You can merge your accounts by clicking here. Have questions? Learn more here.
Dismiss
  • 1

    posted a message on [1.12] Need help testing for multiple items in inventory!

    (assume you have dirt, stone, cobblestone, sand, grass block, glass, diamond that is unbreakable)


    R1: scoreboard players tag @a[tag=got_item] remove got_item

    C2: scoreboard players tag @a[tag=!got_item] add got_item {Inventory:[{id:"minecraft:stone"},{id:"minecraft:dirt"},{id:"minecraft:cobblestone"},{id:"minecraft:sand"},{id:"minecraft:grass"},{id:"minecraft:glass"},{id:"minecraft:diamond",tag:{Unbreakable:1b}]}

    C3: clear @a[tag=got_item] dirt

    C4: clear @a[tag=got_item] stone

    C5: clear @a[tag=got_item] cobblestone

    C6: clear @a[tag=got_item] sand

    C7: clear @a[tag=got_item] grass

    C8: clear @a[tag=got_item] glass

    C9: clear @a[tag=got_item] diamond -1 -1 {Unbreakable:1b}

    C10: tellraw @a[tag=got_item] ["Got the items, eat some bananas and make 1+1=2"]

    Posted in: Commands, Command Blocks and Functions
  • 1

    posted a message on need help
    Quote from firass»

    I want to detect if an item that isn't a golden sword in an item frame.

    I have these commands but I need to edit them so they don't detect empty item frames.


    1.scoreboard players tag @e[type=item_frame,tag=sword] remove sword

    2.scoreboard players tag @e[type=item_frame] add sword {Item:{id:"minecraft:golden_sword"}}

    3.execute @e[type=item_frame,tag=!sword] ~ ~ ~ say 1

    sorry for asking for this many times

    and one last thing: how can I change the all items pickup delays to (0) so the player can't drop any item.

    THANKS


    Add these 2 commands between 2 & 3:
    scoreboard players tag @e[type=item_frame,tag=hasItem] remove hasItem
    scoreboard players tag @e[type=item_frame] add hasItem {Item:{Count:1b}}

    Then edit 3 with this:
    execute @e[type=item_frame,tag=hasItem] ~ ~ ~ execute @e[type=item_frame,tag=!sword,r=1,c=1] ~ ~ ~ say 1

    Notes:
    1. It's not recommended to put another item frame next to each other, cuz I set the radius to 1.
    (For whatever reason, r=0 does not work on my client.)

    2. I haven't test yet, so it might not work.

    In addition, to change the pick up delay of an item, run this repeatedly:
    /entitydata @e[type=item] {PickupDelay:0}
    Posted in: Commands, Command Blocks and Functions
  • 1

    posted a message on I Take Requests For One Command Creations

    Again, sadly no...
    But it can go North, East South and West.
    You'll be happy to know that the command is finished!
    A video with both the command and a tutorial is scheduled
    to go up at 12:00 PM Canadian/American time.
    It will be uploaded to this playlist:
    https://www.youtube.com/playlist?list=PLgGiMVGbJOVll0o8fqzAonH4VX5cKRKML

    Honesty, your laser gun, alarm and turret is not bad (Although it's only 4 directions).
    However, the video, I think there's some excess content. If I am to edit it, the video can end within 5 minutes.
    (Also, do u mind speeding up the intro? Or you can just speed up the banner placement)
    Posted in: Commands, Command Blocks and Functions
  • 1

    posted a message on I Take Requests For One Command Creations

    So are you here to make one commands for us?

    Posted in: Commands, Command Blocks and Functions
  • 1

    posted a message on Checking a Scoreboard with command blocks ?
    Quote from ZehBlackSheep»

    Heyyo Guys,

    I'm trying to make a minigame on my server with command blocks, its my first time .-. I want that the players have 5 minutes for playing, I already figured out how to make a timer:

    /scoreboard objectives add <scoreboardName> deathcount <displayName>

    (/scoreboard objectives setdisplay sidebar <scoreboardName>)

    /scoreboard players set <fakePlayer(I called it Time)> <scoreboardName> 300

    /scoreboard players remove <fakePlayer> <ScoreboardName> 1

    The last command gets repeated every second (with a redstone clock)


    I only want that the players who play the minigame can see how many time left so I decided to find another way for showing them the time: with /title.


    My Problem is that I don't know how to activate the command block with the /title command.. I tried to use another command block with

    /testfor <fakePlayer>[score_<scoreboardName>=120,score_<scoreboardName>_min=120]

    but I don't get a signal from this command block if the time is down to 120 seconds. I found our that this is because /testfor doesn't work for fake players so I tried /scoreboard players test but it seems like the command block doesn't send a signal then ...

    Does anyone have an idea how to do this?


    Regards

    ZehBlackSheep


    /title @a[tag=playing] title [{"score":{"name":"Time","objective":"<the timer's score name>"}}," seconds left"]

    Note:
    1. it'll be better if u add /title @a[tag=playing] times 0 3 0
    2. "playing" is a tag which participants should have
    3. I haven't tested it yet so it probably won't work
    Posted in: Commands, Command Blocks and Functions
  • 1

    posted a message on Detecting if player opens a chest (no redstone or trapped chests)
    Quote from SamDavies»

    Sorry that no one has replied to your question yet and I hope this helps you.


    We can create an objective using the scoreboard command which detects if a player opens a chest.


    Now stand above the chest you want to detect and run this command which summons an invisible armour stand with the name of chest.


    Next place a repeating command block set with Always Active on. Follow the picture below to see how the command blocks should be facing. In this command block you will need to type a command which detects if a player in a range of 5 from the chest opens the chest. If the chest is opened then we will give the player an objective score and will remove the chest.


    Place a chain command block next to the repeating command facing as it does in the picture. Make sure this command block is also set to Always Active but is in the conditional state. In this command block we will be spawning a mob in the place of where the chest should be. In this example I have just summoned in a pig however you can spawn any entity you wish.


    The final command block is the same as the previous as it is conditional and set to Always Active. This command resets the players score back to 0.


    And that should be it. Try opening the chest and test if the mob is spawned. You can add sounds to the process using the playsound command. If there are any issues just reply and I will try and answer them for you. :D


    1 mistake to correct (if it's 1.12+):

    /summon minecraft:armor_stand ~ ~-1 ~ {NoGravity:1,CustomName:"chest",Invisible:1}

    Welcome to 1.12, where quotations are required on strings...
    Posted in: Commands, Command Blocks and Functions
  • 1

    posted a message on Stop advancements from giving XP

    If you are talking about vanilla advancements, use commands to grant them all.

    After the player gets all the xp from those advancement, clear his xp value.


    Edit: Thanks for your upvote

    Posted in: Commands, Command Blocks and Functions
  • 1

    posted a message on Trying to add loot table to mob
    Quote from Juiseboy»

    I'm trying to summon invisible skeleton which has chest as its head and after it dies it shouldn't drop anything else than one golden nugget. I don't know how to add loot table command in the summon command. Help would be appreciated :)


    /summon skeleton ~ ~1 ~ {CustomName:"Gimmick",CustomNameVisible:1,ArmorItems:[{},{},{},{id:"minecraft:skull",Damage:3,Count:1b,tag:{SkullOwner:{Id:"33a84c61-263c-4689-a62c-3b8044e1ff4d",Properties:{textures:[{Value:"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZDVjNmRjMmJiZjUxYzM2Y2ZjNzcxNDU4NWE2YTU2ODNlZjJiMTRkNDdkOGZmNzE0NjU0YTg5M2Y1ZGE2MjIifX19"}]}}}}],ArmorDropChances:[0.085F,0.085F,0.085F,-327.67F],Attributes:[{Name:generic.movementSpeed,Base:0.24},{Name:generic.attackDamage,Base:6}],ActiveEffects:[{Id:14,Amplifier:0,Duration:20000000,ShowParticles:0b}]}


    {DeathLootTable:"mctools:entities/gimmick_loot"}



    Ignore the [noparse] thing, I can't remove it]

    [noparse]/summon skeleton ~ ~1 ~ {CustomName:"Gimmick",CustomNameVisible:1,ArmorItems:[{},{},{},{id:"minecraft:skull",Damage:3,Count:1,tag:{SkullOwner:{Id:"33a84c61-263c-4689-a62c-3b8044e1ff4d",Properties:{textures:[{Value:"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZDVjNmRjMmJiZjUxYzM2Y2ZjNzcxNDU4NWE2YTU2ODNlZjJiMTRkNDdkOGZmNzE0NjU0YTg5M2Y1ZGE2MjIifX19"}]}}}}],ArmorDropChances:[0.085F,0.085F,0.085F,-327.67F],Attributes:[{Name:"generic.movementSpeed",Base:0.24},{Name:"generic.attackDamage",Base:6}],ActiveEffects:[{Id:14,Amplifier:0,Duration:20000000,ShowParticles:0b}],DeathLootTable:"mctools:entities/gimmick_loot"}[/noparse]

    The above command shouldn't work because I haven't tested it yet.
    (PS: I can see that you are using a generator, am I right? :)
    Just asking, so I can improve my ability to distinguish them.)

    Posted in: Commands, Command Blocks and Functions
  • 1

    posted a message on applying particle effects to players wearing amour via the use of scoreboards (i need help :( )
    Quote from Ratchetbear1»

    command block three:
    (Chain, Unconditional, Always active)
    /execute @a[score_test_min=1 ~ ~ ~ /particle happyVillager ~ ~1 ~ 0.25 0.25 0.25 1 1 force


    /execute @a[score_test_min=1] ~ ~ ~ /particle happyVillager ~ ~1 ~ 0.25 0.25 0.25 1 1 force
    You missed a square bracket.
    Posted in: Commands, Command Blocks and Functions
  • 1

    posted a message on [No good solution due to a bug] Multiplayer friendly custom crafting with chest minecarts
    Quote from Gdavid04»

    The problem is that it's impossible to test if other slots are empty, so placing something in the other slots results in losing it when crafting.

    It's impossible within 1 command.
    yeah, 27 + 2 instead.
    Posted in: Commands, Command Blocks and Functions
  • To post a comment, please or register a new account.