The nether isn't loaded if there is no player in it so the "in" statement won't work. You can run this command while in the nether to clear any saddles on netherrack:
/execute as @e[nbt={Item:{id:"minecraft:saddle"}}] at @s if block ~ ~-1 ~ minecraft:netherrack run kill @s
but I don't see the use in detecting if the items are in the nether when the command has to be run from within the nether to clear all saddles in it.
the use is: i got an flyingmount datapack, and the mount is not alowed in the nether.
if the flyingmoun is detected in the nether it would be killed, and the player get back its
crafting costs by custom loot_table but i dont want that the player can pick up the dropped saddle.
better way the mount dount drop the saddle.but i dont know how
Now that you explained all the details, I understand what you are trying to achieve. I don't know what this flymount is exactly but since it has a saddle, you can probably modify the Saddle property and set it to 0b to remove the saddle.
/execute as @e[tag=flymount,nbt={Dimension:-1}] run data merge entity @s {Saddle:0b}
/kill @e[tag=flymount,nbt={Dimension:-1}]
^ just run these in a command block chain (1 repeating command block and one chain command block attached to it)
Now that you explained all the details, I understand what you are trying to achieve. I don't know what this flymount is exactly but since it has a saddle, you can probably modify the Saddle property and set it to 0b to remove the saddle.
/execute as @e[tag=flymount,nbt={Dimension:-1}] run data merge entity @s {Saddle:0b}
/kill @e[tag=flymount,nbt={Dimension:-1}]
^ just run these in a command block chain (1 repeating command block and one chain command block attached to it)
want to kill saddle
tryed:/kill @e[nbt={item:{id:"minecraft:saddle"}}]
if i can kill em i would try kill saddle only in nether by if bllock or in nether option
The nether isn't loaded if there is no player in it so the "in" statement won't work. You can run this command while in the nether to clear any saddles on netherrack:
but I don't see the use in detecting if the items are in the nether when the command has to be run from within the nether to clear all saddles in it.
Command block engineer // Developer // #TeamTrees
the use is: i got an flyingmount datapack, and the mount is not alowed in the nether.
if the flyingmoun is detected in the nether it would be killed, and the player get back its
crafting costs by custom loot_table but i dont want that the player can pick up the dropped saddle.
better way the mount dount drop the saddle.but i dont know how
Now that you explained all the details, I understand what you are trying to achieve. I don't know what this flymount is exactly but since it has a saddle, you can probably modify the Saddle property and set it to 0b to remove the saddle.
^ just run these in a command block chain (1 repeating command block and one chain command block attached to it)
dimensions are:
0 - overworld
1 - the end
-1 - the nether
Command block engineer // Developer // #TeamTrees
thanks i try it.
****EDIT*************************************************************
nice work ! now the saddle disapears before the pig is killed ;-)*
***********************************************************************
Here you can see what i mean with "Flying Mount"