Pet Definition
Configure a companion pet
フィールド
| フィールド | 型 | デフォルト | 説明 | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
description | String | — | — | ||||||||||||||||||||||||||||||||||||
texture | String | — | Base64 encoded player head texture for head-display pets. Leave blank for default. | ||||||||||||||||||||||||||||||||||||
npc | Ref<EntityDefinitionEntry> | — | Optional NPC entity definition used when the pet walks beside the player. | ||||||||||||||||||||||||||||||||||||
skins | List<PetSkinEntry> | empty | Collection of NPC definitions that players can choose from when the pet walks beside them. | ||||||||||||||||||||||||||||||||||||
defaultMode | PetDisplayMode | HEAD | —値:HEADGROUNDFLY | ||||||||||||||||||||||||||||||||||||
headOffset | Vector | ZERO | Offset applied when the pet floats above the player in head mode. | ||||||||||||||||||||||||||||||||||||
swimMode | PetSwimMode | AUTO | How this pet behaves in liquid while using ground mode. AUTO follows the configured entity capabilities.値:AUTOALWAYSNEVER | ||||||||||||||||||||||||||||||||||||
flightHeight | Double | 2.0 | Height above the owner used by flying pets. | ||||||||||||||||||||||||||||||||||||
xp | PetXpSettings | — | —
|
| フィールド | 型 | デフォルト | 説明 | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
formula | String | — | Optional arithmetic expression using {level} to calculate XP required per level. | ||||||||||||||||
levels | List<PetLevelRequirement> | empty | Explicit XP requirements that override the formula when provided.
|
| フィールド | 型 | デフォルト | 説明 |
|---|---|---|---|
level | Int | 1 | — |
xp | Int | 0 | — |
damage | Double? | — | Damage dealt by the pet when retaliating at this level. Leave empty to use the default scaling. |
maxLevelInt10killRewardInt0combatPetCombatSettingsPetCombatSettings(1)
| フィールド | 型 | デフォルト | 説明 |
|---|---|---|---|
enabled | Boolean | false | Enable simple retaliation behaviours when the owner is attacked. |
tokenPetTokenSettingsPetTokenSettings(4)
| フィールド | 型 | デフォルト | 説明 |
|---|---|---|---|
item | Item | — | TypeWriter item captured or built to represent this pet when given to players. |
lore | List<String> | — | Lore of the token. Supports MiniMessage and the placeholder {name}. |
glow | Boolean | false | Adds a glowing enchantment effect to the token item. |
noSlotMessage | String | <red>Ton menu des compagnons est plein. | Message sent when the player has no available slot for this pet. Supports MiniMessage. |
How to use it
One Pet Definition describes one species. The entry name is the display name and its id is what commands, actions and placeholders use.
Display.
defaultMode:HEADfloats above the player (withheadOffset),GROUNDwalks beside the player,FLYhoversflightHeightblocks above.texture: a base64 skin texture for the floating head and the token item.npc: an entity definition spawned forGROUNDandFLY, and forHEADwhen you want a model instead of a head. It is also the fallback when no skin matches.skins: alternative NPC skins. Each needs annpc, and usespriority(higher first) andcriteriato decide whether the player may wear it.iconis the item shown in the skin menu, where{skin}is replaced by the skin name.
Progression. In xp:
maxLevelis the top level.levelslists, for eachlevel, the totalxpthe pet must have. An optionaldamagesets the retaliation damage from that level on.formulais used when a level is not inlevels. It may contain{level}and+ - * /with parentheses, for example{level} * 100.killRewardis the XP the pet earns each time its owner kills something while it is active.
Combat and token. combat.enabled turns on retaliation against mobs that hit the owner. token defines the item players receive: item, name and lore (MiniMessage, with {name} replaced by the pet name), glow, and noSlotMessage shown when the menu is full.
A pet with GROUND or FLY and no usable npc is never shown. swimMode only matters for ground pets.