Hey Guys,
I want to summon a mob with the following Death Loot table:
{"pools":[{"rolls":1,"entries":[{"type":"item","weight":1,"name":"minecraft:stone","functions":[{"function":"set_nbt","tag":"{Tags:[\"1\"]}"}]}]}]}
I want that it drops a stone Item which has a definite Tag.
This doesnt work.
Help is appreciated.
Comments 10
It is about the loot table.
COmmand:
/summon Pig ~ ~ ~ {DeathLootTable:"Random:Random"}
"Random" is the loot table.
This works IT is about the loot table not working
Look at the entity NBT with :
/entitydata @e[r=2] {}
You will see that the value of the DeathLootTable tag is "random:Random". The folder where you place your loot table must be called "random" and not "Random"
Stop saying something about the spawning INGAME as I said THE PROBLEM IS THE LOOTING TABLE. Ok? Everyone got it now? With other loottables in the same file it is working correct. My question is: Why is it not dropping an Item with a tag. I'm sorry but please stop posting these unhelpful posts.
Cannot reproduce then, the provided loot table is working fine for me, here is the NBT tag of the dropped stone, placed in a chest :
[22:23:12] [Client thread/INFO]: [CHAT] The data tag did not change: {x:-4,y:4,z:4,Items:[0:{Slot:0b,id:"minecraft:stone",Count:1b,tag:{Tags:[0:"1"]},Damage:0s}],id:"Chest",Lock:""}
Do you have any messages in the launcher console when you kill the Pig?
Finally found find the Duplicate : MC-92033
So my Problem is that i want to add a 1.9 Tag label to it. Or rather i want that it spawns with it after killing the pig. So when i check /testfor @e[tag=1] it shows me nothing that is my prob. Don't take chests in here it is about mobs because they "summon" an entity after deaths and chests are not when using a loottable.
You are confusing items and entity items. Loot table functions only apply to the item, and never to the dropped entity.If you want to detect the dropped item, use :
/testfor @e[type=Item] {Item:{tag:{Tags:["1"]}}}
Finally found the Duplicate : MC-92033
Please provide the exact command you used.