Arqade Asked on September 24, 2020
I have an item in a datapack which has a supplemental function to give it straight to the player (for testing), and an entry in a loot table (which is how survival players get it). I recently noticed that these two items will not stack, under any circumstances, even though they should have the exact same nbt data. The /give
command looks like this:
give @s minecraft:quartz{dmd_dark_quartz:1b,CustomModelData:256,display:{Name:"{"text":"Dark Quartz","color":"dark_purple","italic":"false"}"}} 1
While the loot table looks like this:
{
"type": "minecraft:item",
"conditions": [
{
"condition": "random_chance",
"chance": 0.75
}
],
"functions": [
{
"function": "set_name",
"name": {"text":"Dark Quartz","color":"dark_purple","italic":"false"}
},
{
"function": "set_nbt",
"tag": "{dmd_dark_quartz:1b,CustomModelData:256}"
},
{
"function": "minecraft:explosion_decay"
}
],
"name": "minecraft:quartz"
}
When I hold the two items in my hand and use /data get entity @s SelectedItem
, the only difference is that there are no quotes surrounding the false value for italics in the loot table version. Here’s a picture for further clarification of what I mean:
I underlined the false
values that were different. Does anyone know if this is a bug or what causes this? I think it’s probably a bug because all other values ("dark_purple"
, for example) have the quotes, but that singular one doesn’t. Is it because it is a true/false value and doesn’t need quotes? I would prefer if they stacked because then testing would be easier and I wouldn’t have to test both versions for everything, but not including quotes in the /give
command seems a bit sacrilegious.
Upon further testing, not including the quotes in the /give
command gives an item that has the exact same nbt (so the /data get
looks exactly the same) as the loot table version but still doesn’t stack with either one.
Any answers on why this is happening?
false
is not supposed to be in quotes.
Answered by twarped on September 24, 2020
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP