Boss Systems

Arena Blocks & Altars

Placeable blocks that arenas, encounters and event areas are built from. Block behavior is configured in the block type JSON (class + entityClass + attributes); the attributes below go under the block's attributes.


Encounter Blocks

See Encounters for the encounter definitions these blocks connect to.

Encounter control (BlockEncounterControl)

class: "BlockEncounterControl", entityClass: "EncounterControl". Right-click opens the encounter GUI (it takes priority over held-item interaction). Shift + right-click with the controlserver privilege opens the admin config instead.

AttributeDefaultDescription
modeinstancedinstanced (altar-style summon encounters), ambient (rotating world-boss encounters) or region (region effects only, below). An unknown value falls back to instanced. All logic is delegated to the mode handler
encounterId—The encounter this block controls (not used by region)
animations—Optional looping block animations, { "idle": code, "active": code, "cooldown": code }, played on the client from the block's own shape: idle when loaded or unknown, active while the encounter is preparing / active, cooldown after it completed, failed or went on cooldown. A missing state falls back to idle; while an animation runs the static mesh is skipped

The click also finds the block entity of a neighbouring block (multi-block models). The block entity registers itself with the region guard, which enforces the region effects of its mode (spawn suppression, PvP / damage rules, temporal stability, warmth, gravity) inside the zone. The altar attributes of the instanced and ambient modes (zoneRadius, disableDefaultMobSpawns, regionPvpDisabled, ...) are documented with Encounters.

Region mode

mode: "region" creates no encounter, boss or arena; the block only applies area effects. Shift + right-click with controlserver opens its config dialog. Block attributes provide the initial values:

AttributeDefaultDescription
zoneRadius40Radius of the region in blocks
useLandClaimRegiontrueAlso treat a land claim that contains / touches the block as part of the region
disableDefaultMobSpawnsfalseNo natural mob spawns inside the region
regionPvpDisabledfalseDisable PvP inside
regionNoDamagefalseNo damage inside
disableTemporalStabilityDrainfalseSuppress temporal stability drain
regionWarmth0Warmth bonus inside
regionGravity1Gravity factor inside (the strongest deviation from 1 applies)

Arena anchor (BlockEncounterArenaAnchor)

entityClass: "EncounterArenaAnchor". Marks the arena center and the respawn point of participants. Only players with controlserver can interact with it (admin settings). Registered automatically with the respawn registry.

AttributeDefaultDescription
yOffset0Vertical offset of the respawn point
keepInventoryfalseParticipants keep their inventory on death
respawnRadius5Respawn scatter radius
spawnDelayMs500Delay before respawn
pvpDisabledfalseDisable PvP around the anchor
linkedEncounterId—Stored on the block (and editable in its dialog) but not used when registering the anchor

The attributes only give the initial values when the block is placed; afterwards the admin dialog values saved in the block entity win.

Spawn point (BlockEncounterSpawnPoint)

entityClass: "EncounterSpawnPoint". Marks a possible boss spawn position.

AttributeDefaultDescription
linkedEncounterId—Restricts the point to this encounter
jitterRadius1.5Random offset applied to the spawn position
enabledtrueDisabled points are skipped

Encounter trigger (BlockEncounterTrigger)

entityClass: "EncounterTrigger". Fires an encounter action; configured by attributes.encounterTrigger.

FieldDefaultDescription
triggerIdrequiredUnique ID. Cooldown and one-shot state are keyed by it — blocks sharing an ID share them
triggerTypeproximityproximity (player enters radius), interaction (right-click), command
actionspawnMobGroupspawnWave (needs encounterId, waveIndex), spawnMobGroup (needs mobGroup), startEncounter (needs encounterId, optional difficultyId)
radius8Proximity radius
cooldownSeconds30Time between activations (0 = none)
oneShotfalseFire only once
requireAllPlayersAlivetrueAll players in range must be alive
maxPlayers0Max players counted (0 = unlimited)
requiredQuestId—Activating player needs this quest active
publishEventtruePublish encounter.trigger.activated on the event bus
mobGroup—mobs[], optional boss, delayBetweenSpawnsMs (500), spawnRadius (15)
"attributes": {
  "encounterTrigger": {
    "triggerId": "mypack:crypt-door",
    "triggerType": "proximity",
    "action": "spawnMobGroup",
    "radius": 10,
    "oneShot": true,
    "mobGroup": { "mobs": [ /* WaveMobEntry[] */ ], "spawnRadius": 12 }
  }
}

