156: Generate random number. [Minecraft Map Making]

Subscribers:
3,900
Published on ● Video Link: https://www.youtube.com/watch?v=MY0TpXNBFHk



Minecraft
Game:
Minecraft (2011)
Duration: 7:56
321 views
23


Ep156: Generating a random number in a range and saving it into a scoreboard objective.

More information: https://www.reddit.com/r/MinecraftCommands/wiki/questions/randomnumber

Java Version: 1.19

Commands, builds and ideas for people making their own Minecraft maps.

Check out my collabs on Coppit's channel: https://www.youtube.com/c/CoppitJ

Join the server I play on and the Discord where I hang out.
Server IP: 51.81.246.145:25588
Discord: https://discord.gg/amU84KykEu

The following commands are prefixed with three letters which represent the settings of the command block. E.g IUN: = Impulse Unconditional Needs_Redstone. These prefixes need to be removed if copying the commands.

Commands used:

Setup:
IUN: scoreboard objectives add randomNumber dummy
CUA: scoreboard objectives add range dummy

Generate number:
RUA: summon area_effect_cloud ~ ~ ~ {Tags:["randomEntity"]}
CUA: execute store result score @p randomNumber run data get entity @e[type=area_effect_cloud,tag=randomEntity,limit=1] UUID[0] 1
CUA: scoreboard players operation @p randomNumber %= #rangeConst range
CUA: kill @e[type=area_effect_cloud,tag=randomEntity]

Set range:
IUN: scoreboard players set #rangeConst range 100







Tags:
minecraft
adventure map
map making
commands
command blocks
1.18
custom commands
redstone
map ideas
map suggesstions
custom maps
1.19



Other Statistics

Minecraft Statistics For Infernal Device

At present, Infernal Device has 182,428 views spread across 865 videos for Minecraft, accounting for over 10 days of watchable video on his channel. This is 94.82% of the total watchable video for Minecraft on Infernal Device's YouTube channel.