[Request] Allow WeightedItemStacks for the event onBlockHarvestDrops
Charnuz opened this issue ยท 1 comments
Issue Description:
The event onBlockHarvestDrops does not accept WeightedItemStacks in the event.drops list. Since there is no random function, you are unable to set the drop chance for individual drops.
What happens:
event.dropChance applies to all items being dropped, adding a WeightedItemStack to event.drops causes the script to throw an error.
What you expected to happen:
The item chance to be used when getting the item's drop chance, or event.dropChance to apply to the last item added to event.drops.
Script used:
https://pastebin.com/WiHsYSKX -> both items have a 50% chance of being dropped
https://pastebin.com/GE4YXjjx -> script throws error
crafttweaker.log file:
https://pastebin.com/5f02fzg1 -> the error thrown, just cant cast from weighted to normal
Affected Versions (Do not use "latest"):
- Minecraft: 1.12.2
- Forge: forge-14.23.4.2709
- Crafttweaker: 4.1.9
- Using a server: no
- If yes, does the client have the exact same scripts?
N/A
Your most recent log file where the issue was present:
same as log file