Arena Objects (BlockArenaObject)

class: "BlockArenaObject", entityClass: "ArenaObject". Interactive pieces of boss arenas. The kind comes from attributes.arenaObject; loaded objects are indexed by kind so boss mechanics can find them without scanning blocks.

arenaObjectBehaviorUsed by
mirrorRight-click turns it (swaps to the block in arenaMirrorNext). arenaMirror is slash or backslash and decides how boss beams reflect.bossmirrorbeam
winchHold right-click for winchHoldSec (2) to fire a harpoon at the nearest harpoonable boss within winchRange (40). Reloads for winchCooldownSec (8).bossharpoonable
anchorCapture pointbosscapture with useArenaAnchors
shieldCatches boomerangs flying pastbossboomerang
lightKeeps players within lightRadius (default 6) safe from darkness; lights also reveal a hidden bossbossdarkness, bossphasedirector

Items can act as portable lights: an item with attributes.arenaLightRadius shelters its holder (and nearby players) the same way, also when lying on the ground.


Altars

Altar blocks apply an area effect to players inside their radius. All use the shared altar system (class ALBaseAltarHealing / ALBaseAltarTemporal, matching entityClass). Common attributes:

AttributeDescription
altarTypeAltar type name (default unknown)
radiusEffect radius in blocks (healing default 8, temporal default 32)
particleColor[r, g, b] or [r, g, b, a] particle color
ambientSound / ambientSoundVolume / ambientSoundRangeLooping client sound while active (default sounds/block/riftward.ogg, volume 0.5, range 6)
activeAnimationShape animation played while active (default on-spin)
ambientMusicKeyOptional music key played near the altar

Healing altar

ALBaseAltarHealing — eternal, needs no fuel. Heals every player inside the radius that is below full health. Right-click toggles it on/off and prints its status (radius, heal amount, on/off). Each altar applies independently, so overlapping altars stack.

AttributeDefaultDescription
radius8Effect radius
healAmount2HP restored per effect tick

Temporal (fuelled) altar

ALBaseAltarTemporal — runs on fuel measured in days. Right-click opens the altar GUI, where players add fuel items and switch the altar on/off (the GUI switch is the only on/off control). An empty altar is off and must be refueled; refueling re-activates it. Fuel items are taken from the active hand first, then from all inventories; a nearly empty altar is flagged in the GUI by lowFuelThreshold.

AttributeDefaultDescription
maxDays1100Fuel capacity in days
daysPerFuelItem7Days added per fuel item
fuelItemPatterngear-temporalItems whose code path contains this text count as fuel
lowFuelThreshold7Days left at which the GUI warns
altarStrategytemporal-drain-reductionThe effect (below)
drainReductionPercent100temporal-drain-reduction: share of temporal stability drain blocked (100 = full, 200 = drain turns into growth)
stabilityRestorePerSecond0.004temporal-drain-reduction: temporal gear charge restored per second inside the zone
stabilityPulseAmount0temporal-drain-reduction: extra stability granted once a minute inside the zone
gravityFactor0.5lunar-gravity: player gravity multiplier inside the radius
guiTheme—Visual theme of the altar GUI
langKeyPrefix—Prefix for the altar GUI's lang keys

Altar strategies: temporal-drain-reduction (default), temporal-stability-suppression (sets the stability multiplier to 0 in the zone), lunar-spawn-ward (no natural hostile spawns inside the radius), lunar-gravity (lower gravity inside the radius).


Knowledge Altar (BlockKnowledgeAltar)

