From c2cb26562c287329b55cb1e47264b70a9a8ed193 Mon Sep 17 00:00:00 2001 From: chrisbell Date: Fri, 31 Oct 2025 13:21:48 -0500 Subject: [PATCH] Init --- .../herobrine/function/check_visibility.mcfunction | 1 + data/herobrine/function/load.mcfunction | 9 +++++++++ .../herobrine/function/summon_herobrine.mcfunction | 14 ++++++++++++++ data/herobrine/function/teleport_away.mcfunction | 10 ++++++++++ data/herobrine/function/test.mcfunction | 1 + data/herobrine/function/tick.mcfunction | 12 ++++++++++++ data/herobrine/predicate/random_spawn.json | 4 ++++ data/minecraft/tags/function/load.json | 5 +++++ data/minecraft/tags/function/tick.json | 5 +++++ pack.mcmeta | 6 ++++++ 10 files changed, 67 insertions(+) create mode 100644 data/herobrine/function/check_visibility.mcfunction create mode 100644 data/herobrine/function/load.mcfunction create mode 100644 data/herobrine/function/summon_herobrine.mcfunction create mode 100644 data/herobrine/function/teleport_away.mcfunction create mode 100644 data/herobrine/function/test.mcfunction create mode 100644 data/herobrine/function/tick.mcfunction create mode 100644 data/herobrine/predicate/random_spawn.json create mode 100644 data/minecraft/tags/function/load.json create mode 100644 data/minecraft/tags/function/tick.json create mode 100644 pack.mcmeta diff --git a/data/herobrine/function/check_visibility.mcfunction b/data/herobrine/function/check_visibility.mcfunction new file mode 100644 index 0000000..29c1db2 --- /dev/null +++ b/data/herobrine/function/check_visibility.mcfunction @@ -0,0 +1 @@ +execute as @e[type=minecraft:mannequin,tag=herobrine_mannequin] run tp @s ~ ~ ~ facing entity @p[distance=..50] feet diff --git a/data/herobrine/function/load.mcfunction b/data/herobrine/function/load.mcfunction new file mode 100644 index 0000000..345253e --- /dev/null +++ b/data/herobrine/function/load.mcfunction @@ -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 diff --git a/data/herobrine/function/summon_herobrine.mcfunction b/data/herobrine/function/summon_herobrine.mcfunction new file mode 100644 index 0000000..db98846 --- /dev/null +++ b/data/herobrine/function/summon_herobrine.mcfunction @@ -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 diff --git a/data/herobrine/function/teleport_away.mcfunction b/data/herobrine/function/teleport_away.mcfunction new file mode 100644 index 0000000..6a48290 --- /dev/null +++ b/data/herobrine/function/teleport_away.mcfunction @@ -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 diff --git a/data/herobrine/function/test.mcfunction b/data/herobrine/function/test.mcfunction new file mode 100644 index 0000000..f6e4dda --- /dev/null +++ b/data/herobrine/function/test.mcfunction @@ -0,0 +1 @@ +say lol diff --git a/data/herobrine/function/tick.mcfunction b/data/herobrine/function/tick.mcfunction new file mode 100644 index 0000000..0e74686 --- /dev/null +++ b/data/herobrine/function/tick.mcfunction @@ -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 diff --git a/data/herobrine/predicate/random_spawn.json b/data/herobrine/predicate/random_spawn.json new file mode 100644 index 0000000..c5d1e53 --- /dev/null +++ b/data/herobrine/predicate/random_spawn.json @@ -0,0 +1,4 @@ +{ + "condition": "minecraft:random_chance", + "chance": 0.20 +} diff --git a/data/minecraft/tags/function/load.json b/data/minecraft/tags/function/load.json new file mode 100644 index 0000000..d3379f8 --- /dev/null +++ b/data/minecraft/tags/function/load.json @@ -0,0 +1,5 @@ +{ + "values": [ + "herobrine:load" + ] +} diff --git a/data/minecraft/tags/function/tick.json b/data/minecraft/tags/function/tick.json new file mode 100644 index 0000000..2dc62af --- /dev/null +++ b/data/minecraft/tags/function/tick.json @@ -0,0 +1,5 @@ +{ + "values": [ + "herobrine:tick" + ] +} diff --git a/pack.mcmeta b/pack.mcmeta new file mode 100644 index 0000000..a42166b --- /dev/null +++ b/pack.mcmeta @@ -0,0 +1,6 @@ +{ + "pack": { + "pack_format": 61, + "description": "He is watching..." + } +}