Skip to content

Custom (Textured) Heads

TM (Holly) edited this page Aug 9, 2020 · 2 revisions

As of currently, the main way to create custom heads in HeadsPlus is to use the customheads.yml file. It is also used as the configuration file to add new heads to /heads. You can also add custom heads using /addhead.

As the addhead command goes you through the steps to add heads already, this page only covers adding heads via the configuration file.

Contents:

Configuring customheads.yml

To start off adding a custom head, you need a unique identifier for it. Take for example a bush with purple flowers. Keep it simple, and add this as a line, if you want to the top of the heads section:

heads: bush_purple_flowers:

 wood_a:
 ...

This will be the base of the head. The main name ("bush_purple_flowers") will not be used in the plugin, or at least visibly. But if you want to use it easily in configuration such as in heads.yml, you'd want to give it a memorable name.

Price

Next to add is the price. In most options, you'll find that the option set for the price is "default". Default is the value set at the top of the config:

options:
  default-price: 10.0

In other words, if you set the price to default on an individual head, it will automatically set that price to 10.0:

heads:
  bush_purple_flowers:
    price: default

Although if you want the head to be free, you can just use the free option:

heads:
  bush_purple_flowers:
    price: free

Or just set the price to a double value, for example 20.0 if you want to be a bit pricey.

If you've specified a special price for a specific world, it will take the price from that instead. You can specify a price for a specific world using the following:

options:
  price-per-world:
    world: 15.0

So when a player tries to buy a head in "world", they will be charged $15 instead of $10.

Section

If you want the head to appear in the heads selector, you have to assign it to a section. Valid sections are listed at the bottom of the config, under heads:

sections:
  ...

For example, if we have the decoration section in sections and want to set bush_purple_flowers' section to that, we just add (ignore the price):

heads:
  bush_purple_flowers:
    price: default
    section: decoration

You can always add your own custom sections if there aren't enough. Make them in this format:

alphabet:
  display-name: '&8[&6Alphabet&8]'
  texture: HP#wood_a

"alphabet" is the section ID and is used in the "section" option for heads.

Database value

So if you want the head to show up in the selector, you can just set this option to true. Or if you just want it for configuration purposes, just set it to false. In this case we do want it in the selector, why else would we give it a section?

heads:
  bush_purple_flowers:
    price: default
    section: decoration
    database: true

Display name

So if you're using the head in the selector, then it needs a display name. Colour is all translated to its needed codes automatically, so if you use colour codes then they will work just fine.

For example, say we want '&8[&aBush with &5Purple Flowers&8]'. This keeps it attractive, but you can always set it to what you like. If you're happy, just add the option onto the bush_purple_flowers:

heads:
  bush_purple_flowers:
    price: default
    section: decoration
    database: true
    encode: false
    displayname: '&8[&aBush with &5Purple Flowers&8]'

The texture

Now that we have all of the basic data sorted, we want the actual texture. For the texture, we can go to several websites including freshcoal. The website we'll use here is minecraft-heads.com.

Do this in a number of steps:

  • Go to "Custom Heads"
  • Type in a term in the search bar, in this case "bush with purple flowers":

(Please excuse my MS Paint skills I know they're fab but I want to make this as easy as possible)

  • If your wanted results come up, click on the head you like and that matches the requirements you want.

  • Scroll down a bit to the "Other" header, where you have the base64 value ("Value") and the texture hash ("Minecraft-URL"). By default, HeadsPlus uses the hashes, but you can use the base64 value, hash, or the full URL as HeadsPlus can use the given information to decide how to load the head's texture. In this example, we'll use the base64 value.

Copy the base64 value, and paste it into the texture field:

heads:
  bush_purple_flowers:
    price: default
    section: decoration
    database: true
    encode: false
    displayname: '&8[&aBush with &5Purple Flowers&8]'
    texture: eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNGU3NTc1YmQyOTJlZTk4MDE4YzUyNjg0ZmJkMmYzMTg5YjI0ZTUyNDE2YjIwZTM4MDI1NGNhZmEzZDM5MCJ9fX0=

And that should do it! You have your own custom head! If your server's already running, use /hp reload to see if it comes up.

Use in other configuration files

If you want to use custom heads in heads.yml, then it's never been easier. Take for example you want parrots to drop parrot heads, take the head in question from customheads.yml:

heads:
  parrot:
    price: default
    ...

Take the "parrot" value under the "heads" section. Then, go to heads.yml and add this to the parrot name list:

parrot: name: - HP#parrot

The HP# prefix tells the plugin to take the value from customheads.yml. Now just use /hp reload and experience the magic!

This is also possible in the revised crafting.yml file as well:

parrot:
  head: HP#parrot
  ...