Hi, I'm trying to modify the loot table for my personal server to give shulkers a 1/200 chance of dropping a shulker monster spawner. Can anyone help me out with this? I'm not entirely sure how to define the entity of the spawner.
For future reference, you can read all about loot tables here.
Minecraft holds all of their default loot tables (in JSON format) inside the version jar file (1.10 jar, 1.12.2 jar, etc.) under "/assets/minecraft/loot_tables", and the default shulker loot table (with shells) looks like this:
You can add extra "pools" to this table to make it drop more items. In your case we want to add a monster spawner with special nbt (you can do this with or without looting by changing the condition).
This will be a purple colored shulker spawner with the name "Shulker Spawner" not in italics. It also has a few other qualities unlike other spawners; for example, it only spawns one shulker at a time between 10-20 seconds. You can look up all of the different tags of spawners here and change what you like, just make sure that "SpawnData" and "SpawnPotentials" are both in the tag somewhere.
Once you have your entire code written the way you like inside the json file, save it as "shulker.json" anywhere you like (just not inside the jar file we talked about earlier). You need to then take the loot table and drop it into
"<YOUR_WORLD_FOLDER>/data/loot_tables/minecraft/entities" (the folders "minecraft" and "entities" don't normally exist, so you may have to create them). You can do this while your server is running and type "/reload" when you're done, or you can restart your server when you make the changes.
Hi, I'm trying to modify the loot table for my personal server to give shulkers a 1/200 chance of dropping a shulker monster spawner. Can anyone help me out with this? I'm not entirely sure how to define the entity of the spawner.
I don't know much about loot tables,
but you can copy some of this command.
idk if this helps...
Yeah, I already had that much. I couldn't figure out how to actually fit that into the loot table.
For future reference, you can read all about loot tables here.
Minecraft holds all of their default loot tables (in JSON format) inside the version jar file (1.10 jar, 1.12.2 jar, etc.) under "/assets/minecraft/loot_tables", and the default shulker loot table (with shells) looks like this:
You can add extra "pools" to this table to make it drop more items. In your case we want to add a monster spawner with special nbt (you can do this with or without looting by changing the condition).
The tag you specifically want to use is (everything inside the quotes, including the backslashes):
"{display:{Name:\"\u00A7rShulker Spawner\"},BlockEntityTag:{Delay:99s,SpawnCount:1s,MaxSpawnDelay:400s,SpawnRange:4s,MinSpawnDelay:200s,SpawnData:{id:\"shulker\",Color:10b},SpawnPotentials:[{Entity:{id:\"shulker\",Color:10},Weight:1}]}}"
This will be a purple colored shulker spawner with the name "Shulker Spawner" not in italics. It also has a few other qualities unlike other spawners; for example, it only spawns one shulker at a time between 10-20 seconds. You can look up all of the different tags of spawners here and change what you like, just make sure that "SpawnData" and "SpawnPotentials" are both in the tag somewhere.
Once you have your entire code written the way you like inside the json file, save it as "shulker.json" anywhere you like (just not inside the jar file we talked about earlier). You need to then take the loot table and drop it into
"<YOUR_WORLD_FOLDER>/data/loot_tables/minecraft/entities" (the folders "minecraft" and "entities" don't normally exist, so you may have to create them). You can do this while your server is running and type "/reload" when you're done, or you can restart your server when you make the changes.
Thanks a ton! That worked perfectly.
I strongly suggest you to use this website, it really helps a lot: Minecraft.tools