• 0

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

    Sorry it took so long; updated the thread to 1.12 to include the "keybind" feature.

    Posted in: Redstone Discussion and Mechanisms
  • 2

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

    Sorry for the long delay. I'm now back and have updated the thread with a list of changes between 17w18a and 1.12 release, as well as extra info after studying MCP.

    Shared Data


    1. A new "status effects" shared object has been added.
    2. The "status effects" shared object has been added to "entity".
    3. Added "nbt" strings to the "entity" and "item".
    4. Added "location" shared object to "entity".

    Triggers

    The entire list of triggers has been relocated to this post due to exceeding the character limit in combination with the main body.

    1. The "arbitrary_player_tick" trigger has been removed.
    2. The "effects_changed" trigger has been added.
    3. The "used_totem" trigger has been added.
    4. The "nether_travel" trigger has been added.
    5. The "brewed_potion" trigger defaults the item's potion ID to "minecraft:empty" when the item does not have a "Potion" string tag.
    6. The "entered_block" trigger also activates based on where an enderpearl landed.

    Requirements


    • The "requirements" list has changed from a DNF to a CNF, and descriptions/examples have been updated.
    • Display


    1. Added "hidden" option.

    Rewards


    1. The "commands" reward has been removed.
    2. The "function" reward has been added.




    Some time in the next week I'll be adding a timeline describing when advancements activate in relation to each other and to entities and tile entities. This will be particularly useful for knowing when functions are going to be running.

    If I've missed any other changes, please let me know!

    Posted in: Commands, Command Blocks and Functions
  • 2

    posted a message on 1.12 - Custom Loot Tables
    Quote from homchi»

    hello in 1.11 i used this loot table to allow spawn eggs drop, but in 1.12 snapshots it's broken, and i'm not sure how to fix it


    villager.json


    {
    "pools": [{
    "conditions": [{
    "condition": "killed_by_player"
    },
    {
    "condition": "random_chance_with_looting",
    "chance": 0.01,
    "looting_multiplier": 0.03
    }
    ],
    "rolls": 1,
    "entries": [{
    "type": "item",
    "name": "minecraft:spawn_egg",
    "weight": 1,
    "functions": [{
    "function": "set_nbt",
    "tag": "{EntityTag:{id:minecraft:villager}}"
    }]
    }]
    }]
    }



    The NBT parser has been rewritten and you'll need to use quotes around strings that contain syntax-breaking characters (in your case, the colon in "minecraft:villager" is breaking syntax):

    {
        "pools": [{
            "conditions": [{
                    "condition": "killed_by_player"
                },
                {
                    "condition": "random_chance_with_looting",
                    "chance": 0.01,
                    "looting_multiplier": 0.03
                }
            ],
            "rolls": 1,
            "entries": [{
                "type": "item",
                "name": "minecraft:spawn_egg",
                "weight": 1,
                "functions": [{
                    "function": "set_nbt",
                    "tag": "{EntityTag:{id:\"minecraft:villager\"}}"
                }]
            }]
        }]
    }


    More information concerning NBT syntax changes here: https://www.reddit.com/r/MinecraftCommands/comments/66jj03/changes_to_the_stringtonbt_parser_in_112/

    Posted in: Commands, Command Blocks and Functions
  • 1

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

    I was able to wait until today before becoming unavailable. Changes to the thread caused by 17w18b:

    Shared data

    1. A new "block" shared object was added, holding data used by the "minecraft:placed_block" and "minecraft:enter_block" triggers.

    Triggers

    1. A new "minecraft:arbitrary_player_tick" trigger has been added.
    2. A new "minecraft:consume_item" trigger has been added (item is before consumption).
    3. A new "minecraft:placed_block" trigger has been added.




    The thread has reached the 120k character limit. Not exactly sure what I'm going to do now, especially if more features are going to keep being added. Will probably have to use my second post in this thread to hold all the triggers, which takes up the bulk of the characters.

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on 1.12 Broke Some Mechanics

    The command to set the block is:


    setblock ~ ~ ~ minecraft:mob_spawner 0 replace {SpawnData:{id:minecraft:armor_stand,ArmorItems:[{},{},{},{id:minecraft:leather_boots,Count:1,Damage:4,tag:{Unbreakable:1,display:{color:16777215}}}],HandItems:[{},{}],Pose:{RightArm:[30f,0f,0f],LeftArm:[30f,0f,0f]}},RequiredPlayerRange:0,MaxNearbyEntities:0}


    I'd like to be able to make a converter (or somone to make one because I suck at coding) to convert it to 1.12



    Mmm, the problem there is:

    id:minecraft:armor_stand
    id:minecraft:leather_boots

    The ":" character is now a special character that will break syntax if it the string it belongs to is not encased in quotes:

    id:"minecraft:armor_stand"
    id:"minecraft:leather_boots"

    As far as I can tell that's the only issue in that particular command:

    setblock ~ ~ ~ minecraft:mob_spawner 0 replace {SpawnData:{id:"minecraft:armor_stand",ArmorItems:[{},{},{},{id:"minecraft:leather_boots",Count:1,Damage:4,tag:{Unbreakable:1,display:{color:16777215}}}],HandItems:[{},{}],Pose:{RightArm:[30f,0f,0f],LeftArm:[30f,0f,0f]}},RequiredPlayerRange:0,MaxNearbyEntities:0}
    Posted in: Commands, Command Blocks and Functions
  • 1

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

    Changes to the thread caused by 17w18a:

    Shared data

    1. A new "distance" shared object has been added, holding various options about distance between an origin.
    2. The "entity" shared object now uses the "distance" shared object instead of a "distance" range.

    Triggers

    1. A new "minecraft:tick" trigger has been added.
    2. A new "minecraft:tame_animal" trigger has been added.
    3. The "minecraft:levitation" trigger now uses the "distance" shared object instead of a "distance" range.

    Display

    1. A new option "show_toast" has been added.
    2. A new option "announce_to_chat" has been added. There is also a new gamerule "announceAdvancements", which when false, prevents all announcements from being shown in the chat.




    Unfortunately I will be gone for a couple weeks and will likely not be able to update the thread for the next couple of snapshots. Sorry!

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on 1.12 Broke Some Mechanics

    Your link doesn't work. Assuming this is what you're referring to, then see this list of changes to the NBT syntax. In particular, this command in the video's description:

    /blockdata ~ ~ ~ {SpawnData:{ArmorItems:[0:{},1:{},2:{},3:{id:"minecraft:diamond_hoe",Count:1b,Damage:1s,tag:{Unbreakable:1}}]}}



    The list indices must be removed; they never worked and the parser was rewritten to not accept keys for list elements:

    /blockdata ~ ~ ~ {SpawnData:{ArmorItems:[{},{},{},{id:"minecraft:diamond_hoe",Count:1b,Damage:1s,tag:{Unbreakable:1}}]}}
    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on [UNSOLVED] Removing arrows stuck in a player
    Quote from SirJosh3917»

    ./kill @e[type=Arrow]

    kills all entity type Arrow




    It is not possible. The arrows in the player are not entities so /kill will not remove them.
    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on How to Get Custom Player Heads in Minecraft 1.11 using resource pack

    Resource packs do not control custom player heads.

    A player skull with "SkullOwner" string is translated into a compound containing an encoded URL to the skin file on Mojang's servers. That skull will always keep that same URL. Changing your own skin will create a new URL for your new skin, while the old URL will not change and that old head will retain its skin.

    So while being logged out, you can change your skin, login, give yourself the skull with your name, exit the game, change your skin to something else, and that skull will still have the old skin. You can do this as many times as you want in order to get custom player skulls to fit your needs that will never expire.

    EDIT: I should mention that there may be an issue where the "SkullOwner" string isn't translated, primarily when first provided via /give. You may have to throw the skull on the ground first and pick it back up before exiting the game, otherwise it'll just have the new skin.

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on 1.12 - NBT Changes and Additions
    Quote from jellewietsma»

    So I've made a working check for item thing in mc 1.11 but it doesn't work for 1.12, but I can't find why on this page. Is there something missing or is it a bug?


    Adds 1 Money if you have a cookie in your inventory (works in 1.11 but not in 1,12)

    /scoreboard players add @p Money 1 {Inventory:[{id:minecraft:cookie}]}




    Error in 1.12:

    Could not parse dataTag, reason: Expected '}' but got a ':' at : {Inventory:[{id:minecraft:<--[HERE]



    The NBT parser was written completely for 1.12. I forgot to link to a list of changes, which has now been added to the main post (link).

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on [UNSOLVED] Removing arrows stuck in a player

    It is not possible. The arrows in the player are not entities so /kill will not remove them.

    Posted in: Commands, Command Blocks and Functions
  • 1

    posted a message on 1.12 - Custom Loot Tables

    Can I use a function on an entire pool?


    For example, say I wanted a pool that gave a piece of leather or chain armor, either a helmet, chestplate, leggings or boots, so eight different items, and I wanted that piece of armor to have a 40% chance of having Protection I.


    Could I apply 40% chance of Protection I to the whole pool, or would I have to have it repeated 8 times, once for each piece of armor?



    Functions are only available for individual entries, so you have to repeat it.

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Highest score between 2 armor stands
    Quote from ThePopcornNoob»

    So I am working on a voting system and I searched for the most possible and easiest way to make a mechanism like that and I saw This link
    which I copied the commands and it didn't work for me because of the c=1 argument if there is a way to solve this please let me know.
    The 2 armor stands are TimeYes and TimeNo and the scoreboard names are TimeTotal and TimeTotalCopy





    Since the /scoreboard command has player bias, you need to specifically exclude players (adding "type=!player" to the nested selectors, ensuring you keep "c=1"). In 1.12 you can use the @s selector instead.

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on "DeathLootTable" stopped working
    Quote from iNkoR_the_2nd»

    For example "DeathLootTable:entities/skeleton"



    If you don't have quotes around the string value, you need to add them for special characters (in your case, /):

    /summon minecraft:skeleton ~ ~1 ~ {DeathLootTable:"minecraft:entities/skeleton"}
    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on 1.12 - Custom Advancements (AKA Achievements)
    Quote from Piyotato»

    Since this is the case, have you already done something of this sort? If possible, I would like to download it from you, otherwise, I'll have to start doing it myself :/


    Sadly I don't. I would also recommend not doing so until 1.12 is released; new default advancements have constantly been added, and others moved around, so that resource would likely become outdated very quickly.

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