SpyglassMC/Spyglass

Checking for "item cannot be both damageable and stackable"

Opened this issue · 0 comments

give @s diamond_sword[max_stack_size=5]
give @s apple[max_damage=10]
give @s saddle[max_stack_size=5,max_damage=10]

These commands are invalid, since "item cannot be both damageable and stackable."

Spyglass currently doesn't catch this. It could be possible to catch in a set_components function as well, e.g.:

loot give @s loot {pools:[{rolls:1,entries:[{type:"item",name:"diamond_sword",functions:[{function:"set_components",components:{max_stack_size:5}}]}]}]}

(although note that this particular command does give the item when used in-game, just without the component set)

Extension version: v4.0.0
Pack format: 48