Compatibility
Minecraft: Java Edition
1.21.5–1.21.11
Platforms
Tags
Creators
Details
Licensed ARR
Published 14 hours ago
Updated 7 hours ago
Random Roll
The datapack creates an animated text counter ("spinning cube"), which can be started either with a regular command or automatically by placing an object with a certain value in an item frame.
Usage
- Roll through the command:
/function randomroll:roll {max:50,objective:variable1} - Roll through the frame: hang an
item_frame, put an item with a component in itminecraft:custom_dataof the form{max:50,objective:variable1}— at the next tick The datapack will automatically remove the item and launch a roll with a maximum of 50 and a nearest player scoreboard. Example command to obtain such an item:/give @s apple[custom_data={max:50,objective:variable1}]
| Command Example | Frame Example |
|---|---|
Installation
- Copy the datapack to the
saves/<world>/datapacks/folder. - In the game, run
/reload(or enter the world again). - The functions are in the
randomrollnamespace — before reloading, the scoreboard target values will not be created, so/reloadis mandatory. after installation/update.
Requirements
- Minecraft 1.21.11 (macro functions
$(...)are used, components items likeminecraft:custom_data',random value' — available from 1.20.2+). - Players who need to receive official notifications about the results
of the roll must have the
admintag.
RU:
Датапак создаёт анимированный текстовый счётчик («крутящийся куб»), который можно запустить как обычной командой, так и автоматически — положив предмет с определённым значением в рамку (item frame).
Использование
- Ролл через команду:
/function randomroll:roll {max:50,objective:variable1} - Ролл через рамку: повесьте
item_frame, положите в неё предмет с компонентомminecraft:custom_dataвида{max:50,objective:variable1}— при следующем тике датапак сам снимет предмет и запустит ролл с максимумом 50 и scoreboard ближайшего игрока. Пример команды для получения такого предмета:/give @s apple[custom_data={max:50,objective:variable1}]
| Пример команды | Пример рамки |
|---|---|
Установка
- Скопируйте датапак в папку
saves/<мир>/datapacks/. - В игре выполните
/reload(или зайдите в мир заново). - Функции находятся в пространстве имён
randomroll— до перезагрузки значения scoreboard-целей не будут созданы, поэтому/reloadобязателен после установки/обновления.
Требования
- Minecraft 1.21.11 (используются функции-макросы
$(...), компоненты предметов видаminecraft:custom_data,random value— доступны с 1.20.2+). - Игроки, которые должны получать служебные уведомления о результатах
ролла, должны иметь тег
admin.


