257: Usable number keypad in chat. [Minecraft Map Making]

Subscribers:
3,590
Published on ● Video Link: https://www.youtube.com/watch?v=7SCaK-VL3Zs



Minecraft
Game:
Minecraft (2011)
Duration: 39:11
245 views
14


Ep257: Displaying a number keypad in chat that allows players to enter a code, which can be easily changed.

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 CoppitCraft server that 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.

Since angled brackets are not allowed in YouTube descriptions you will have to replace "greater than" with the appropriate angled bracket. Ascii code: 62

Commands used:

Setup:
IUN: scoreboard objectives add counter dummy

Display the Keypad:
IUN: tellraw @a [{"text":"Info: ","color":"gray"},{"text":"Enter the code. R = Reset:","color":"green"}]
CUA: tellraw @a [{"text":"1 ","color":"gold","bold":true,"clickEvent":{"action":"run_command","value":"/setblock -6 56 341 redstone_block replace"}},{"text":"2 ","color":"gold","bold":true,"clickEvent":{"action":"run_command","value":"/setblock -4 56 341 redstone_block replace"}},{"text":"3","color":"gold","bold":true,"clickEvent":{"action":"run_command","value":"/setblock -2 56 341 redstone_block replace"}}]
CUA: tellraw @a [{"text":"4 ","color":"gold","bold":true,"clickEvent":{"action":"run_command","value":"/setblock 0 56 341 redstone_block replace"}},{"text":"5 ","color":"gold","bold":true,"clickEvent":{"action":"run_command","value":"/setblock 2 56 341 redstone_block replace"}},{"text":"6","color":"gold","bold":true,"clickEvent":{"action":"run_command","value":"/setblock 4 56 341 redstone_block replace"}}]
CUA: tellraw @a [{"text":"7 ","color":"gold","bold":true,"clickEvent":{"action":"run_command","value":"/setblock 6 56 341 redstone_block replace"}},{"text":"8 ","color":"gold","bold":true,"clickEvent":{"action":"run_command","value":"/setblock 8 56 341 redstone_block replace"}},{"text":"9","color":"gold","bold":true,"clickEvent":{"action":"run_command","value":"/setblock 10 56 341 redstone_block replace"}}]
CUA: tellraw @a [{"text":"0 ","color":"gold","bold":true,"clickEvent":{"action":"run_command","value":"/setblock -8 56 341 redstone_block replace"}},{"text":"-"}, {"text":" R","color":"gold","bold":true,"clickEvent":{"action":"run_command","value":"/setblock -10 56 341 redstone_block replace"}}]

Enter 0:
IUN: data modify storage keypad:code input append value 0
CUA: setblock 12 56 341 redstone_block replace

Common commands:
IUN: execute positioned -12 57 341 if entity @a[distance=5..] run scoreboard players set #Code counter 0
CCA: data remove storage keypad:code input
CUA: execute positioned -12 57 341 if entity @a[distance=0..5] run scoreboard players add #Code counter 1
CCA: playsound block.note_block.bit master @a -12 57 341 1 2 0
CCA: execute if score #Code counter matches 4 run setblock 14 56 341 redstone_block replace

Reset:
IUN: scoreboard players set #Code counter 0
CUA: data remove storage keypad:code input
CUA: execute positioned -12 57 341 if entity @a[distance=0..5] run playsound block.note_block.bit master @a -12 57 341 1 0.1 0

Check Code:
IUN: execute store success score #CodeWrong counter run data modify storage keypad:code input set value [8,4,7,3]
CUA: scoreboard players reset #Code counter
CUA: data remove storage keypad:code input
CUA: execute if score #CodeWrong counter matches 1 run say Wrong!
CUA: execute if score #CodeWrong counter matches 0 run say Correct!







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 181,722 views spread across 860 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.