How do I find the loot table in a world save? I made a world in the latest snapshot and I don't see a "loot_table" folder in "data"
Edit: Ok I found out how to do everything but it says im missing a string...
[16:44:08] [Server thread/ERROR]: Couldn't load loot table minecraft:entities/zombie from C:\Users\Drew\AppData\Roaming\.minecraft\saves\Special___\data\loot_tables\minecraft\entities\zombie.json
com.google.gson.JsonSyntaxException: Missing type, expected to find a string
at od.h
How do I find the loot table in a world save? I made a world in the latest snapshot and I don't see a "loot_table" folder in "data"
Edit: Ok I found out how to do everything but it says im missing a string...
[16:44:08] [Server thread/ERROR]: Couldn't load loot table minecraft:entities/zombie from C:\Users\Drew\AppData\Roaming\.minecraft\saves\Special___\data\loot_tables\minecraft\entities\zombie.json
com.google.gson.JsonSyntaxException: Missing type, expected to find a string
at od.h
The format has changed in 15w43c (the thread is not yet updated, keep running into ugly post formatting issues). The "items" list tag was renamed to "entries", which requires a "type" string tag with a value of: "item", "loot_table", or "empty". The "item" string tag was renamed to "name".
Updated the thread to 15w43c, added more to Q&A, added a "Useful links" section. Let me know if I forgot to fix something, since the format did change a bit.
I found that the loot table is in the version file.
How can I apply the custom loot table into different worlds?
(I heard that you can put a resource pack file into a world file,
so everytime a player enters the world, the resource pack will
immediately apply to it.Does this custom loot table need this way
to... work on independent worlds like the resource pack did?)
Yes, loot tables must be packaged with each world in order to work. The players themselves need nothing (and can't have anything) since it's server-side.
15w44a brought two new functions: "set_attributes" and "enchant_randomly":
set_attributes
Applies attribute modifiers to the item via the "modifiers" list.
Each modifier will require:
1. An "attribute" string that states the attribute ("generic.maxHealth", "generic.armor", etc).
2. A "name" string that states the custom name of the attribute. Can be anything.
3. An "amount" double or compound, stating how much to modify the attribute. If compound, "min" and "max" doubles define the range.
4. An "operation" string, stating which operation to use. The accepted inputs are "addition", "multiply_base", and "multiply_total".
5. A "slot" string or list, stating which one of the specified slots the item can be used in. Note that if using it as a list, it will randomly selecting one of the specified slots. Accepted slots are: "mainhand", "offhand", "feet", "legs", "torso", "head".
Optional input:
1. An "id" string tag that specifies the UUID of the modifier.
The following will provide a diamond sword that will increase the "generic.maxHealth" attribute, choosing a value randomly between 3.5 and 6.0, using the "addition" operation. The slot it is applied to will either be "mainhand" or "offhand".
The following will apply a "generic.attackDamage" modifier of exactly 1.0 in specifically the "torso" slot. The UUID is 00000000-0000-0001-0000-000000000001.
Randomly applies a single enchantment from a list of enchantment IDs, specified with the optional "enchantments" list. If "enchantments" is not specified, the item will be enchanted randomly with a compatible enchantment for that item.
The following will apply a random enchantment and level of either Looting, Depth Strider, or Sharpness, along with a secondary enchantment that is compatible with the item.
As of 15w44b, all mentions of the "luck" and "luck_multiplier" keys are gone. Instead, a "quality" integer key has taken their place. This tag is specifically used with the new "Luck" enchantment/attribute to modify the chances ("weight") of the item being selected from the table.
It does work for mobs, chests, and fishing. The game currently only uses it for fishing. Please note that the "Looting" enchantment is unrelated to this.
Quality
Changes the "weight" of the entry based on the killing/opening/fishing player's "generic.luck" attribute value. The attribute can be modified by either worn gear with the "AttributeModifiers" list or by giving the player the "Luck" potion effect.
The formula is:
weight + (quality * generic.luck)
The following will provide either stone or diamond at equal rates while the player does not have any Luck, but if the player has a Luck value of 2, the diamond will have its "weight" changed to 7.
The player's "generic.luck" attribute can optionally modify the number of total "rolls" a pool will perform. The number of bonus rolls is specified with the "bonus_rolls" integer/compound key. If compound, it defines a minimum and maximum range with the "min" and "max" integers.
The formula is:
rolls + (bonus_rolls * generic.luck)
As such, if the bonus roll is negative while luck is positive, the number of total rolls provided is decreased. For example, with 1 roll, -1 bonus rolls, and a luck value of 1, the result is 0 rolls from that pool:
1 + (-1 * 1) = 0
The following will always provide 2 stone (due to 2 initial rolls), and will also provide 1 extra stone for each point of "luck" the player has. If the player has 0 luck, they will be given 2 stone. If they have 1 luck, they will be given 3 stone.
It doesn't seem to be working...So have I set up the folders right? [WorldSave[folder]]->Data[folder]->loot_tables[folder]->loottable_custom[folder]->entities[folder]->custom_zombie.json[text document]
If so am I typing the command incorrectly? /summon Zombie ~ ~ ~ {DeathLootTable:"loottable_custom:entities/custom_zombie"}
If I typed the command correctly I exactly copy and pasted
It doesn't seem to be working...So have I set up the folders right? [WorldSave[folder]]->Data[folder]->loot_tables[folder]->loottable_custom[folder]->entities[folder]->custom_zombie.json[text document]
If so am I typing the command incorrectly? /summon Zombie ~ ~ ~ {DeathLootTable:"loottable_custom:entities/custom_zombie"}
If I typed the command correctly I exactly copy and pasted
If there's nothing I'm doing wrong why isn't it working? Please say!
All your inputs work for me. Make sure the world's resources are refreshed after making changes to the loot table (either in-game with F3 + T or exit and re-enter the world).
It's not working in (15w44b). If i replace this texts: "set_damage" and "damage" on to "set_data" and "data" it's not working too.
Dropped the white egg.
The "set_damage" function is a percentage of remaining durability (0.0 to 1.0) and can only be used with items that have durability; think of it as "set_durability" instead.
While "set_data" would normally be what you'd use to set the Damage value, spawn eggs in 1.9 no longer rely on the Damage value to determine the mob. Instead, the ID of the mob is stored inside the "EntityTag" tag (which also allows you to input other potential NBT data for the spawned mob). You'll need to use "set_nbt" for that instead:
Skyliner, do you have any information regarding the addition of loot tables for blocks? There was a tweet mentioning diamond ore dropping lapis, and I want to know if this being possible has been confirmed or not. It would be strange to have loot tables for chests and entities but not blocks.
Skyliner, do you have any information regarding the addition of loot tables for blocks? There was a tweet mentioning diamond ore dropping lapis, and I want to know if this being possible has been confirmed or not. It would be strange to have loot tables for chests and entities but not blocks.
Thank you :3
How do I find the loot table in a world save? I made a world in the latest snapshot and I don't see a "loot_table" folder in "data"
Edit: Ok I found out how to do everything but it says im missing a string...
[16:44:08] [Server thread/ERROR]: Couldn't load loot table minecraft:entities/zombie from C:\Users\Drew\AppData\Roaming\.minecraft\saves\Special___\data\loot_tables\minecraft\entities\zombie.json
com.google.gson.JsonSyntaxException: Missing type, expected to find a string
at od.h
The format has changed in 15w43c (the thread is not yet updated, keep running into ugly post formatting issues). The "items" list tag was renamed to "entries", which requires a "type" string tag with a value of: "item", "loot_table", or "empty". The "item" string tag was renamed to "name".
Example:
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/
Updated the thread to 15w43c, added more to Q&A, added a "Useful links" section. Let me know if I forgot to fix something, since the format did change a bit.
Yes, loot tables must be packaged with each world in order to work. The players themselves need nothing (and can't have anything) since it's server-side.
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/
15w44a brought two new functions: "set_attributes" and "enchant_randomly":
set_attributes
Applies attribute modifiers to the item via the "modifiers" list.
Each modifier will require:
1. An "attribute" string that states the attribute ("generic.maxHealth", "generic.armor", etc).
2. A "name" string that states the custom name of the attribute. Can be anything.
3. An "amount" double or compound, stating how much to modify the attribute. If compound, "min" and "max" doubles define the range.
4. An "operation" string, stating which operation to use. The accepted inputs are "addition", "multiply_base", and "multiply_total".
5. A "slot" string or list, stating which one of the specified slots the item can be used in. Note that if using it as a list, it will randomly selecting one of the specified slots. Accepted slots are: "mainhand", "offhand", "feet", "legs", "torso", "head".
Optional input:
1. An "id" string tag that specifies the UUID of the modifier.
The following will provide a diamond sword that will increase the "generic.maxHealth" attribute, choosing a value randomly between 3.5 and 6.0, using the "addition" operation. The slot it is applied to will either be "mainhand" or "offhand".
The following will apply a "generic.attackDamage" modifier of exactly 1.0 in specifically the "torso" slot. The UUID is 00000000-0000-0001-0000-000000000001.
enchant_randomly
Randomly applies a single enchantment from a list of enchantment IDs, specified with the optional "enchantments" list. If "enchantments" is not specified, the item will be enchanted randomly with a compatible enchantment for that item.
The following will apply a random enchantment and level of either Looting, Depth Strider, or Sharpness, along with a secondary enchantment that is compatible with the item.
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/
May I ask for a compressed version of one of these examples? I do not understand uncompressed files but I understand compressed ones.
Sure, here's the very first table in the thread:
Here's a function ("set_attributes"):
A condition ("random_chance_with_looting"):
And the very last:
You can use JSONLint to compress them as well (provided "?reformat=compress" is appended to the URL).
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/
As of 15w44b, all mentions of the "luck" and "luck_multiplier" keys are gone. Instead, a "quality" integer key has taken their place. This tag is specifically used with the new "Luck" enchantment/attribute to modify the chances ("weight") of the item being selected from the table.
It does work for mobs, chests, and fishing. The game currently only uses it for fishing. Please note that the "Looting" enchantment is unrelated to this.
Quality
Changes the "weight" of the entry based on the killing/opening/fishing player's "generic.luck" attribute value. The attribute can be modified by either worn gear with the "AttributeModifiers" list or by giving the player the "Luck" potion effect.
The formula is:
The following will provide either stone or diamond at equal rates while the player does not have any Luck, but if the player has a Luck value of 2, the diamond will have its "weight" changed to 7.
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/
Also added the "bonus_rolls" tag, which modifies the number of rolls based on luck (similar to "quality").
Bonus rolls
See also: quality
The player's "generic.luck" attribute can optionally modify the number of total "rolls" a pool will perform. The number of bonus rolls is specified with the "bonus_rolls" integer/compound key. If compound, it defines a minimum and maximum range with the "min" and "max" integers.
The formula is:
As such, if the bonus roll is negative while luck is positive, the number of total rolls provided is decreased. For example, with 1 roll, -1 bonus rolls, and a luck value of 1, the result is 0 rolls from that pool:
The following will always provide 2 stone (due to 2 initial rolls), and will also provide 1 extra stone for each point of "luck" the player has. If the player has 0 luck, they will be given 2 stone. If they have 1 luck, they will be given 3 stone.
The following will provide between 2-6 extra stone.
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/
Thank you very much.
It doesn't seem to be working...So have I set up the folders right? [WorldSave[folder]]->Data[folder]->loot_tables[folder]->loottable_custom[folder]->entities[folder]->custom_zombie.json[text document]
If so am I typing the command incorrectly? /summon Zombie ~ ~ ~ {DeathLootTable:"loottable_custom:entities/custom_zombie"}
If I typed the command correctly I exactly copy and pasted
{"pools": [{"rolls": 1,"entries":[{"type":"item","name":"minecraft:feather","weight":1,"functions":[{"function":"set_count","count":{"min":0,"max":2}}]}]}]}
If there's nothing I'm doing wrong why isn't it working? Please say!
All your inputs work for me. Make sure the world's resources are refreshed after making changes to the loot table (either in-game with F3 + T or exit and re-enter the world).
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/
It still sadly does not work...Any other possible solutions?
All I can say is to ensure the folder path is correct. The output log will also state what went wrong when loading the table.
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/
could you send a copy of your world folder or something? I think I could try to help you...because it works for me perfectly
Please help with the spawn egg (Zombie) drops.
It's not working in (15w44b). If i replace this texts: "set_damage" and "damage" on to "set_data" and "data" it's not working too.
Dropped the white egg.
The "set_damage" function is a percentage of remaining durability (0.0 to 1.0) and can only be used with items that have durability; think of it as "set_durability" instead.
While "set_data" would normally be what you'd use to set the Damage value, spawn eggs in 1.9 no longer rely on the Damage value to determine the mob. Instead, the ID of the mob is stored inside the "EntityTag" tag (which also allows you to input other potential NBT data for the spawned mob). You'll need to use "set_nbt" for that instead:
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/
Thanks so much!
Skyliner, do you have any information regarding the addition of loot tables for blocks? There was a tweet mentioning diamond ore dropping lapis, and I want to know if this being possible has been confirmed or not. It would be strange to have loot tables for chests and entities but not blocks.
Blocks will be possible in the future: https://twitter.com/Dinnerbone/status/656862743086125056
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/