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
  • 0

    posted a message on 1.12 - Custom Advancements (AKA Achievements)

    I have moved this guide temporarily to Github (link) and will be updating it to 1.13 there in the coming weeks. I will eventually move it to a more permanent location.

    This thread will no longer be updated, though feel free to continue asking questions.

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on 1.12 - JSON Text Component (for /tellraw, /title, books, signs)

    I have moved this guide temporarily to Github (link) and will be updating it to 1.13 there in the coming weeks. I will eventually move it to a more permanent location.

    This thread will no longer be updated, though feel free to continue asking questions.

    Posted in: Redstone Discussion and Mechanisms
  • 0

    posted a message on 1.12 - Custom Loot Tables

    I have moved this guide temporarily to Github (link) and will be updating it to 1.13 there in the coming weeks. I will eventually move it to a more permanent location.

    This thread will no longer be updated, though feel free to continue asking questions.

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on 1.12 - Custom Recipes

    I have moved this guide temporarily to Github (link) and will be updating it to 1.13 there in the coming weeks. I will eventually move it to a more permanent location.

    This thread will no longer be updated, though feel free to continue asking questions.

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Help with command selectors

    The x/y/z selectors only change the origin of command execution and doesn't invoke a radius. You need to add the "r" or "dx/dy/dz" parameters to target entities around that location:

    /kill @e[x=-120,y=42,z=17,r=1]
    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on commandBlockOutput doesn't seem to be working, or I'm doing it wrong
    Quote from Technetium»

    17w46a (not even trying on the latest snapshot since they said it will break existing worlds currently)

    Tried that, still no luck. I also double-checked after reloading the game that commandBlockOutput was set to false. Attached image shows both commands set to false and still the messages appear immediately after.


    All /gamerule commands are broken in 46a. That has been fixed for the latest snapshot: https://bugs.mojang.com/browse/MC-121783

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on [*Solved] 17w46a Merging entity data motion trouble
    Quote from YMbrothers»

    Did you specify where that command is gonna be executed? If that command is in a function, I don't know if distance=3.. can detect it.
    However, if this isn't the case, try to remove the d in the Motion tag. Cuz mine works fine.


    The origin for functions will be (0,0,0), so "3.." will be based on that location.

    The "d" is just an explicit declaration of a double and does not have bearing on success.

    Otherwise the command works just fine for me. Not really sure what could be wrong other than the command is not actually running.

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on How can I set a cmd on an item ?
    Quote from YMbrothers»

    /execute @a[y=20,dy=-100] ~ ~ ~ kill @s

    Try it, might not work.




    This is close, but you cannot specify the Y data in the initial selector. The unspecified coordinate parameters (x/y/z) will default to the original executor's position. In this case, if a command block is running that command, X and Z will default to the command block's location. The player would have to be at the same location as the command block to be found.

    The remedy is to move those parameters into the nested selector, since at that point the origin is the player (where the X and Z values will be the player's X and Z):

    /execute @a ~ ~ ~ kill @s[y=20,dy=-100]

    or

    /execute @a ~ 20 ~ kill @s[dy=-100]

    Posted in: Commands, Command Blocks and Functions
  • 1

    posted a message on How can I detect if player have a minimum amount of item
    Quote from pyaroshi»


    Is there a way to do this in 1.13 (snapshot)?


    Yes, though quite a bit differently. CommandStats as a whole has been overhauled and no longer directly stores data on the entity/block. Instead, /execute stores the result of a command directly to a target's score. That way the only prerequisite is the objective itself, no /stats or other /scoreboard commands.

    Prerequisites:

    The objective to track the number of items in:

    /scoreboard objectives add ITEMS dummy

    Triggering:

    The following command will set each player's own score based on the number of the specified items that they have in their inventory:

    /execute as @a store result score @s ITEMS run clear @s minecraft:cobblestone 0


    And to target players afterwards:

    /say Players with 30+ cobblestone: @a[scores={ITEMS=30..}]



    The subargument that replaces CommandStats is "store". All of the old varied CommandStats types (AffectedItems, AffectedEntities, AffectedBlocks, QueryResult) have been merged into one "result" type (which is what's used in the command above). The original "SuccessCount" type is now just "success" (in place of "result" int he command). From there, you can either choose to store the resulting value from the nested command into a "score", or you could store it directly into NBT data for a "block" or "entity".

    For example, the following sets a creeper's health based on the number of cobblestone in the player's inventory (provided the amount does not exceed the creeper's max health):

    /execute as @p store result entity @e[type=minecraft:creeper,limit=1,sort=nearest] Health float 1.0 run clear @s minecraft:cobblestone 0
    Posted in: Commands, Command Blocks and Functions
  • 1

    posted a message on Iron golem spawn egg not working
    Quote from Juiseboy»

    Is this a bug? It worked with other entities but not iron golems :huh:



    It's not. What's happening is when the internal list of savegame entities is instantiated, some of them come with "spawn egg colors" to indicate that they have a spawn egg. Anything that does not have those egg colors will not get a corresponding egg, thus preventing the custom egg from working. On top of that, statistics rely on the same list of entities that are available for spawn eggs, hence why there's no "stat.killEntity" for iron golems, ender dragons, etc. (though those can be worked around using the "player_killed_entity" advancement trigger).

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on execute output

    You can do that with:

    /execute if entity @a[distance=..4]
    Posted in: Suggestions
  • 0

    posted a message on New 1.13 execute commands need help

    All typical /execute commands from pre-1.13 will change as follows:

    Pre-1.13:

    /execute @e[score_collapse=40,score_collapse_min=40] ~ ~ ~ say hello
    /execute @e[score_collapse=40,score_collapse_min=40] ~ ~ ~ detect X Y Z minecraft:chest facing=south say hello

    1.13 (discounting positional arguments):

     /execute as @e[scores={collapse=40}] run say hello
    /execute as @e[scores={collapse=40}] if block X Y Z minecraft:chest[facing=south] run say hello
    1.13 (assuming at the "as" target's position, only with no offset (~ ~ ~)):

    /execute as @e[scores={collapse=40}] at @s run say hello
    /execute as @e[scores={collapse=40}] at @s if block X Y Z minecraft:chest[facing=south] run say hello

    1.13 (assuming the need to change offset coordinates from target's location):

     /execute as @e[scores={collapse=40}] at @s offset ~ ~5 ~ run say hello
    /execute as @e[scores={collapse=40}] at @s offset ~ ~5 ~ if block X Y Z minecraft:chest[facing=south] run say hello

    Essentially /execute now has a bunch of subarguments that can be specified in any order. Using the last command from the above examples, the subarguments are:

    as @e[scores={collapse=40}]
    at @s
    offset ~ ~5 ~
    if block X Y Z minecraft:chest[facing=south]
    run say hello


    Dinnerbone's reddit post has a lot more details on this, a well as selector changes: https://www.reddit.com/user/Dinnerbone/comments/6l6e3d/a_completely_incomplete_super_early_preview_of/

    Posted in: Commands, Command Blocks and Functions
  • 2

    posted a message on Noobiness Test!

    Hello,

    Your topic raises the following issue(s) that results in the thread being locked:

    • Previous Discussion

    Previous Discussion

    A thread already exists for discussing this topic. Please post discussion in that thread to avoid making duplicate discussions. You can use the search function to check for existing threads.

    Original topic: http://www.minecraftforum.net/forums/minecraft-java-edition/discussion/160258-minecraft-noob-test

    You can read the rules regarding the Minecraft forums here. Thank you.

    Posted in: Discussion
  • 0

    posted a message on generic.flyingSpeed?

    It is indeed only applicable to parrots. It acts as a modifier, but seemingly only for horizontal flight speed. For example, the following would prevent them from flying horizontally:

    /summon minecraft:parrot ~ ~1 ~ {Attributes:[{Name:"generic.flyingSpeed",Base:0.0}]}


    And the following has them fly double the normal speed (0.4000000059604645):

    /summon parrot ~ ~1 ~ {Attributes:[{Name:"generic.flyingSpeed",Base:0.8}]}


    Although I can't seem to get them moving at insane speeds like you could with "generic.movementSpeed", so I'm assuming there's a limiter presented by the flight AI.

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Can you make infinite potion with command blocks
    Quote from NutPotato»

    I saw the question and I did the "increase number by one" method of finding out the exact answer. As of 1.12 version of Minecraft, the number that will start to display **:** is 1639 so an example would be:


    If you don't want the particles to show, just add "{ShowParticles:0b}" to the end so it would be:


    Please remember that this is in 1.12, I'm not sure if it's different in past versions. Have fun with knowledge!





    You cannot make a potion effect last infinitely. The duration showing "**:**" simply means the value is too large to convert, as it converts into the "short" type (32,767 maximum, in which 9,999 seconds is 199,980 ticks). The highest you can go with the /effect command is 1,000,000 seconds (20,000,000 ticks):
    /effect <player|entity> <effect> 1000000 <amplifier>


    The highest an effect can go NBT-wise is 2,147,483,647 ticks, roughly 3.4 years. For 'infinite', you would have to apply the potion effect nonstop on a clock.
    Posted in: Commands, Command Blocks and Functions
  • To post a comment, please or register a new account.