-
Notifications
You must be signed in to change notification settings - Fork 0
The Basics
DecorHeads supports adding your own heads, modifying the default ones, or removing them all-together! This can be done within heads.yml, found in plugins/DecorHeads
.
All heads must be under the heads category, and have three required attributes: Key, Name, and Texture.
- Key - A unique identifier for a head. This cannot contain spaces or match any other head keys.
- Name - The name for the head seen in-game. This can contain spaces, but should not match other names.
- Texture: The Base64 encoded texture for the head skin, same as you'd use when using a /give command.
Example:
my-head: # Key
name: My Head # Name
texture: eyJ0ZXh0dXJlcyI6eyJTS0lOI... #texture
And that's it! DecorHeads will now load the head, printing out any errors if there are any. If all checks out, it can be spawned using the /dhspawn command!
...But that's a bit boring, isn't it? Let's add ways to get the head in the world!
To set how the head drops in the world, we can add multiple sources, covering both item drops and crafting. All sources must be inside the sources category inside a head, and like heads, each source has two required attributes: Key and Source Type.
- Key - A unique identifier for the source. This cannot match other sources within the head or contain spaces.
- Source Type - The method used to get the head, such as mining a block, killing an entity, or crafting. You can find a list of source types on the page index to the right. (Note: Some source types may require additional attributes)
Example:
my-head:
name: My Head
texture: eyJ0ZXh0dXJlcyI6eyJTS0lOI...
sources:
my-drop-source: # Source Key
source-type: MINE_DROP # Source Type
Source filters allow for setting extra conditions to how heads can drop. The effect of filters varies depending on the source type, the effects and use of each filter is listed on each drop source's wiki page.
For example, if we wanted to create a head that drops when mining dirt or sand with a diamond or netherite shovel, we can use the blocks and tools filters:
my-head:
name: My Head
texture: eyJ0ZXh0dXJlcyI6eyJTS0lOI...
sources:
my-drop-source:
source-type: MINE_DROP
drop-rate: 50
blocks: # Start of blocks filter
- DIRT
- SAND
tools: # Start of tools filter
- DIAMOND_SHOVEL
- NETHERITE_SHOVEL
The player head is unique, in that it drops the head of killed players. Because of this however, only the PLAYER_DEATH_DROP source type is supported. Multiple drops with this source type can still be added however, and all PLAYER_DEATH_DROP filters are supported.
Still lost? Found an error? Feel free to tweet me with any questions!
Drops:
Crafting: