MinionCore logoMinionCore

Holograms and Effects

Set up the text above each minion, its style, height and frame, the sounds and particles for minion events, and the work animation.

Holograms show at a glance what a minion is and whether it is working. Sounds, particles and a work animation make minions feel alive and tell players when something needs their attention, such as a full storage or an empty fuel tank.

A minion with a three line hologram above it reading Chunk Loader Minion, Level 2 and Working, sitting 1.8 blocks above the minion's block and seen from up to 32 blocks away.

Holograms

Server wide settings

holograms:
  enabled: true
  view-distance: 32
  y-offset: 1.8
  keep-state-on-pickup: true
KeyShipped valueWhat it does
holograms.enabledtrueWhether any minion shows a hologram. false removes them all
holograms.view-distance32Roughly how far away the hologram can be seen, in blocks
holograms.y-offset1.8How far above the minion's block the hologram sits, for types with hologram.offset-y: DEFAULT
holograms.keep-state-on-pickuptrueWhether a minion whose hologram was hidden keeps it hidden after it is picked up and placed again. false shows it again on placing

Per type settings

Each minion type file has its own hologram section, so a miner and a chunk loader can show different lines at different heights. This is the shipped miner:

minions/miner.yml
hologram:
  enabled: true
  offset-y: DEFAULT
  line-spacing: 0
  lines:
    - "<green>%type%"
    - "<gray>Level <white>%level%"
    - "<gray>Storage <white>%stored%/%capacity%"
    - "%status%"
  states:
    BROKEN:
      - "<green>%type%"
      - "<red>Broken, right click to repair"
  level-offsets: {}
  appearance-offsets:
    ARMOUR_STAND: 0
    MANNEQUIN: 0
    MODELENGINE: 0
    ITEMSADDER: 0
KeyShipped valueWhat it does
enabledtruefalse hides the hologram for this type only
offset-yDEFAULTHow far above the bottom of the minion's block the hologram starts, in blocks. DEFAULT uses holograms.y-offset from config.yml
line-spacing00 shows every line in one hologram. Above 0, each line gets its own hologram, this many blocks apart
linesfour linesThe text, top line first
statesBROKEN onlyOther lines to show while the minion has a certain status, see below
level-offsets{}Extra height from a level upwards, see below
appearance-offsets0 for each lookExtra height for each look, see below

Every shipped type shows these four lines in its own colour, except the chunk loader, which has no storage and leaves out the Storage line. The chunk loader also ships with states: {}, since it never breaks down.

  • An empty lines list shows no hologram.
  • Lines use MiniMessage colours. See Messages and language.
  • When PlaceholderAPI is installed, its placeholders are filled in for the minion's owner while the owner is online, so %player_name% and other player placeholders show the owner's values. Every player looking at the hologram sees the same text. While the owner is offline, PlaceholderAPI placeholders are not filled in.
  • A number that cannot be read, or a status or look name that does not exist, is skipped with a console warning naming the file and key.

These placeholders work in hologram lines:

PlaceholderShows
%type%The type's display-name
%minion_name%The type's display-name, the same as %type%
%owner%The owner's name
%level%The minion's level
%status%The status text, such as Working or Storage full, from status in the language file
%fuel%Fuel actions left
%fuel_use%Fuel used by each action, with two decimals, such as 1.10. See Fuel
%used%Storage slots in use
%slots%Storage slots in total
%stored%How many items are in storage, counting every item in every stack
%capacity%How many items the storage can hold, worked out as slots times 64
%delay%Seconds between actions

Lines for each status

states swaps the whole hologram for other lines while the minion has one status. Each key is a status name, and its value is a list of lines.

hologram:
  states:
    BROKEN:
      - "<green>%type%"
      - "<red>Broken, right click to repair"
    STORAGE_FULL:
      - "<green>%type%"
      - "<gold>Full, empty me"
    PAUSED: []
  • The status names are WORKING, NO_FUEL, STORAGE_FULL, NO_TARGET, PAUSED, CHUNK_UNLOADED, OWNER_OFFLINE and BROKEN.
  • A status that is not listed uses lines.
  • An empty list, such as PAUSED: [] above, hides the hologram while the minion has that status. It comes back when the status changes.
  • The same placeholders work in these lines.

Every shipped type except the chunk loader lists BROKEN, so a broken minion shows its name and a repair hint instead of its storage and level.

Style

