2
How to make ender dragons drop a written book?
hii
ive been trying for a while now and i just cant figure out how to make this work. every resource i find is outdated or not working </3
im trying to make a datapack for a 1.21.1 java purpur server that edits the loot table of the ender dragon so that it drops a custom written book.
i dont know what im doing wrong but this is the loot table im working with. i want it to drop every time an ender dragon is killed.
ive been trying various folder orders/directory names and nothing has been working so im thinking its something wrong with the loot table?
if anyone could help that would be greatly appreciated <3
tyyy
ive been trying for a while now and i just cant figure out how to make this work. every resource i find is outdated or not working </3
im trying to make a datapack for a 1.21.1 java purpur server that edits the loot table of the ender dragon so that it drops a custom written book.
i dont know what im doing wrong but this is the loot table im working with. i want it to drop every time an ender dragon is killed.
loot table (ender_dragon.json)
{
"type": "minecraft:entity",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "minecraft:written_book",
"functions": [
{
"function": "minecraft:set_nbt",
"tag": "[written_book_content={pages:['[["Dear ",{"text":"Player","color":"#8f39f9"},",\\n\\n Congratulations on defeating the ",{"text":"Ender Dragon","color":"#6a1db3"},". You are now the chosen one to protect ",{"text":"the Egg","color":"#6163f1"},". Find it and protect it. Good luck.\\n\\n-",{"text":"X","color":"#8f39f9"}]]','[["",{"text":"Rules","underlined":true,"bold":true},"\\n❥You may keep ",{"text":"the Egg","color":"#6163f1"}," as a player, or as a team.\\n❥",{"text":"The Egg","color":"#6163f1"}," must be placed in the world. It cannot be locked behind an ender chest, or any storage of any kind. It must be placed before you log out. It can only be in your inventory while traveling."]]','[["❥",{"text":"The Egg","color":"#6163f1"}," must be able to be located. It should not be thousands of blocks away. Its spot must be simplistic. It can be hidden behind riddles or puzzles. It should not take too long for another player or team to access ",{"text":"the Egg","color":"#6163f1"},"."]]','[["❥Decoy vaults or locations are allowed. You are not allowed to change the location once a player or team has started the hunt. You can only change the location once you kill the ",{"text":"Ender Dragon","color":"#6a1db3"}," again."]]','[["❥Have fun and be creative. The way you protect it is up to you, you can make vaults, puzzle rooms, or simply use it as a decoration."]]','[["❥Traps should not make the player suffer an extreme amount. No instant kick machines, pits into the void,\\ninescapable traps, etc.You should not make players lose their items."]]','[["❥You may not guard ",{"text":"the Egg","color":"#6163f1"}," directly. No camping.You cannot attack ",{"text":"the Egg","color":"#6163f1"}," thief.\\n❥You must complete the puzzle room/vault fairly. No teleporting.You must leave the vault or base before teleporting to ",{"text":"Spawn","color":"#49ceff"},"."]]','[["❥Announce you have ",{"text":"the Egg","color":"#6163f1"}," and who you stole it from.The protectors do not have to be online when you steal ",{"text":"the Egg","color":"#6163f1"},".Make sure to update the signs in ",{"text":"the Shrine","color":"#22c79b"}," at ",{"text":"Spawn","color":"#49ceff"},".\\n\\nThank you to ",{"text":"SirPence","color":"#8f39f9"}," for the idea and rules <3"]]'],title:"About the Egg...",author:X,generation:3}]"
}
}
]
}
]
}
"type": "minecraft:entity",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "minecraft:written_book",
"functions": [
{
"function": "minecraft:set_nbt",
"tag": "[written_book_content={pages:['[["Dear ",{"text":"Player","color":"#8f39f9"},",\\n\\n Congratulations on defeating the ",{"text":"Ender Dragon","color":"#6a1db3"},". You are now the chosen one to protect ",{"text":"the Egg","color":"#6163f1"},". Find it and protect it. Good luck.\\n\\n-",{"text":"X","color":"#8f39f9"}]]','[["",{"text":"Rules","underlined":true,"bold":true},"\\n❥You may keep ",{"text":"the Egg","color":"#6163f1"}," as a player, or as a team.\\n❥",{"text":"The Egg","color":"#6163f1"}," must be placed in the world. It cannot be locked behind an ender chest, or any storage of any kind. It must be placed before you log out. It can only be in your inventory while traveling."]]','[["❥",{"text":"The Egg","color":"#6163f1"}," must be able to be located. It should not be thousands of blocks away. Its spot must be simplistic. It can be hidden behind riddles or puzzles. It should not take too long for another player or team to access ",{"text":"the Egg","color":"#6163f1"},"."]]','[["❥Decoy vaults or locations are allowed. You are not allowed to change the location once a player or team has started the hunt. You can only change the location once you kill the ",{"text":"Ender Dragon","color":"#6a1db3"}," again."]]','[["❥Have fun and be creative. The way you protect it is up to you, you can make vaults, puzzle rooms, or simply use it as a decoration."]]','[["❥Traps should not make the player suffer an extreme amount. No instant kick machines, pits into the void,\\ninescapable traps, etc.You should not make players lose their items."]]','[["❥You may not guard ",{"text":"the Egg","color":"#6163f1"}," directly. No camping.You cannot attack ",{"text":"the Egg","color":"#6163f1"}," thief.\\n❥You must complete the puzzle room/vault fairly. No teleporting.You must leave the vault or base before teleporting to ",{"text":"Spawn","color":"#49ceff"},"."]]','[["❥Announce you have ",{"text":"the Egg","color":"#6163f1"}," and who you stole it from.The protectors do not have to be online when you steal ",{"text":"the Egg","color":"#6163f1"},".Make sure to update the signs in ",{"text":"the Shrine","color":"#22c79b"}," at ",{"text":"Spawn","color":"#49ceff"},".\\n\\nThank you to ",{"text":"SirPence","color":"#8f39f9"}," for the idea and rules <3"]]'],title:"About the Egg...",author:X,generation:3}]"
}
}
]
}
]
}
ive been trying various folder orders/directory names and nothing has been working so im thinking its something wrong with the loot table?
if anyone could help that would be greatly appreciated <3
tyyy
Create an account or sign in to comment.