[SPIGOT-6366] error when executing "loot spawn ..." for shulker_box Created: 16/Feb/21  Updated: 07/Mar/22  Resolved: 07/Mar/22

Status: Resolved
Project: Spigot
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Yongda Fan Assignee: Doc
Resolution: Fixed Votes: 0
Labels: 1.16.4, DataPacks, bug, loottable

Attachments: File shulker_box.json    
Issue Links:
Relates
relates to SPIGOT-6959 Error in spawn for loot tables Resolved
Version: git-Spigot-a93cbb1-7a6c3c9 (MC: 1.16.4)
Guidelines Read: Yes

 Description   

I have put the following file into "data/minecraft/loot_tables/blocks" of a data pack, then execute the following command

loot spawn ~ ~ ~ mine ~ 0 ~ minecraft:wooden_pickaxe{loot_table_tool:1b}

where ~ 0 ~ has a shulker_box with some item in it.

 

The expected behavior (in vanilla) is to summon all items in shulker_box at the current location, but in the spigot, it only summons the item in the box with a smaller slot number, won't summon the item in the box with a larger slot number (the exact splitting number varies), and a message of "An unexpected error occurred trying to execute that command" is printed.

 

However, the command 

loot give @s mine ~ 0 ~ minecraft:wooden_pickaxe{loot_table_tool:1b}

work as expected.

 



 Comments   
Comment by Doc [ 07/Mar/22 ]

Fixed in https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/commits/64db51267aa3e611fb226c5d29d196ea670ebb33

Comment by Doc [ 06/Mar/22 ]

Maybe this caused by the empty itemstack issue.. if so then this PR can fix this https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/pull-requests/1024/overview

Generated at Fri Mar 14 15:03:44 UTC 2025 using Jira 10.3.3#10030003-sha1:d220e3fefc8dfc6d47f522d3b9a20c1455e12b7b.