Mojo's Dice Roller
A datapack that lets you roll polyhedral dice in Minecraft, aimed at players of tabletop games
Mojo's Dice Roller
This is a datapack that lets you roll polyhedral dice in Minecraft, aimed at players of tabletop games.
Usage
To roll dice, a player needs a dice bag. You can obtain the dice bag by entering the command `/trigger dice_bag`.
To use the dice bag, place it in the hotbar, select it, and right click.
The following interface should pop up:

To add a die to the roll, press the d20 through d20 buttons. The number after the "d" indicates how many sides each die has.
To add a positive or negative modifier, press the Modifier -1 or Modifier -1 buttons.
The forumla being rolled will show be shown as follows:

To abandon the roll, click Roll or the ESC key. To roll the dice, click Roll.
Dice rolls will appear to the player who rolled them as follows:

Suppressing command output
The datapack uses `/trigger` commands to update the UI, and these send a message to the user in the chat each time these are used. To suppress these while using the datapack, you can use `/gamerule sendCommandFeedback false` to disable feedback from all commands - but be aware that this affects all players on the server.