Call Random Sections en - Glomzzz/RandomItem GitHub Wiki

For example:

ExampleItem:
  display: '<quality.1> &9Big Sword♂'
  material: '<quality.0>'
  data: 0
  lores:
    - '<quality.2-4>'
    - '&f_______&b<-&8Basic Stats&b->&f_______'
    - '&6Damage: &b<x>'
    - ''
    - '&7The biggest&5♂ &7sword in the world...'
    - ''
    - '&eQuality Level: &b<script>'
    - ''
    - '&eStrength: &b<strength>'
  #0 = false , not 0 = true
  unbreakable: <quality.5>
  item-flags:
    - 'HIDE_ATTRIBUTES'
  #Supports to call the random section
  #For example:
  #  nbt-keys:
  #    Unbreakable: <quality.5>
  nbt-keys: { }
  enchantments:
    SWEEPING_EDGE: <quality.5>
  used-global-sections:
    - 'quality'
    - 'strength'
    - 'script'
  randoms:
    Example:
      type: number
      start: '10 * <script>'
      bound: '20 * <script>'
    x:
      type: compute
      max: 233
      fixed:
        decimal:
          max: 2
      formula: '(1+(<quality.5>/2)) * <Example> * <strength> / 20'

Random sections can be called in almost everywhere that is between the ' and ' in random item config and random sections config

1. strings section:

Write <string section ID> where supported to call** all lines**

Write <string section ID.index value> where supported to call the special row

(index value: start from 0, format: [start value]-[end value] (without [ and ]) )

(if you call it in lore and return multiple lines of string, it will automatically wrap.)

2. number section:

Write <number section ID> in where supported to call

3. calculation section:

Write <calculation section ID> in where supported to call

4. javascript section:

Write <javascript section ID> in where supported to call

5. lore section:

Write <lore section ID> in where supported to call

⚠️ **GitHub.com Fallback** ⚠️