UltimateChristmas / Santa NPC
Santa NPC
Santa appears on a timer during the season as a fully animated model, strolls around, and drops presents on the ground as he goes. Players pick them up and right-click them to open them. When his visit is over he laughs goodbye and leaves.
module id: santa config: modules/santa.yml
How it works
- During the season, Santa auto-spawns at one of your configured spots (
auto-spawn: true) and waves hello. - He walks around his spawn point, resting between strolls, and waves at players who come close.
- Every so often (a random gap between
interval-min-secondsandinterval-max-seconds) he stops, plays his drop animation and leaves a present on the ground where the animation sets it down. He keeps doing this for as long as he is spawned. - Anyone can pick a present up and right-click it to open it for a reward rolled from the weighted table. If Santa is nearby, he celebrates.
- He stays for
stay-seconds, then leaves; the next visit comes aftercooldown-seconds.
Right-clicking Santa himself gives nothing. He turns to the player, gestures and tells them to follow him. Presents only come from his drops.
display-name: "&c&lSanta Claus" # A Mojang username whose skin LibsDisguises will apply when no model is shown. skin: "" auto-spawn: true stay-seconds: 180 # how long each visit lasts cooldown-seconds: 600 # gap between visits
Where he appears
spawn-locations: - "world,100,64,-50" - "world,20,70,200"
Leave the list empty and use /christmas santa spawn while standing where you want him for a one-off visit. With several locations, one is picked per visit.
Walking around
wander: enabled: true # false = he stands still radius: 10 # blocks from where he appeared speed: 0.06 # blocks per tick (0.02 - 0.3) pause-min-seconds: 3 # rest between strolls pause-max-seconds: 8 greet-radius: 6 # wave at players this close (0 = never)
Present drops
gifts:
drops:
enabled: true
interval-min-seconds: 15 # each gap is random, between min and max
interval-max-seconds: 40
max-on-ground: 8 # pauses while this many are lying around
lifetime-seconds: 300 # a present nobody picks up vanishes after this
For a fixed rhythm, set both interval values to the same number. Presents can't be placed as blocks and hoppers can't pick them up. Older configs with a single interval-seconds still work: the gap becomes random between half that value and the value.
The present item
The present can be a textured player head, an ItemsAdder item or any vanilla material. Give yourself some with /christmas santa present [amount] to check the look.
gifts:
present:
# head - a player head with head-texture below
# itemsadder - an ItemsAdder item (needs ItemsAdder; falls back to a head)
# material - any vanilla material, optionally with custom-model-data
type: head
head-texture: "eyJ0ZXh0dXJlcyI6..." # base64 value, textures.minecraft.net URL/hash, or a player name
itemsadder-id: "mypack:santa_present" # used when type: itemsadder
material: PLAYER_HEAD # used when type: material
custom-model-data: 0 # 0 = none
name: "&c&lSanta's Present" # also floats above presents on the ground
lore:
- "&7Right-click to open!"
- "&fContains a random reward"
- "&fstraight from &cSanta &f🎁"
ItemsAdder items keep their own name and lore. If the ItemsAdder id isn't found, the console logs a warning once and a player head is used instead. Presents from UltimateChristmas 3.x still in players' inventories keep opening.
Model & animations
Santa wears the bundled santa_claus model through the same built-in renderer as the Grinch, so players need the resource pack. With provider: none (or no rig loaded) he is a named villager, wearing skin if LibsDisguises is installed.
model:
id: santa_claus
provider: auto # display, modelengine, bettermodel, auto or none
scale: 1.0
offset-y: 0.0 # lift so his boots meet the ground
yaw-offset: 180 # flip if he walks backwards
animations:
idle: idle # standing between strolls
walk: walk # strolling around
arrive: wave # the moment he appears
greet: wave # a player walks up to him (once per visit each)
drop-gift: drop_gift # each time he leaves a present on the ground
clicked: interact # a player right-clicks him
celebrate: celebrate # a player opens one of his presents nearby
farewell: laugh # ho ho ho, before he leaves
The model's clips are idle, walk, wave, laugh, drop_gift, give_gift, interact and celebrate. Any of them can be assigned to any slot.
Rewards
Each opened present rolls one standard weighted reward. The default table runs from cookies to a rare diamond haul — and a 3-weight lump of coal with naughty-nice: -2. Opening a present also counts towards the gifts_opened stat for quests.
gifts:
# Restrict where his presents may be opened (needs WorldGuard).
# Empty = anywhere.
open-regions: []
rewards:
cookies:
weight: 30
shards: 25-60
items: [ { material: COOKIE, amount: 6 } ]
messages: ["&eSanta hands you a bag of warm cookies."]
sound: ENTITY_VILLAGER_YES
rare:
weight: 12
shards: 200-400
items: [ { material: DIAMOND, amount: 2 } ]
messages: ["&b&lSanta is feeling generous!"]
firework: true
coal:
weight: 3
naughty-nice: -2
items: [ { material: COAL, amount: 4 } ]
messages: ["&8Santa frowns and hands you coal. Behave!"]
open-regions limits where Santa's presents can be opened — for example only near the Christmas tree in your hub (WorldGuard region ids, same world as the player). Elsewhere the player is told to open it in the right place and keeps the present.
Admin commands
/christmas santa spawn summon Santa (at your feet if no spawn-locations are set) /christmas santa despawn send him home early /christmas santa where locate him /christmas santa drop make him drop a present right now /christmas santa present [amount] give yourself presents to test the item
Permission: ultimatechristmas.admin.santa. Apply config changes with /christmas module reload santa.