• 1

    posted a message on [1.14.3] How to detect when a mob die with command block?

    You can use the execute unless command to test if an entity is not in the world. It would look something like this: /execute unless entity @e[type=wither,tag=boss] run <do stuff>

    Posted in: Commands, Command Blocks and Functions
  • 1

    posted a message on /scoreboard command for all blocks?

    This is just currently not possible for every item in the game. Consider suggesting it in the Minecraft suggestions reddit. The only work around would be to create a separate score for every block in the game, and have them all be added together. This would be completely impractical and the amount of commands would stress the game (although scoreboards have been heavily improvised in 1.14 / 1.13). If you are running a spigot, bukkit, or paper server, you could try searching for plugins that can do this, such as this one.

    Posted in: Commands, Command Blocks and Functions
  • 1

    posted a message on Output a Signal When a Player is Killed.

    Setup:

    1. Create teams using the /team command. You probably want a red and blue team. Here is the wiki page on how to use the team command. Use it to also change a player's name color.


    2. Assign the players to their respective teams by using the /team command. The wiki page from step 1 covers how to do this as well.


    3. Set each player's spawn point accordingly using: /execute as @a[team=blue] run spawnpoint <blue spawn point>. Run the same command for the red team and their respective spawn point. (note: the team name "blue" may vary depending on what you named it in step 1)


    4. Create two scoreboard to track total kills. Using the /scoreboard command (wiki page here), create a scoreboard objective using the "deathCount" criteria. This will track how many times each player dies, and since there are only two players, it will indirectly track how many kills the other player gets. This will only work if you only have 2 players.


    Commands:

    Before I get into the commands, this is important information: Using a target selector, you can check whenever a player has over one kill. This would look something like this: @a[scores={deaths=1..}] (note: the name of the objective "deaths" may vary depending on what you called your scoreboard objective). Although the two periods are not completely necessary, they are used as a safety measure to ensure that even if score goes over 1, it will not break the commands.


    1. Use the /execute command to display text when someone dies. The following command should be used in a repeating command block:

    /execute as @a[scores={deaths=1..}] run title @a title [{"selector":"@s"}," has won the battle"]

    This will display the text "<player name> has won the battle" whenever someone dies.


    2. Teleport the player back to their spawn point. Once again using the same selector, run a conditional chain command block off of the repeating command block from step 1 (making sure that the arrows align) with the command: /tp @a[team=blue,scores={deaths=0}] <blue spawn point>, and run another command block of the same type with the red team and their respective spawn point. (note: the team name "blue" may vary depending on what you named it)


    3. Reset the death count using /scoreboard players set @a deaths 0 (note: the name of the objective "deaths" may vary depending on what you called your scoreboard objective). Place this command in a conditional chain command block running off of the previous conditional chain command blocks.


    You should have 4 command blocks aligned with each other, with all of their arrows pointing into the next one in one direction, like this:


    R> C> C> C>

    R= Repeating command block C= Conditional chain command block >= The direction of the command block


    Troubleshooting

    - Make sure all of the command blocks are in the right direction (like the diagram above)

    - Make sure all of the command blocks are set to always active or are powered (preferably always active)

    - Make sure the team name and scoreboard name are set to what you named them


    If it doesn't work or you need more info, please reply.

    Posted in: Commands, Command Blocks and Functions
  • 1

    posted a message on 1.14 Community Anti-Hack Datapack (WIP) [5/11/19 - Live Test Server!]

    Could you make a public discord? I feel that it would be much more efficient for this type of collaboration

    Posted in: Commands, Command Blocks and Functions
  • 1

    posted a message on What's the simplest way to make a time and space dependent hint system with command blocks?

    Ptolemy2002's answer is really good.


    However, I just wanted to add this:

    Depending on how your map is set up, you might be able to find a way to store what room a player enter's instead of using radius.

    Posted in: Commands, Command Blocks and Functions
  • 1

    posted a message on Execute if AT LEAST certain amount of items in player's inventory

    Here's my solution to the problem.


    We will be using the /clear command to do this. The first concept that you need to understand is that using /clear @s glowstone 0 will not clear any items from the player's inventory, and will return with the amount of items in the players inventory. This is crucial to this working. Second, is that in 1.13, a new store feature was added to /execute, which allows the result of a command to be stored in a scoreboard. We can use this to our advantage.


    The first thing we need to do is to create a scoreboard objective (dummy) that will store the result.


    Second, we would use a command like this:

    /execute as @a store result score @s items run clear @s glowstone 0

    Hope this helps! ~Spiralio



    Posted in: Commands, Command Blocks and Functions
  • 1

    posted a message on Taking mod requests and updates [on HIATUS]

    Thank you so much!

    Posted in: Requests / Ideas For Mods
  • 1

    posted a message on Help for my Adventure map.

    I made a quick tutorial to show you how to test if a player is nearby, I hope it helps!

    Posted in: Redstone Discussion and Mechanisms
  • 1

    posted a message on Made a item selection thingy.

    That's awesome :D

    Posted in: Redstone Discussion and Mechanisms
  • 1

    posted a message on Is There a Way to Test For 6 Players?

    /scoreboard objectives add Test dummy

    /scoreboard set @a Test 0

    /scoreboard set @r[score_Test=0] Test 1

    /execute @a[score_Test=1,score_Test_min=1] ~ ~ ~ /scoreboard players add PlayerNumber Test 1

    /scoreboard set @r[score_Test=0] Test 2

    /execute @a[score_Test=2,score_Test_min=2] ~ ~ ~ /scoreboard players add PlayerNumber Test 1

    /scoreboard set @r[score_Test=0] Test 3

    /execute @a[score_Test=3,score_Test_min=3] ~ ~ ~ /scoreboard players add PlayerNumber Test 1

    Continue this pattern until you reach 6. Then do this:

    /scoreboard players test PlayerNumber Test 6 6

    Run a comparator from that command block.


    P.S This is not a very easy method...

    Posted in: Redstone Discussion and Mechanisms
  • To post a comment, please or register a new account.