Right-click opens a reference book (client-side, no server state). The book is chosen by attributes.knowledgeBook; books are defined in config/knowledge/*.json of any mod:

{ "books": [{
  "id": "mypack:selenarch",
  "titleKey": "mypack:book-selenarch",
  "worldBossEvent": "mypack:selenarch",
  "pages": [{ "titleKey": "mypack:page-1-title", "textKey": "mypack:page-1-text" }]
}] }

Page text is a lang key (VTML formatting allowed). When worldBossEvent is set, the book header shows the live state of that world boss event and its remaining cooldown.


Temporal Rift Projector (BlockTemporalRiftProjector)

entityClass: "TemporalRiftProjector". A decorative rift effect. Right-click is admin-only (controlserver privilege) and opens a config dialog; settings are saved on the block.

SettingDefaultDescription
riftOffsetY2Height of the rift above the block
riftSize2Size (clamped to 0.1 - 20)
riftColor#ffffffTint color (hex)
riftColorStrength0Tint strength, 0 - 1

The setting names are also the block attributes keys that provide the initial values.


Pose Seat (BlockPoseSeat)

entityClass: "PoseSeat". A prop the player "enters" with right-click and stays in a fixed pose (photo props such as event guillotines). It works like a bed: sneak leaves it; the block entity is a mountable seat and a player standing in it is released if the block is broken. Entering counts as an interact event for achievements on the block's base code (domain:firstcodepart). Offsets are for the north-facing variant and rotate with the side variant (north/east/south/west); the model's front is -X.

"attributes": {
  "poseSeat": {
    "animation": "mypack-sit-guillotine",
    "offset": [0.5, 0.2, 0.5],
    "facing": [-1, 0],
    "yawOffsetDeg": 0,
    "eyeHeight": 1.0,
    "enterSound": "game:sounds/block/rotate"
  }
}
FieldDefaultDescription
animation—Player animation code (see config/playeranimations/); full meta is taken from there if defined
offset[0.5, 0, 0.5]Seat position inside the block, 0..1
facing[-1, 0]Direction (x, z) the player looks
yawOffsetDeg0Extra rotation
eyeHeight1.0Camera height
enterSound—Sound on entering

Relightable (BlockRelightable)

entityClass: "Relightable". A block such as a ward lantern that a player lights with right-click and that goes out again after in-game hours. The block needs a state variant with unlit and lit values (and optionally a side variant). Lighting swaps unlit to lit, plays a sound, throws sparks and counts as an interact objective on the unlit block code. When the time runs out it swaps back to unlit with a puff of smoke; the timer survives reloads.

"attributes": {
  "relight": {
    "gameHours": 24,
    "igniteSound": "game:sounds/effect/torch-ignite",
    "fadeSound": "game:sounds/effect/extinguish",
    "flameOffset": [0.5, 0.9, 0.5],
    "sparkColor": [255, 190, 80]
  }
}
FieldDefaultDescription
gameHours24In-game hours the block stays lit
igniteSound / fadeSound—Sounds when lit / when it goes out
flameOffset[0.5, 0.9, 0.5]Flame position in the block (north variant) for particles and sound
sparkColor[255, 190, 80]RGB of the sparks

Chaos Arena anchor (BlockChaosArenaAnchor)

entityClass: "ChaosArenaAnchor". Right-click joins a Chaos Arena match; attributes radius, mode, arenaKey, botEntityCode, botCount, botRespawnDelayMs. See Chaos Arena.


Ash Floor (BlockAshFloor)

entityClass: "AshFloor". A floor tile created by boss abilities (see Boss Combat). Non-creative players cannot break or interact with it. The block entity ticks on the server and applies the slow / no-jump / no-sneak debuffs to players standing on it for as long as it is armed. The values (despawn time, tick interval, walk-speed multiplier, jump / sneak lock) are set by the ability that places the tile, not by block attributes.

Cooldown Placeholder (BlockCooldownPlaceholder)

entityClass: "CooldownPlaceholder". A non-interactive stand-in that systems place over a block for a while. It remembers the original block (and its data) and restores it after the stored game hour. It has no pack-side attributes.

Decor blocks

Three small helpers for decoration models:

ClassJSONBehaviour
FacePlayerOrientableblock behavior { "name": "FacePlayerOrientable" }Horizontal orientation (side variant) turned towards the placing player (vanilla turns it away)
BlockAngledDecorclass + entityClass: "AngledDecor"On top of the cardinal side variant, turns in 22.5 degree steps (up to 45 degrees either way) towards the placing player
AnimatedDecorentityClass: "AnimatedDecor" with the Animatable behaviorLoops the shape animation named by attributes.animation (default idle) on clients, for banners, flags and chimes

Press ESC to close