353: Modifying sidebar look for an effect selector. [Minecraft Map Making]

Subscribers:
3,590
Published on ● Video Link: https://www.youtube.com/watch?v=0Q2pTk2oNk8



Minecraft
Game:
Minecraft (2011)
Duration: 18:34
436 views
17


Ep353: Making an item to switch between effects and creating a nicer looking sidebar score display to indicate which effect is currently selected.

00:00 Intro
01:30 Setup
02:40 Give item
04:10 Controller - switch
08:15 Setup score display
12:00 Controller - score display
16:05 Controller - effects

Version: 1.20.5

Suggested by: Hasan Topcu

GalSergey's Wiki Post:   / wiki_update_detect_a_specific_item_in_the  

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

Check out my collabs on Coppit's channel:    / coppitj  

Join the CoppitCraft server that I play on and the Discord where I hang out.
Server IP: 51.81.246.145:25588
Discord:   / discord  

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" and "less than" with the appropriate angled bracket.

Commands used:

Setup:
IUN: scoreboard objectives add used_coas used:carrot_on_a_stick
CUA: scoreboard objectives add current_option dummy
CUA: scoreboard objectives add option dummy {"text":"Options","color":"gold","bold":true}

Give:
IUN: give @p carrot_on_a_stick[custom_data={options:true}]

Setup score display:
IUN: scoreboard players set .option1 option 1
CUA: scoreboard players set .option2 option 2
CUA: scoreboard players set .option3 option 3
CUA: scoreboard players display numberformat .option1 option blank
CUA: scoreboard players display numberformat .option2 option blank
CUA: scoreboard players display numberformat .option3 option blank

Controller switch:
RUA: execute as @a[scores={used_coas=1}, nbt={SelectedItem:{components:{"minecraft:custom_data":{options:true}}}}] run scoreboard players remove @s current_option 1
CUA: execute as @a[scores={current_option=..0}] run scoreboard players set @s current_option 3
CUA: scoreboard players reset @a used_coas

Controller score display:
RUA: scoreboard players display name .option1 option {"text":"Jump Boost","color":"gray"}
CUA: scoreboard players display name .option2 option {"text":"Water Charm","color":"gray"}
CUA: scoreboard players display name .option3 option {"text":"Fire Charm","color":"gray"}
CUA: execute if score @p current_option matches 1 run scoreboard players display name .option1 option {"text":"Jump Boost","color":"green"}
CUA: execute if score @p current_option matches 2 run scoreboard players display name .option2 option {"text":"Water Charm","color":"green"}
CUA: execute if score @p current_option matches 3 run scoreboard players display name .option3 option {"text":"Fire Charm","color":"green"}

Controller effect:
RUA: execute as @a[scores={current_option=1}] run effect give @s jump_boost 1 0 true
CUA: execute as @a[scores={current_option=2}] run effect give @s water_breathing 1 0 true
CUA: execute as @a[scores={current_option=3}] run effect give @s fire_resistance 1 0 true




Other Videos By Infernal Device


2024-06-28363: Can the player see the sky at daytime? [Minecraft Map Making]
2024-06-27362: Table you can place and remove items from. [Minecraft Map Making]
2024-06-26361: Sword in a stone which can be pulled out. [Minecraft Map Making]
2024-06-25360: Interactive custom ceiling lights. [Minecraft Map Making]
2024-06-24359: Timed commands using a predicate. [Minecraft Map Making]
2024-06-23358: Mob death checking for Tower Defence. Updated. [Minecraft Map Making]
2024-06-22357: Rechargeable Gas mask with limited uses. [Minecraft Map Making]
2024-06-21356: Simple Locked door experiment. [Minecraft Map Making]
2024-06-20355: Lightable torches Updated. Added lifetime, light with arrows. [Minecraft Map Making]
2024-06-19354: Countdown timer with ticking sound. [Minecraft Map Making]
2024-06-18353: Modifying sidebar look for an effect selector. [Minecraft Map Making]
2024-06-17352: Floor crafting in 1.20.6. [Minecraft Map Making]
2024-06-16351: Checking mob deaths for a tower defence game. [Minecraft Map Making]
2024-06-15350: Is player following checkpoint path? Race lap counter. [Minecraft Map Making]
2024-06-14349: Did a player throw this item? Experiments. [Minecraft Map Making]
2024-06-13348: Torches that players can light and put out. [Minecraft Map Making]
2024-06-12347: Web Potion. Detecting where potions land. [Minecraft Map Making]
2024-06-11346: Infectious zombie plague. [Minecraft Map Making]
2024-06-10CoppitCraft Castle 050: Trees and a statue.
2024-06-10345: Code entry by copying held block to item display. [Minecraft Map Making]
2024-06-09344: Item frame that displays the first item in a chest. [Minecraft Map Making]



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.