- Sound effect
- Particle effect
- offHand tnt for visualization
This commit is contained in:
HeroChris 2023-11-01 16:01:25 +01:00
parent f8951522bb
commit 231e0d2486
6 changed files with 20 additions and 3 deletions

View File

@ -4,6 +4,7 @@ tellraw @s [{"text":"» ","color":"gray"},{"text":"Welcome ","color":"white"},{"
tellraw @a[tag=hc.initialized] [{"text":"» ","color":"gray"},{"text":"Everyone, give ","color":"white"},{"selector":"@s","color":"yellow"},{"text":" a warm welcome!","color":"white"}] tellraw @a[tag=hc.initialized] [{"text":"» ","color":"gray"},{"text":"Everyone, give ","color":"white"},{"selector":"@s","color":"yellow"},{"text":" a warm welcome!","color":"white"}]
execute at @s run playsound minecraft:entity.player.levelup master @s execute at @s run playsound minecraft:entity.player.levelup master @s
execute in herohost:world run tp @s 0 101 0 0 0 execute in herohost:world run tp @s 0 101 0 0 0
execute in herohost:world run spawnpoint 0 100 0 0 0
gamemode adventure @s[tag=!hc.debug] gamemode adventure @s[tag=!hc.debug]
# initialize player # initialize player

View File

@ -6,5 +6,8 @@ execute at @s run playsound minecraft:entity.player.levelup master @s
execute in herohost:world run tp @s 0 101 0 0 0 execute in herohost:world run tp @s 0 101 0 0 0
gamemode adventure @s[tag=!hc.debug] gamemode adventure @s[tag=!hc.debug]
# protection
clear @s
# reset player score # reset player score
scoreboard players reset @s +hc.disconnect scoreboard players reset @s +hc.disconnect

View File

@ -4,5 +4,10 @@
execute as @a[tag=!hc.initialized] run function herohost:core/initialize execute as @a[tag=!hc.initialized] run function herohost:core/initialize
execute as @a[scores={+hc.disconnect=1..}] run function herohost:core/reconnect execute as @a[scores={+hc.disconnect=1..}] run function herohost:core/reconnect
# protection
gamemode adventure @a[tag=!hc.debug,gamemode=!adventure]
execute as @a[nbt=!{Dimension:"herohost:world"},tag=!hc.debug] in herohost:world run tp @s 0 100 0 0 0
kill @e[type=item,nbt={Item:{tag:{clear:1b}}}]
# games # games
execute in herohost:world if entity @p[x=-125,y=50,z=-376,dx=250,dy=100,dz=250] run function herohost:tnt/core execute in herohost:world if entity @p[x=-125,y=50,z=-376,dx=250,dy=100,dz=250] run function herohost:tnt/core

View File

@ -1,7 +1,13 @@
# --- HeroGames - Copyright (c) HeroHost team (code provided by HeroChris). --- # --- HeroGames - Copyright (c) HeroHost team (code provided by HeroChris). ---
# give and remove tnt # give and remove tnt
item replace entity @a[tag=hc.get_tnt] armor.head with tnt{HideFlags:1,Enchantments:[{id:"minecraft:binding_curse",lvl:1s}]} 1 item replace entity @a[tag=hc.get_tnt] armor.head with tnt{HideFlags:1,Enchantments:[{id:"minecraft:binding_curse",lvl:1s}],AttributeModifiers:[{Slot:"head",AttributeName:"generic.movement_speed", Name:"generic.movement_speed", Amount:0.02, Operation:0, UUID:[I;1,1,1,1]}],display:{Name:'[{"text":"Hostile boom box","color":"#de3131","italic":false}]',Lore:['{"text":"Stop reading.. get rid of it!"}','{"text":""}','{"text":"+2% Speed","color":"dark_green","italic":false}']}} 1
item replace entity @a[tag=hc.give_tnt] armor.head with air 1 clear @a[tag=hc.give_tnt] minecraft:tnt
# tnt in offhand
execute as @a[nbt={Inventory:[{Slot:103b,id:"minecraft:tnt"}]}] if entity @s[nbt=!{Inventory:[{Slot:-106b,id:"minecraft:tnt"}]}] run clear @s minecraft:tnt{clear:1b}
execute as @a[nbt={Inventory:[{Slot:103b,id:"minecraft:tnt"}]}] if entity @s[nbt=!{Inventory:[{Slot:-106b,id:"minecraft:tnt"}]}] run item replace entity @s weapon.offhand with minecraft:tnt{clear:1b}
# remove get/give tag
tag @a remove hc.get_tnt tag @a remove hc.get_tnt
tag @a remove hc.give_tnt tag @a remove hc.give_tnt

View File

@ -1,4 +1,6 @@
# --- HeroGames - Copyright (c) HeroHost team (code provided by HeroChris). --- # --- HeroGames - Copyright (c) HeroHost team (code provided by HeroChris). ---
playsound minecraft:entity.firework_rocket.launch record @a ~ ~ ~ 1 1 1
particle minecraft:totem_of_undying ~ ~1 ~ 0 0 0 1 30 normal
advancement revoke @s only herohost:tnt/get_tnt advancement revoke @s only herohost:tnt/get_tnt
tag @s add hc.get_tnt tag @s add hc.get_tnt

View File

@ -1,4 +1,4 @@
# --- HeroGames - Copyright (c) HeroHost team (code provided by HeroChris). --- # --- HeroGames - Copyright (c) HeroHost team (code provided by HeroChris). ---
advancement revoke @s only herohost:tnt/give_tnt advancement revoke @s only herohost:tnt/give_tnt
tag @s add hc.give_tnt tag @s add hc.give_tnt