style changes how the hologram looks: the box behind the text, the shadow, the size and where it sits. With nothing changed it looks exactly as before, the vanilla grey box with plain white text.

minions/miner.yml
hologram:
  style:
    background: DEFAULT
    shadow: false
    see-through: false
    text-opacity: 255
    alignment: CENTER
    line-width: 200
    billboard: CENTER
    scale: "1,1,1"
    translation: "0,0,0"
KeyShipped valueWhat it does
backgroundDEFAULTThe box behind the text. DEFAULT is the vanilla grey box. Write a colour as '#AARRGGBB' or '#RRGGBB', the first pair being how solid it is. '#00000000' shows no box at all
shadowfalseWhether the text has a shadow
see-throughfalseWhether the text shows through blocks
text-opacity255How solid the text is, from 0 to 255
alignmentCENTERWhere shorter lines sit: CENTER, LEFT or RIGHT
line-width200How wide a line gets before it wraps
billboardCENTERHow the hologram turns to face players: CENTER turns every way, VERTICAL only left and right, HORIZONTAL only up and down, FIXED never
scale"1,1,1"The size. One number such as 1.5 scales evenly, or write x,y,z
translation"0,0,0"Moves the hologram from where it would be, in blocks, written as x,y,z

Put the colour in quotes, since a bare # starts a comment in YAML. A value that cannot be read is skipped with a console warning, and that key keeps its default. With line-spacing above 0 the style applies to every line.

state-styles changes the style for one status, the same way states changes the lines. List only the keys that differ:

hologram:
  style:
    background: '#00000000'
  state-styles:
    BROKEN:
      background: '#60FF0000'
    NO_FUEL:
      shadow: true

Here the hologram has no box, turns red while the minion is broken, and goes back to no box after the repair.

Background frame

background-lines draws extra text behind the hologram. It is meant for a frame made from a resource pack font glyph, such as one from ItemsAdder, so each type can have its own themed panel.

hologram:
  style:
    background: '#00000000'
  background-lines:
    - "<white>\uE001"
  background-style:
    background: '#00000000'
  background-offset: "0,0,-0.01"
KeyShipped valueWhat it does
background-lines[]The lines drawn behind the text. Placeholders work here too. Empty draws nothing
background-styleno boxStyle keys for the frame, laid over style. It ships with background: '#00000000' so the glyph has no grey box behind it
background-offset"0,0,-0.01"How far the frame sits from the text, as x,y,z in blocks. The small negative z keeps it just behind the text. Use y to move a tall frame up or down

The frame sits level with the top line and turns with the hologram. Set the hologram's own background to '#00000000' as well, otherwise the grey box shows over the glyph.

Height

The hologram's height is added up from three keys:

height = offset-y (or holograms.y-offset) + the level offset + the look offset

level-offsets lists levels, each with extra height that applies from that level upwards. Only the nearest listed level at or below the minion's level counts, they are not added together. With level-offsets: {3: 0.3, 5: 0.6}, levels 1 and 2 get nothing, levels 3 and 4 get 0.3 and level 5 and above get 0.6.

appearance-offsets adds height for the look the minion really ended up with, after any fallback:

KeyUsed when the minion shows as
ARMOUR_STANDA small armour stand. That is a VANILLA look without a Mannequin, a CUSTOM_MODEL_DATA look, or any fallback that ends on an armour stand
MANNEQUINA Mannequin player model, on Spigot and Paper 1.21.9 and newer
MODELENGINEA ModelEngine model
ITEMSADDERAn armour stand carrying an ItemsAdder item

ARMOR_STAND is read the same as ARMOUR_STAND. Because the key follows the real look, a type that uses MODELENGINE but falls back to a Mannequin when ModelEngine is missing gets the MANNEQUIN offset, not the model's.

line-spacing decides how the lines stack. At 0 all lines sit in one hologram that starts at the height above. Above 0, the bottom line sits at that height and each line above it is line-spacing higher, so the top line of four lines at 0.3 spacing is 0.9 above the bottom one. A line that comes out empty after the placeholders are filled leaves a gap instead of moving the others.

Worked example: a tall model

A server gives the miner a ModelEngine model about 3 blocks tall, and a bigger model from level 5. The shipped 1.8 puts the text inside the model's chest. On servers without ModelEngine the miner falls back to a Mannequin, where 1.8 is right.

