Play Strawberry Belgeler
Başvuru

Bu sayfa İngilizce gösteriliyor.

enchantments

Custom enchantment definitions, errors, and registration.

Declarations from the script contract strawberry:plugin, version 0.2.0, without source comments.

WIT declarations

text
use text.{text-component};

enum attribute-modifier-slot {
  any,
  main-hand,
  off-hand,
  hand,
  feet,
  legs,
  chest,
  head,
  armor,
  body,
  saddle,
}

enum enchantment {
  aqua-affinity,
  bane-of-arthropods,
  binding-curse,
  blast-protection,
  breach,
  channeling,
  density,
  depth-strider,
  efficiency,
  feather-falling,
  fire-aspect,
  fire-protection,
  flame,
  fortune,
  frost-walker,
  impaling,
  infinity,
  knockback,
  looting,
  loyalty,
  luck-of-the-sea,
  lunge,
  lure,
  mending,
  multishot,
  piercing,
  power,
  projectile-protection,
  protection,
  punch,
  quick-charge,
  respiration,
  riptide,
  sharpness,
  silk-touch,
  smite,
  soul-speed,
  sweeping-edge,
  swift-sneak,
  thorns,
  unbreaking,
  vanishing-curse,
  wind-burst,
}

record custom-enchantment {
  id: string,
  description: text-component,
  max-level: u32,
  anvil-cost: u32,
  supported-items: string,
  weight: u32,
  slots: list<attribute-modifier-slot>,
  exclusive-set: list<string>,
}

resource enchantment-manager {
  register-enchantment: func(enchantment: custom-enchantment) -> result<_, string>;
  get-enchantment: func(id: string) -> option<custom-enchantment>;
  has-enchantment: func(id: string) -> bool;
  get-all-enchantment-ids: func() -> list<string>;
}

Bu sayfada