Skip to content

ItemStack (ItemStackReader)

Luis Benavides-Naranjo edited this page Mar 8, 2024 · 4 revisions

Introduction

BlobLib allows constructing items directly from YAML files. This is useful in cases such as TranslatableItem (having items that translate during runtime) and BlobInventory (user interfaces used in plugins that allow server administrators to customize them to their liking, even translating during runtime).

Material

Enchantment

ItemFlag

Attribute

Attribute Operation (AttributeModifier.Operation)

Fields

  • All BlobSounds have fields. If a required field is missing in the configuration, it will log it in console.
  • ❌ = Required
  • ✅ = Optional

  • Material (The ItemStack material. If using player heads with textures, type "HEAD-%" replacing "%" with the URL of the minecraft skin) [❌]
    1. Material: DIRT
    2. Material: HEAD-https://textures.minecraft.net/texture/64c164bac2184a76a1ee96913242e335f1d411caff51205ea39b205e6f8f058a
  • Amount (The amount of the ItemStack. Dirt can stack up to 64 naturally, eggs can stack up to 16 naturally. Valid amount range: 1 - 127) [✅] Defaults to 1
    1. Amount: 1
    2. Amount: 127
  • DisplayName (The display name of the ItemStack. If not set, it won't have a display name) [✅]
    1. DisplayName: '&6First Dirt'
  • Lore (The lore of the ItemStack. If not set, it won't have a lore. It's a list) [✅]
    1. Lore:
      - '&6&lLEGENDARY TALISMAN'
      
  • CustomModelData (The Custom Model Data of the ItemStack) [✅]
    1. CustomModelData: 1
  • Unbreakable (Whether this ItemStack will be unbreakable, either "true" or "false") [✅]
    1. Unbreakable: true
  • Color (To color the leather armor. It's "R,G,B" splitted by commas and in values from 0 to 255) [✅]
    1. Color: '255,255,255' #white
  • Enchantments (A list of the enchantments using the minecraft enchantment id and level) [✅]
    1. Enchantments:
      - 'unbreaking,5'
      - 'sharpness,10'
      
  • ShowAllItemFlags (Whether to show all item flags since by default BlobLib hides them all) [✅] Defaults to false
  • ItemFlags (A list of the ItemFlags) [✅]
    1. ItemFlags:
      - 'HIDE_ATTRIBUTES'
      - 'HIDE_UNBREAKABLE'
      
  • Attributes (A map of attributes) [✅]
    1. Attributes:
        GENERIC_MOVEMENT_SPEED:
          Amount: 0.05
          Operation: ADD_SCALAR
        GENERIC_ARMOR:
          Amount: 2.0
          Operation: ADD_NUMBER
      

Clone this wiki locally