minions/miner.yml
appearance:
  type: MODELENGINE
  modelengine:
    model: big_miner

hologram:
  offset-y: DEFAULT
  line-spacing: 0.3
  lines:
    - "<green>%type%"
    - "<gray>Level <white>%level%"
    - "<gray>Storage <white>%stored%/%capacity%"
    - "%status%"
  level-offsets:
    5: 0.5
  appearance-offsets:
    MODELENGINE: 1.5
    MANNEQUIN: 0
Minionoffset-yLevel offsetLook offsetBottom lineTop line
Level 1, ModelEngine model1.801.53.34.2
Level 5, ModelEngine model1.80.51.53.84.7
Level 1, ModelEngine missing, Mannequin1.8001.82.7

The top line is the bottom line plus three gaps of 0.3, since four lines have three gaps between them. Heights are in blocks above the bottom of the block the minion stands in. Try a value, run /minion reload, and look at the minion, the hologram moves straight away.

Hiding holograms

On an island full of minions the holograms can get in the way, so players can hide them.

  • One minion. The Hologram button in the minion menu hides or shows that minion's hologram, see Hologram button. /minion holograms hide this and show this do the same for the minion you are looking at, up to 6 blocks away.
  • Many minions. /minion holograms hide all and show all change every minion you own, and hide type <type> and show type <type> every minion of one type. The count of changed minions is shown. Minions in unloaded chunks are changed too.
  • Only for you. /minion holograms view off hides every minion hologram for you alone. Other players still see them, and the minions keep their own setting. view on shows them again, and view alone switches between the two. The choice is kept when you leave and rejoin.

A hidden hologram is saved with the minion, so it stays hidden after a restart. holograms.enabled: false in config.yml and hologram.enabled: false in a type file always win: a minion can hide a hologram they show, never show one they hide.

An admin with minioncore.holograms.others can add a player name to all and type, such as /minion holograms hide all Steve, also for players who are offline. The command words can be renamed under command.holograms in config.yml.

When holograms update

The lines are worked out again after every action and whenever something about the minion changes, such as a level, fuel or storage change. The text above the minion is only rewritten when the result is different, so a minion that is doing the same thing causes no updates.

Holograms are not saved with the world. They are removed when the minion's chunk unloads or the server stops, and made again when the chunk loads. A /minion reload applies new hologram settings to every placed minion.

Sounds and particles

Events in config.yml

sounds:
  place: block.stone.place
  pickup: block.stone.break
  upgrade: entity.player.levelup
  fuel: block.fire.ambient
  storage-full: block.note_block.bass
  out-of-fuel: block.fire.extinguish
  breakdown: entity.item.break
  repair: block.anvil.use

particles:
  place: CLOUD
  pickup: CLOUD
  upgrade: HAPPY_VILLAGER
  fuel: FLAME
  storage-full: SMOKE
  out-of-fuel: LARGE_SMOKE
  breakdown: SMOKE
  repair: HAPPY_VILLAGER
EventPlays whenSound is heardParticles show
placeA minion is placedAt the minionAt the minion
pickupA minion is picked up or removedAt the minionAt the minion
upgradeAn upgrade is appliedBy the player who applied itAt the minion
fuelFuel is addedBy the player who added itAt the minion
storage-fullA minion stops because its storage is fullAt the minionAt the minion
out-of-fuelA minion uses its last fuelAt the minionAt the minion
breakdownA minion breaks down after an actionAt the minionAt the minion
repairA player repairs a broken minionBy the player who repaired itAt the minion

Leave a value empty ("") for no sound or no particle on that event. A repair made through the developer API shows the repair particles but plays no sound, since no player is involved. See Breakdowns and repairs.

Per type sounds

Each type file has a sounds section, so every minion type can sound different. Nothing in it plays until you fill it in.

minions/miner.yml
sounds:
  action: ""
  hearing-radius: 16
  actions: {}
  events: {}
  status: {}
  ambient:
    sound: ""
    volume: 1.0
    pitch: 1.0
    pitch-range: 0.0
    min-interval: 20
    max-interval: 60
    statuses: [WORKING, NO_TARGET]
KeyShipped valueWhat it does
action""Played on every action that has no entry under actions
hearing-radius16How far away in blocks players hear this minion
actions{}A sound per kind of action: mine, harvest, plant, till, chop, gather, attack or fish
events{}Sounds used instead of the config.yml ones for this type: place, pickup, fuel, upgrade, repair, break, plus menu-open when its menu opens and interact on a right click
status{}A sound played when the minion gets a status. Add interval in seconds to repeat it while the status lasts
ambient.sound""A sound played now and then, at a random gap between min-interval and max-interval seconds, while the minion has one of ambient.statuses

