Loot Table - Set Count Function doesn't return proper value #10461
Labels
status: accepted
Disputed bug is accepted as valid or Feature accepted as desired to be added.
type: bug
Something doesn't work as it was intended to.
upstream: bukkit
Issues exists in Bukkit and/or CraftBukkit.
upstream: spigot
Issues exists in Spigot.
version: 1.20.4
Game version 1.20.4
version: 1.20.5
Game version 1.20.5
Expected behavior
With this following code used for randomizing value between 1-3
{ "type": "minecraft:empty", "pools": [ { "rolls": { "min": 1, "max": 3 }, "entries": [ { "type": "minecraft:item", "name": "stone", "functions": [ { **"function": "minecraft:set_count", "count": 0** } ] } ] } ] }
When using "function": "minecraft:set_count", and count to 0 in , it should return a value of dropped item even the there is no actual item drop. In this case the value should be between 1-3
For paper: The value always returned 0
Observed/Actual behavior
The value generated by ths command always returned 0 while using Paper Server, but doesn't happen in Vanilla
Steps/models to reproduce
Use the following code in Datapack Loot Table
{ "type": "minecraft:empty", "pools": [ { "rolls": { "min": 1, "max": 3 }, "entries": [ { "type": "minecraft:item", "name": "stone", "functions": [ { "function": "minecraft:set_count", "count": 1 } ] } ] } ] }
Plugin and Datapack List
This is part of the code in the datapack where
execute store result score @s run loot spawn x y z loot will set a value returned from the loot command
Paper version
This server is running Paper version git-Paper-496 (MC: 1.20.4) (Implementing API version 1.20.4-R0.1-SNAPSHOT) (Git: 7ac24a1 on ver/1.20.4)
You are running the latest version
Previous version: git-Purpur-2176 (MC: 1.20.4)
Other
No response
The text was updated successfully, but these errors were encountered: