• 0

    posted a message on Change gamemode in area
    Quote from zindan»

    IT is really good, thanks but there is a problem. I still want the owner of the house to always remain in gamemode 0 within his area. Only the outsiders should swap to gamemode 2. How would I then do this?

    You said in a 20 block radius of the house. So the coordinates would be the center of that area. A cuboid area would be more difficult.
    To exclude the owner, you can use the name argument in both commands:

    @a[x=0,y=0,z=0,m=!2,r=20,name=!zindan]
    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Change gamemode in area
    /gamemode 2 @a[x=0,y=0,z=0,m=!2,r=20]
    
    /gamemode 0 @a[x=0,y=0,z=0,m=2,rm=20]

    You just need those two simple commands. Replace 0 0 0 with the coordinates of your house, e. g. x=40,y=72,z=-123

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on How to test for player that is not at certain coordinates?

    rm is what you are looking for.

    /execute @e[tag=special_fire] ~ ~4 ~ /scoreboard players set @a[rm=10] fire 0
    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Function "Wait"
    Quote from WackMaDino»

    Hmmm, doesn't seem to work; it may have screwed it up since it's in the same function document as a lot of other things; but I need them all to run with one command. that or I just screwed it up and I don't see what I did. I'll edit my post.


    Make sure to place a powered activator rail at 0 1 0. Also are you in range so that you can hear the sound? Otherwise, change sounds coordinates or increase the volume.
    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Function "Wait"

    This would be the workaround: http://www.minecraftforum.net/forums/minecraft-discussion/redstone-discussion-and/commands-command-blocks-and/2826143-how-to-do-delay-inside-functions


    You can for example write

    summon commandblock_minecart 16 1 16 {Tags:["delay"],PortalCooldown:20,Command:"playsound sound master @a ~ ~ ~ 1000"}
    Posted in: Commands, Command Blocks and Functions
  • 2

    posted a message on How to Do Delay Inside Functions!

    Functions were introduced in 1.12 prerelease 1 and are an awesome new way to interact with ingame commands.

    There is one problem though: You cannot use them to do delayed or offset actions. Everything happens in one tick.

    With commandblocks, there were contraptions that made this easy, for example this one by Lorgon111: http://www.minecraftforum.net/forums/minecraft-discussion/redstone-discussion-and/commands-command-blocks-and/2775890-guide-to-delayed-command-blocks


    This is my concept on how to add simple and customizable delays inside functions:


    =======================================================================


    We start off with the main loop everything runs on. It just needs three commands. Make sure to hook this function up to your gameLoopFunction or any repeating command block.

    kill @e[type=commandblock_minecart,tag=delay_end]
    scoreboard players tag @e[type=commandblock_minecart,tag=delay] add delay_end {PortalCooldown:0}
    teleport @e[type=commandblock_minecart,tag=delay_end] 0 1 0


    Note the three coordinates at the end. These can be anywhere in your spawn-chunks. Go to that place and place an activator rail on that exact coordinate, with a redstone block below.


    Now to the fun part: This is the command you are going to use to trigger the system:

    summon commandblock_minecart 16 1 16 {Tags:["delay"],PortalCooldown:80,Command:"say hello world!"}


    Again, the three coordinates can be anywhere inside your spawn chunks or loaded area, as long as they are in a save spot and NOT on or above your activator rail.

    The number 80 would be the amount of delay you want the command to execute in. 80 is 4 times 20, so 4 seconds. (one second is 20 ticks)

    Command is the command you want to execute, obviously. Make sure this command is enclosed in quotation marks and escaped accordingly. I suggest to run another function with this command If you want to execute multiple commands after the delay.


    How it works: The portal cooldown tag naturally ticks down. Since it isn't used by anything else in this case, I am re-using it as a timer. When that timer hits 0, the commandblock minecart gets teleported onto the activator rail, executes and gets killed in the next tick.

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Is it possible to count items on the ground ?

    You would have to make a command block for every possible number. It's easier to leave it in the players inventory or to put it into another inventory. to then use the /clear method to count the items.

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on How to execute a certain dropped item

    Use /scoreboard players tag @e[type=item] add your_tag {data_tag} to mark the item. Then target it with that tag: @e[type=item,tag=your_tag]

    Posted in: Commands, Command Blocks and Functions
  • 2

    posted a message on Blockbench - A free, modern block model editor!

    Welcome. I want to introduce you to Blockbench, my latest tool.

    It allows you to create block models faster and easier than any other free tool. And it comes with a constantly growing set of featues, including display settings with preview, custom keybindings to make the program yours and the ability to edit as many things as you want at once.



    Here is the website and the download link:

    http://server.zofenia.de/blockbench


    Have fun modelling!

    Posted in: Minecraft Tools
  • 0

    posted a message on Targeting everything except the executor...
    Quote from irobot202»

    I made a command contraption to use on a server that adds blood gems and an altar. The way that one of the gems works is that it detects and player within the radius of 5 of a player with the tag skygem, and with a HurtTime:1s tag and then tags them with a smite tag strikes them with lightning... To avoid problems I made the selector for striking them @e[r=5,tag=!skygem] due to recent problems where the player with the gem got struck too. My problem is that if both players have the same gem, they both get the tag skygem, which will make them both not get struck by lightning... Any way around this? Maybe a way I can select everything but the person I execute from.


    If you do this inside a function, you might be able to add the tag, summon the lightning and remove the tag again simultaneously. This means that when the lightning gets spawned it only targets the players without the tag in that exact moment.
    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Prevent team from mob interaction

    You can give a very high weakness effect, but that would also stop them from damaging other players...

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on HELP! How can I set a spawn point for a scoreboard team?

    /spawnpoint is relatively unflexible in this situation. You should use a command block solution for this one:

    https://goo.gl/0Fn1Vx

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on My command blocks activate when I teleport or move away?

    You probably rely on checking if a bed-testing command has failed. But it will also fail when the chunks unload... You could test for air at the location of the bed instead.

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on how to give someone something if they have a certain item in their inventory
    Quote from Code202»

    This is in 1.8 format. The correct way to do this is as follows:

    /scoreboard players set @a potion 1 {Inventory:{tag:{display:{Name:"Warrior Spell"}}}

    /give @a[score_potion_min=1] potion 1 0 {display:{Name:"Warrior Spell"},Potion:strength}

    What JannisX11 is incorrect, and is still in 1.8 format and will give you an untextured item.


    Like I said, I did not have the time to check and correct the give command, so I just told them how to check for NBT data. Also, you should not use scores to mark a player. Scores are laggier, require a scoreboard and cannot be tested as false. Since 1.9 there are the new scoreboard tags that are stored inside the player's nbt and not in an external file and should be used for all binary data.
    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on [SOLVED] Armour Stand Rotation 1.11.2

    The problem why it does not work with other directions might be shading. In Minecraft, items and blocks are light on two opposite sides and dark on the other two. The mechanic will certainly still work, but the items might look weird. To get the armor stands into the right position, you have to play around a bit with the /tp command.

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