Loot table set_count function does not function properly when combined with max_stack_size component on items that have lower stack limits
To reproduce:
1. Attempt to give yourself 64 stackable-to-64 saddles using the following loot table.
/loot give @s loot {"pools":[{"rolls":1,"entries":[{"type":"minecraft:item","name":"minecraft:saddle","functions":[{"function":"minecraft:set_count",count:64},{"function":"minecraft:set_components","components":{"minecraft:max_stack_size":64}}]}]}]}
See that you only get one saddle.
2. Attempt to give yourself 64 stackable-to-64 armor stands by using the following loot table:
/loot give @s loot {"pools":[{"rolls":1,"entries":[{"type":"minecraft:item","name":"minecraft:armor_stand","functions":[{"function":"minecraft:set_count",count:64},{"function":"minecraft:set_components","components":{"minecraft:max_stack_size":64}}]}]}]}
See that you only get only 16 armor stands.
set_count is capped by the default max_stack_size component of the item id, rather than properly obeying the max_stack_size component provided in the loot table.
2024-03-30, 01:19 AM
2024-03-30, 04:11 AM
2024-03-30, 04:11 AM
1
1
-