A sound can be written as just its key, or as a section with its volume and pitch:

sounds:
  actions:
    mine:
      sound: "solyverne:esprit.mine"
      volume: 0.6
      pitch: 1.0
      pitch-range: 0.15
    harvest: block.crop.break
  events:
    place: entity.villager.yes
    menu-open: block.chest.open
  status:
    NO_FUEL:
      sound: entity.cat.purreow
      interval: 10
    STORAGE_FULL: block.note_block.bass
  • pitch-range moves the pitch up or down by a random amount up to that value on each play, so repeated sounds do not all sound the same. The pitch always stays between 0.5 and 2.
  • A status sound with no interval, or interval: 0, plays once when the minion gets that status.
  • An event with no entry in the type file plays the matching config.yml sound, so an empty events section behaves exactly as before. break replaces sounds.breakdown.
  • fuel, upgrade, repair and menu-open are heard by the player who did it. The others are heard at the minion.
  • Status and ambient sounds only run while a player is within hearing-radius.

Each type file still has particles.action, shown on every action. It ships empty, so minions work without particles until you set one, such as action: CRIT.

Muting minion sounds

A player who finds minion sounds annoying can run /minion sounds to turn them off for themselves. Other players still hear them. Running it again turns them back on, and the choice is kept when they leave and rejoin. It covers every minion sound, including the config.yml ones, but not the click sounds of menu buttons. The permission is minioncore.sounds, given to everyone by default.

sounds.category in config.yml picks which volume slider in the player's sound settings controls minion sounds. It ships as NEUTRAL, the Friendly Creatures slider.

Writing values

  • Sounds are sound keys, as used by the /playsound command: block.stone.place or minecraft:block.stone.place. Custom sounds from a resource pack work too, written with their namespace, such as mypack:minion.work. The same format is used by button sounds in gui.yml.
  • Particles are particle names in capitals, such as FLAME or HAPPY_VILLAGER.

Unknown values

A sound or particle that does not work is skipped, and the console prints one warning naming the file and key, such as config.yml sounds.place. Nothing else breaks. The warning is printed once per value, not on every action.

A value is skipped when:

  • The sound value is not a valid key, for example it has capital letters or spaces. A valid key is played even when the server does not know it, so a resource pack sound reaches players who have the pack, and players without it hear nothing.
  • The particle name does not exist on the server's Minecraft version.
  • The particle needs extra settings, such as a colour or a block. DUST, BLOCK and ITEM are examples, so use particles that need nothing else.

Work animation

On every action a minion turns to what it works on, steps a little toward it, plays its strike and steps back to its own block. Set in each type file:

appearance:
  animation: true
  motion:
    style: DIG
    swings: 2
    turn-to-target: true
    step-distance: 0.35
    turn-ticks: 3
    step-ticks: 4
StyleShipped onWhat plays
DIGMinerQuick overhead strokes with the head tilted down at the block
CHOPLumberjackThe arm goes high over the head, then a hard diagonal stroke
SWINGFarmerOne wind up and a strike forward and down
SLASHHunterA fast sweep across the body
CASTFishermanThe arm goes back over the shoulder, flicks forward and holds out
SWEEPChunk collectorBoth arms sweep low in front
OFFERFeeder and sellerBoth arms reach forward and hold
NONEChunk loaderNo strike. Turning and stepping still happen if they are on
LookWhat moves
Armour standThe whole body turns and steps, the head looks at the target and the arms play the strike
Mannequin, on servers that have oneThe body turns and steps, and the main hand swings on each strike, since a Mannequin cannot hold an arm pose
ModelEngine modelThe model turns and steps, and the animation named in appearance.modelengine.work-animation plays once

The animation always ends before the next action. On a fast minion strikes are dropped first, then the step gets quicker. A minion never steps into a block, and only steps up to half way to its target. Picking a minion up, its chunk unloading or a restart puts it back on its own block.

Minions only move while a player is within animation.view-distance blocks, 48 by default. Sounds and particles play either way. animation.enabled: false in config.yml turns the movement off for every type, and appearance.animation: false for one type. See Configuration.

On this page