1

Taking apart my Herobrine datapack :)

ShelLuser's Avatar ShelLuser9/1/18 12:37 am
1 emeralds 287
Hi gang!

This post was sponsored by ShelLuser's herobrine datapack; bringing the 'real' Herobrine into your world! :)

I shared the datapack on a few fora, PMC now being one of those of course, and I also got a bit of feedback which I think is awesome. Thing is: I shared the pack because I thought it was a fun project so I figured I'd also share a bit of background and answer several questions at once :)

Origin

The idea started right here on PMC itself. 7 months ago (time of writing) I posted a blog about the bossbar feature in 1.13 and several people really enjoyed that. It basically explains the /bossbar command. However, at first I only described how my friend Aya and me used the whole thing in a PVP setup and some people on Discord commented how that wasn't really related to a "Boss". So....

I was messing about with the (then) new minecraft:player_head object and figured I'd try Herobrine. And what do you know? Not only did the player exist, his head (obviously) also matched the whole Herobrine idea. And that got me thinking...

See for yourself: /give @p player_head{SkullOwner:"herobrine"}

At that time I was also testing the /data command and applied this on the nearest zombie. Studying its properties I suddenly had an idea :)

Now, the thing is: I actually wrote a few fantasy stories which somewhat involved Herobrine in the past so I basically grabbed some of that and used that in my "Forbidden" book :)

How does it work?

How indeed? ;)

Herobrine datapack diagram

Basically the datapack consists of several functions, as can be seen above, but it all boils down to this:
  • At the start of the datapack the player is given a book & 20 obsidian blocks.
  • The pack constantly checks if Herobrine has been summoned, if so then its current health status gets sent to the now active bossbar.
  • Previously mentioned bossbar gets activated for all players within a 50 block radius.
  • The pack also constantly checks if Herobrine is gone (defeated); if so the bossbar gets removed.
And then there are 2 events which can be triggered by the book itself: summoning Herobrine or resetting the whole lot. Summoning Herobrine should be obvious enough: it checks if the player is in the Nether and if so Herobrine is summoned. If not you get a warning message about this.

Resetting the game is more fun: when activated it will check if you summoned Herobrine already. If not and if the function has never been run before then you get a warning ("complaint") :) But if you ran it for the second time (or of Herobrine has been previously summoned) then the whole thing cleans up after itself. Herobrine gets killed, advancements get removed, and even optional tags and scoreboard objectives get removed as well. Fully cleaned up indeed :)

The two included custom advancements basically operate on their own. The root advancement ensures that a new tab is added and the advancement after that... well, gets triggered automatically as well (as soon as you kill Herobrine).

And that is my project explained in a nutshell, hope you enjoyed.

Poll ended 09/15/2018 12:37 am.

Posted by ShelLuser's Avatar
ShelLuser
Level 57 : Grandmaster Engineer
89

Create an account or sign in to comment.

Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome