I Used commands to create an item with custom data on it such as a complicated lore tag and a Colored name, I used the item in a number of villager trades to act as currency, however, the items sometimes decide they don't stack with others of the same item, sometimes even functioning correctly momentarily until it glitches back and refuses to work. It is a serious problem and more than half the currency will refuse to work. Is there any way to fix this or any solution to this problem?
I Used commands to create an item with custom data on it such as a complicated lore tag and a Colored name, I used the item in a number of villager trades to act as currency, however, the items sometimes decide they don't stack with others of the same item, sometimes even functioning correctly momentarily until it glitches back and refuses to work. It is a serious problem and more than half the currency will refuse to work. Is there any way to fix this or any solution to this problem?
Minecraft only stacks item with the same data so you can't stack normal items with items with lore.
all of it has the same lore, it came from the same custom villager trade
hmm then they should be able to stack. Hold one stack in your hand and do /data get @s SelectedItem, do the same with the other stack and see if the data matches the first stack's data.
I think I found it but I don't understand why. it has just decided to reformat its self and throw in extra formatting text? I don't understand, why it would DO that? (btw the top one is the one I made the bottom one is the self-reformatted one)
I think I found it but I don't understand why. it has just decided to reformat its self and throw in extra formatting text? I don't understand, why it would DO that? (btw the top one is the one I made the bottom one is the self-reformatted one)
You also have an extra pair of [ in the first one. Could you show us the code you are using to generate these items?
summon minecraft:villager ~ ~1 ~ {Invulnerable:1b,CustomName:"{\"text\":\"Jeremy the Trader\"}",Attributes:[{Name:generic.movementSpeed,Base:0}],VillagerData:{level:2,profession:"minecraft:fletcher",type:"minecraft:plains"},Offers:{Recipes:[{maxUses:2147483647,xp:0,buy:{id:"minecraft:rotten_flesh",Count:8b},sell:{id:"minecraft:jungle_button",Count:1b,tag:{display:{Name:"{\"text\":\"Copper Coin\",\"color\":\"gold\",\"bold\":true}",Lore:["[{\"text\":\"Currency: \",\"color\":\"dark_purple\"},{\"text\":\"Worth a \",\"color\":\"white\"},{\"text\":\"Value\",\"color\":\"gold\"},{\"text\":\" of 1\",\"color\":\"white\"}]"]}}}},{maxUses:2147483647,xp:0,buy:{id:"minecraft:slime_ball",Count:2b},sell:{id:"minecraft:jungle_button",Count:1b,tag:{display:{Name:"{\"text\":\"Copper Coin\",\"color\":\"gold\",\"bold\":true}",Lore:["[{\"text\":\"Currency: \",\"color\":\"dark_purple\"},{\"text\":\"Worth a \",\"color\":\"white\"},{\"text\":\"Value\",\"color\":\"gold\"},{\"text\":\" of 1\",\"color\":\"white\"}]"]}}}},{maxUses:2147483647,xp:0,buy:{id:"minecraft:rotten_flesh",Count:64b},sell:{id:"minecraft:jungle_button",Count:10b,tag:{display:{Name:"{\"text\":\"Copper Coin\",\"color\":\"gold\",\"bold\":true}",Lore:["[{\"text\":\"Currency: \",\"color\":\"dark_purple\"},{\"text\":\"Worth a \",\"color\":\"white\"},{\"text\":\"Value\",\"color\":\"gold\"},{\"text\":\" of 1\",\"color\":\"white\"}]"]}}}},{maxUses:2147483647,xp:0,buy:{id:"minecraft:rotten_flesh",Count:10b},buyB:{id:"minecraft:jungle_button",Count:10b,tag:{display:{Name:"{\"text\":\"Copper Coin\",\"color\":\"gold\",\"bold\":true}",Lore:["[{\"text\":\"Currency: \",\"color\":\"dark_purple\"},{\"text\":\"Worth a \",\"color\":\"white\"},{\"text\":\"Value\",\"color\":\"gold\"},{\"text\":\" of 1\",\"color\":\"white\"}]"]}}},sell:{id:"minecraft:leather",Count:1b,tag:{display:{Name:"{\"text\":\"Rough Leather\"}",Lore:["{\"text\":\"Low Quality Leather\"}"]}}}}]}}
I tried your code and it seems to work and the items stack perfectly. Maybe you were using items generated with an older version of this command or something like that.
I Used commands to create an item with custom data on it such as a complicated lore tag and a Colored name, I used the item in a number of villager trades to act as currency, however, the items sometimes decide they don't stack with others of the same item, sometimes even functioning correctly momentarily until it glitches back and refuses to work. It is a serious problem and more than half the currency will refuse to work. Is there any way to fix this or any solution to this problem?
Minecraft only stacks item with the same data so you can't stack normal items with items with lore.
Command block engineer // Developer // #TeamTrees
all of it has the same lore, it came from the same custom villager trade
hmm then they should be able to stack. Hold one stack in your hand and do /data get @s SelectedItem, do the same with the other stack and see if the data matches the first stack's data.
Command block engineer // Developer // #TeamTrees
I think I found it but I don't understand why. it has just decided to reformat its self and throw in extra formatting text? I don't understand, why it would DO that? (btw the top one is the one I made the bottom one is the self-reformatted one)
You also have an extra pair of [ in the first one. Could you show us the code you are using to generate these items?
Command block engineer // Developer // #TeamTrees
summon minecraft:villager ~ ~1 ~ {Invulnerable:1b,CustomName:"{\"text\":\"Jeremy the Trader\"}",Attributes:[{Name:generic.movementSpeed,Base:0}],VillagerData:{level:2,profession:"minecraft:fletcher",type:"minecraft:plains"},Offers:{Recipes:[{maxUses:2147483647,xp:0,buy:{id:"minecraft:rotten_flesh",Count:8b},sell:{id:"minecraft:jungle_button",Count:1b,tag:{display:{Name:"{\"text\":\"Copper Coin\",\"color\":\"gold\",\"bold\":true}",Lore:["[{\"text\":\"Currency: \",\"color\":\"dark_purple\"},{\"text\":\"Worth a \",\"color\":\"white\"},{\"text\":\"Value\",\"color\":\"gold\"},{\"text\":\" of 1\",\"color\":\"white\"}]"]}}}},{maxUses:2147483647,xp:0,buy:{id:"minecraft:slime_ball",Count:2b},sell:{id:"minecraft:jungle_button",Count:1b,tag:{display:{Name:"{\"text\":\"Copper Coin\",\"color\":\"gold\",\"bold\":true}",Lore:["[{\"text\":\"Currency: \",\"color\":\"dark_purple\"},{\"text\":\"Worth a \",\"color\":\"white\"},{\"text\":\"Value\",\"color\":\"gold\"},{\"text\":\" of 1\",\"color\":\"white\"}]"]}}}},{maxUses:2147483647,xp:0,buy:{id:"minecraft:rotten_flesh",Count:64b},sell:{id:"minecraft:jungle_button",Count:10b,tag:{display:{Name:"{\"text\":\"Copper Coin\",\"color\":\"gold\",\"bold\":true}",Lore:["[{\"text\":\"Currency: \",\"color\":\"dark_purple\"},{\"text\":\"Worth a \",\"color\":\"white\"},{\"text\":\"Value\",\"color\":\"gold\"},{\"text\":\" of 1\",\"color\":\"white\"}]"]}}}},{maxUses:2147483647,xp:0,buy:{id:"minecraft:rotten_flesh",Count:10b},buyB:{id:"minecraft:jungle_button",Count:10b,tag:{display:{Name:"{\"text\":\"Copper Coin\",\"color\":\"gold\",\"bold\":true}",Lore:["[{\"text\":\"Currency: \",\"color\":\"dark_purple\"},{\"text\":\"Worth a \",\"color\":\"white\"},{\"text\":\"Value\",\"color\":\"gold\"},{\"text\":\" of 1\",\"color\":\"white\"}]"]}}},sell:{id:"minecraft:leather",Count:1b,tag:{display:{Name:"{\"text\":\"Rough Leather\"}",Lore:["{\"text\":\"Low Quality Leather\"}"]}}}}]}}
I tried your code and it seems to work and the items stack perfectly. Maybe you were using items generated with an older version of this command or something like that.
Command block engineer // Developer // #TeamTrees