Init
This commit is contained in:
commit
c2cb26562c
1
data/herobrine/function/check_visibility.mcfunction
Normal file
1
data/herobrine/function/check_visibility.mcfunction
Normal file
@ -0,0 +1 @@
|
|||||||
|
execute as @e[type=minecraft:mannequin,tag=herobrine_mannequin] run tp @s ~ ~ ~ facing entity @p[distance=..50] feet
|
||||||
9
data/herobrine/function/load.mcfunction
Normal file
9
data/herobrine/function/load.mcfunction
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
# Initialize scoreboard (Recommended Change)
|
||||||
|
scoreboard objectives add herobrine_cooldown dummy
|
||||||
|
scoreboard objectives add herobrine_timer dummy
|
||||||
|
scoreboard objectives add herobrine_active dummy
|
||||||
|
|
||||||
|
# Set initial values
|
||||||
|
scoreboard players set #timer herobrine_timer 0
|
||||||
|
scoreboard players set #active herobrine_active 0
|
||||||
|
scoreboard players set #cooldown herobrine_cooldown 0
|
||||||
14
data/herobrine/function/summon_herobrine.mcfunction
Normal file
14
data/herobrine/function/summon_herobrine.mcfunction
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# Select a random player and tag them
|
||||||
|
execute as @a[limit=1,sort=random] run tag @s add herobrine_target
|
||||||
|
|
||||||
|
# Summon Herobrine mannequin 40 blocks away, level with the player, with gravity enabled (NoGravity:0b)
|
||||||
|
execute as @a[tag=herobrine_target] at @s rotated as @s rotated ~ 0 run summon minecraft:mannequin ^ ^2 ^40 {Tags:["herobrine_mannequin"],NoGravity:0b,profile:{properties:[{name:"textures",value:"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvOThiN2NhM2M3ZDMxNGE2MWFiZWQ4ZmMxOGQ3OTdmYzMwYjZlZmM4NDQ1NDI1YzRlMjUwOTk3ZTUyZTZjYiJ9fX0="}]}}
|
||||||
|
|
||||||
|
execute as @e[type=minecraft:mannequin,tag=herobrine_mannequin] run tp @s ~ ~ ~ facing entity @a[tag=herobrine_target,limit=1] feet
|
||||||
|
|
||||||
|
# Mark as active
|
||||||
|
scoreboard players set #active herobrine_active 1
|
||||||
|
scoreboard players set #timer herobrine_timer 0
|
||||||
|
|
||||||
|
# Remove target tag
|
||||||
|
tag @a[tag=herobrine_target] remove herobrine_target
|
||||||
10
data/herobrine/function/teleport_away.mcfunction
Normal file
10
data/herobrine/function/teleport_away.mcfunction
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
# Teleport to holding cell
|
||||||
|
tp @e[type=minecraft:mannequin,tag=herobrine_mannequin] 0 -64 0
|
||||||
|
|
||||||
|
# Kill the mannequin after teleporting
|
||||||
|
kill @e[type=minecraft:mannequin,tag=herobrine_mannequin]
|
||||||
|
|
||||||
|
# Reset timers (Using corrected objective names)
|
||||||
|
scoreboard players set #active herobrine_active 0
|
||||||
|
scoreboard players set #timer herobrine_timer 0
|
||||||
|
scoreboard players set #cooldown herobrine_cooldown 0
|
||||||
1
data/herobrine/function/test.mcfunction
Normal file
1
data/herobrine/function/test.mcfunction
Normal file
@ -0,0 +1 @@
|
|||||||
|
say lol
|
||||||
12
data/herobrine/function/tick.mcfunction
Normal file
12
data/herobrine/function/tick.mcfunction
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
# Increment timer
|
||||||
|
scoreboard players add #timer herobrine_timer 1
|
||||||
|
scoreboard players add #cooldown herobrine_cooldown 1
|
||||||
|
|
||||||
|
# Random spawn check
|
||||||
|
execute if score #cooldown herobrine_cooldown matches 200.. if score #active herobrine_active matches 0 if predicate herobrine:random_spawn run function herobrine:summon_herobrine
|
||||||
|
|
||||||
|
# Check if herobrine exists and handle visibility duration
|
||||||
|
execute if score #active herobrine_active matches 1 run function herobrine:check_visibility
|
||||||
|
|
||||||
|
# Teleport away
|
||||||
|
execute if score #active herobrine_active matches 1 if score #timer herobrine_timer matches 200.. run function herobrine:teleport_away
|
||||||
4
data/herobrine/predicate/random_spawn.json
Normal file
4
data/herobrine/predicate/random_spawn.json
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"condition": "minecraft:random_chance",
|
||||||
|
"chance": 0.20
|
||||||
|
}
|
||||||
5
data/minecraft/tags/function/load.json
Normal file
5
data/minecraft/tags/function/load.json
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"values": [
|
||||||
|
"herobrine:load"
|
||||||
|
]
|
||||||
|
}
|
||||||
5
data/minecraft/tags/function/tick.json
Normal file
5
data/minecraft/tags/function/tick.json
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"values": [
|
||||||
|
"herobrine:tick"
|
||||||
|
]
|
||||||
|
}
|
||||||
6
pack.mcmeta
Normal file
6
pack.mcmeta
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"pack": {
|
||||||
|
"pack_format": 61,
|
||||||
|
"description": "He is watching..."
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user