Did some digging around and didn't find much. I'd love to create a loot randomizer for bedrock, which takes all of the loot tables associated with blocks, chests, fishing, etc and scrambles the tables. This can be done manually in a datapack, but it's not dynamic - if the red carpet loot table is now assigned to acacia wood, it'll be assigned that forever, and there's no way to "reroll".
#Is it possible to change the contents of a loot table of a block or chest type via script?
1 messages · Page 1 of 1 (latest)
A randomizer i found on MCPEDL seems to just attempt to replace items as you acquire them, which feels pretty wonky and isn't quite the solution i was hoping for
you cannot change loot tables via scripts
you cannot change loot tables via scripts.
you can change loot tables by overriding them.
you can change (interfere) the loot tables via scripts by creating a custom loot table system that picks a random loot table and spawns the item on that exact block location. (Gamerule: block drops is false)
(In other words: You manually assign the loot table and spawn the content of that loot table into the world.)
Although the drops would once again get randomized once you /reload or leave the world, I think it'll easily be resolved if you somehow implement a "seed" for the randomization