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
A new "status effects" shared object has been added.
The "status effects" shared object has been added to "entity".
Added "nbt" strings to the "entity" and "item".
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.
The "arbitrary_player_tick" trigger has been removed.
The "effects_changed" trigger has been added.
The "used_totem" trigger has been added.
The "nether_travel" trigger has been added.
The "brewed_potion" trigger defaults the item's potion ID to "minecraft:empty" when the item does not have a "Potion" string tag.
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
Added "hidden" option.
Rewards
The "commands" reward has been removed.
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!
i made lots of custom advancement i put it on a multiplayer server, when i start the server, no advancement are shown, i have to do /reload, then they all appear
the problem is that when i restart the server i lost all advancement again and i have to reload again to show them, and player lost all the advancement they had
any fix ?
thanks
Sorry, I haven't heard of that problem. You might be better off posting in the Server Support section, especially if the server you're using is not vanilla.
Added a new section describing the processing order of triggers in relation to other features:
Processing order of triggers
The following timeline describes the order in which specific triggers activate in each game tick. This can be useful when running a function as a reward. For example, if you needed to run commands before entities are processed (and after command blocks are processed), the "minecraft:tick" trigger will do so. If you needed to run commands after entities are processed, you would use the "gameLoopFunction" gamerule to run the necessary function.
So I've been really getting into making a map ive been working on which is a modified skyblock, anyways that's besides the point. Ive been doing custom advancements for the map and i have one which is getting a furnace minecart. i want a secret advancement after that one that you get for placing a furnace minecart but i cant figure out which trigger to use, or if there even is a trigger that exists for that purpose. Thanks in advance for the help!
Hey Skylinerw, while doing some tests I noticed some outdated(?) information in your post.
1. The "villager_trade" trigger does appear to activate multiple times if the trade is shift-clicked
2. The "nether_travel" trigger description is the same as "location", though "nether_travel" only activates when going from the nether to the overworld.
"direct_entity" works fine in the damage object for "entity_hurt_player", but if I try to do it for "player_hurt_entity" it only accepts them under the "damage flag" object.
In here the "direct_entity" just gets completely ignored.
The Meaning of Life, the Universe, and Everything.
Join Date:
12/4/2010
Posts:
52
Member Details
This is a simple question, is it possible to use custom commands in the advancement functions?
With this I mean any command that isn't Vanilla Minecraft.
I tried it before and I don't seem to get it to work but since commandblocks can run them I figured this should work aswell.
If not, is there a reason it doesn't?
Could this be added in the future?
the value of the function reward has to be a function, eg you have a function file functions/foo/bar.mcfunction, then you use foo:bar as the function value; and functions can run the same commands anything else can.
First I just want to thank the OP for this post. This has honestly been a great help for setting up the advancements for our let's play series... and I will be linking it in the description for the videos.
I am still a noob at writing these for 1.12 though and hoped someone could help me with an advancement I can't seem to get right. I am trying to get an advancement if someone trades for a mending book (and only a mending book). I don't know how to set the StoredEnchantments id in the conditions though.
This is what I have...
{
"display": {
"icon": {
"item": "minecraft:enchanted_book"
},
"title": {
"text": "All the Mending is Mine"
},
"description": ["",{"text": "If you hide the villager, only you can trade for the good books"},{"text": "\nTheMaster","color": "dark_gray","italic": true}],
"frame": "challenge"
},
"parent": "yana:themaster/sky_captain",
"criteria": {
"trade_mending": {
"trigger": "villager_trade",
"conditions": {
"items": [
{
"item": "minecraft:enchanted_book",
"nbt": {"StoredEnchantments":{id:"70"}}
}
]
}
}
},
"rewards": {
"function": "yana:themaster/all_the_mending_is_mine"
}
}
It only works if I take out the nbt line. But then it works for any enchanted book, which is not what I want.
"nbt":"{StoredEnchantments:{id:70s}}" nbt data cannot be expressed in json, so it’s 1 big string (and the s is needed because it’s a short (16bit integer)).
Thank you so much! I realized my mistake with the quotes in the wrong place but didn't realize I needed the s. As I said I'm a noob. Thanks!
I'm not sure what I'm doing now though because it still seems to want to give me the achievement for trading with any enchanted book and not just mending.
Edited to add... It's not just enchanted books... it wants to give me the achievement for any trade I'm making so I obviously have the whole thing wrong somehow.
ok so -416.0 min and -416.9 max would make it work?
Currently work on a survival command modpack for vinalla 1.12 (and the pre releases) any ideas please post them in the discription of http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/2822952-minecraft-command-mod (will change that if it gets updated) aswell as catch me on twitch
hay hay hay i am aswell posting updates on twitter @The_Zorua_Bit
that should work, yes.
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
Triggers
The entire list of triggers has been relocated to this post due to exceeding the character limit in combination with the main body.
Requirements
Display
Rewards
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!
Minecraft-things: http://skylinerw.com
More Minecraft-things: https://sourceblock.net
Guides for command-related features (eventually moving to Source Block): https://github.com/skylinerw/guides
I primarily hang out in the /r/MinecraftCommands discord, where there's a lot of people that help with commands: https://discord.gg/QAFXFtZ
Their corresponding subreddit: https://www.reddit.com/r/MinecraftCommands/
Sorry, I haven't heard of that problem. You might be better off posting in the Server Support section, especially if the server you're using is not vanilla.
Added a new section describing the processing order of triggers in relation to other features:
Processing order of triggers
The following timeline describes the order in which specific triggers activate in each game tick. This can be useful when running a function as a reward. For example, if you needed to run commands before entities are processed (and after command blocks are processed), the "minecraft:tick" trigger will do so. If you needed to run commands after entities are processed, you would use the "gameLoopFunction" gamerule to run the necessary function.
Minecraft-things: http://skylinerw.com
More Minecraft-things: https://sourceblock.net
Guides for command-related features (eventually moving to Source Block): https://github.com/skylinerw/guides
I primarily hang out in the /r/MinecraftCommands discord, where there's a lot of people that help with commands: https://discord.gg/QAFXFtZ
Their corresponding subreddit: https://www.reddit.com/r/MinecraftCommands/
Minecraft won't even acknowledge anything I put into the advancements folder.
It is in data/advancements/test/challenges/root.json
My .json is
Does anyone know what might be wrong with this?
you use the wrong quote types in a number of places (mainly within the display tag), they have to be the "normal " quotes".
Ok I fixed all the wrong quotes and I now have
However, It still refuses to even load i. I have the log window open and it says
Parsing error loading custom advancement test:challenges/root
com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Unterminated object at line 28 column 6 path $.criteria
I finally fixed it, thanks everyone! Have a diamond
Is there a way to create new groups of advancements?
go to my website at https://game-adventure.weebly.com/
to find cool things.
1. making mods that means coding because you need to know how to code to make mods.
You mean a new tab? simple, have an advancement without a parent and with a display+background
So I've been really getting into making a map ive been working on which is a modified skyblock, anyways that's besides the point. Ive been doing custom advancements for the map and i have one which is getting a furnace minecart. i want a secret advancement after that one that you get for placing a furnace minecart but i cant figure out which trigger to use, or if there even is a trigger that exists for that purpose. Thanks in advance for the help!
EDIT: I'll just assume this post is dead then....
Hey Skylinerw, while doing some tests I noticed some outdated(?) information in your post.
1. The "villager_trade" trigger does appear to activate multiple times if the trade is shift-clicked
2. The "nether_travel" trigger description is the same as "location", though "nether_travel" only activates when going from the nether to the overworld.
"direct_entity" works fine in the damage object for "entity_hurt_player", but if I try to do it for "player_hurt_entity" it only accepts them under the "damage flag" object.
In here the "direct_entity" just gets completely ignored.
Is this a bug?
This is a simple question, is it possible to use custom commands in the advancement functions?
With this I mean any command that isn't Vanilla Minecraft.
I tried it before and I don't seem to get it to work but since commandblocks can run them I figured this should work aswell.
If not, is there a reason it doesn't?
Could this be added in the future?
the value of the function reward has to be a function, eg you have a function file functions/foo/bar.mcfunction, then you use foo:bar as the function value; and functions can run the same commands anything else can.
First I just want to thank the OP for this post. This has honestly been a great help for setting up the advancements for our let's play series... and I will be linking it in the description for the videos.
I am still a noob at writing these for 1.12 though and hoped someone could help me with an advancement I can't seem to get right. I am trying to get an advancement if someone trades for a mending book (and only a mending book). I don't know how to set the StoredEnchantments id in the conditions though.
This is what I have...
{
"display": {
"icon": {
"item": "minecraft:enchanted_book"
},
"title": {
"text": "All the Mending is Mine"
},
"description": ["",{"text": "If you hide the villager, only you can trade for the good books"},{"text": "\nTheMaster","color": "dark_gray","italic": true}],
"frame": "challenge"
},
"parent": "yana:themaster/sky_captain",
"criteria": {
"trade_mending": {
"trigger": "villager_trade",
"conditions": {
"items": [
{
"item": "minecraft:enchanted_book",
"nbt": {"StoredEnchantments":{id:"70"}}
}
]
}
}
},
"rewards": {
"function": "yana:themaster/all_the_mending_is_mine"
}
}
It only works if I take out the nbt line. But then it works for any enchanted book, which is not what I want.
I appreciate any help!
Thanks again for a great guide!
it has to be:
"nbt":"{StoredEnchantments:{id:70s}}" nbt data cannot be expressed in json, so it’s 1 big string (and the s is needed because it’s a short (16bit integer)).
Thank you so much! I realized my mistake with the quotes in the wrong place but didn't realize I needed the s. As I said I'm a noob. Thanks!
I'm not sure what I'm doing now though because it still seems to want to give me the achievement for trading
with any enchanted book and not just mending.Edited to add... It's not just enchanted books... it wants to give me the achievement for any trade I'm making so I obviously have the whole thing wrong somehow.
Oh, oops, my bad.
StoredEnchantments is a list.
"nbt":"{StoredEnchantments:[{id:70s}]}"
Ok I finally figured out what I was doing wrong. Sometimes it's hard to believe I code websites for a living.
I had an extra s on the word item (that's where the s went) so it wasn't looking for a specific item.
If anyone is interested, this is the final one that works...
{
"display": {
"icon": {
"item": "minecraft:enchanted_book"
},
"title": {
"text": "All the Mending is Mine"
},
"description": ["",{"text": "If you hide the villager, only you can trade for the good books"},{"text": "\nTheMaster","color": "dark_gray","italic": true}],
"frame": "challenge"
},
"parent": "yana:themaster/sky_captain",
"criteria": {
"trade_mending": {
"trigger": "minecraft:villager_trade",
"conditions": {
"item": {
"item": "minecraft:enchanted_book",
"nbt":"{StoredEnchantments:{id:70s}}"
}
}
}
},
"rewards": {
"function": "yana:themaster/all_the_mending_is_mine"
}
}