Item Library

How to create a new item

Note: There's a file called example.yml in /loots folder which contains a detailed example of a rainbow fish 注意:在/loots文件夹下有一个example.yml包含了一个带有全部物品属性的物品示例

Enable

是否启用

enable: false

Nick is what to show in fish finder and titles

昵称将在标题和找鱼器中显示

nick: 'Example Fish'

Should it be displayed in fish finder?

是否能被找鱼器发现

show-in-fishfinder: false

Disable bar mechanic for a certain loot

为某个战利品关闭捕鱼条机制

disable-bar-mechanic: true

Disable statistics for a certain loot

关闭此物品的数据记录

disable-stats: true

Is this loot only available when player fish in lava

是否为岩浆鱼

in-lava: false

The weight(relative chance) of getting this fish

钓到这种鱼的相对概率(权重)

weight: 10

Fish group, it's optional and unlimited. [Note] Group and category are different. Group receives a weight bonus while category is just for collections.

鱼的组

group: normal

The score to get in competition

比赛中获得的分数

score: 10

Specify the fishing game

指定钓鱼游戏类型

mini-game
  - rainbow

Basic elements of an item, it's recommened to use MiniMessage format

物品的基础属性

https://docs.adventure.kyori.net/minimessage/format.html

# Base item
material: COD
# Compatibility with other plugins
# 与其他插件物品库的兼容
#     material: ItemsAdder:namespace:id
#     material: Oraxen:id
#     material: MythicMobs:id
#     material: MMOItems:TYPE:ID
#     material: NeigeItems:id
# If you want players to fish nothing but something like a "command", you can just set material: AIR

# Item amount
amount: 1

# Custom Model Data 模型值
custom-model-data: 1
display:
  name: '<rainbow>✖Example Rainbow Fish✖</rainbow>'
  lore:
     - '<gray>This is a <font:uniform>rainbow fish!'
     - '<gray>It is {size}cm long!'
     
 [Note] Available placeholders:
  {size} : The size of the fish
  {player} : The fisherman's name
  {date} : The date when the fish caught
  {worth} : The price of the fish
# Only works when material is player_head (PLAYER_HEAD)
# 头颅物品
# get head64 here https://minecraft-heads.com/
head64: eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNWRlYTkyZjhmZWZkMGMwMDE3MTliNDQ1MjUxMjAxNmFiN2Q1NzkzODg0Nzg5MDEyYjU1NTExYWYzYzdkMDMzYiJ9fX0=

# Can the head be stacked
# 头颅是否可以堆叠
head-stackable: true

Is the item unbreakable

物品是否不可破坏

unbreakable: false

Optional size, would be useful if want to make each fish unique If you don't need this feature, just remove this section.

鱼的尺寸

size: 10~200

Optional price, would be useful to be used in price formula which can be find at sell-fish.yml. If you don't need this feature, just remove this section.

鱼的价格

price:
  base: 50
  bonus: 0.3

Custom NBT tags

自定义NBT标签

(Int) (Byte) (String) (Float) (String) (Double) (Short) (Long) (UUID) (Boolean) (IntArray) (ByteArray)

If you are not sure about the NBT tag. You can use command '/customfishing items loot import' to import the item in your hand

nbt:
  itemsadder:
    namespace: '(String) momirealms'
    id: '(String) rainbow_fish'

Available events: success/failure/hook/consume/success-times Available actions: message/command/exp/mending/skill-xp/job-xp/sound/potion-effect/chain

action:
  success:
    action_message:
      type: message
      value:
        - You got a {loot} lol!
      chance: 1.0
    action_command:
      type: command
      value:
        - say Success command example!
      chance: 1.0
    action_exp:
      type: exp
      value: 10
      chance: 1.0
    action_mending:
      type: mending
      value: 5
      chance: 1.0
    action_skill-xp:
      type: skill-xp
      value: 100.0
      chance: 1.0
    action_job-xp:
      type: job-xp
      value: 10.0
      chance: 1.0
    action_sound:
      type: sound
      value:
        source: player
        key: minecraft:block.amethyst_block.break
        volume: 1.0
        pitch: 1.0
    action_chain:
      type: chain
      chance: 0.5
      value:
        action_command_1:
          type: command
          value:
            - say Chain triggered 1!
        action_command_2:
          type: command
          value:
            - say Chain triggered 2!
  consume:
    potion_effect_1:
      type: potion-effect
      value:
        type: blindness
        amplifier: 1
        duration: 200
  success-times:
    '1':
      action_message:
        type: message
        value:
          - This is the first time you caught a rainbow fish!
        chance: 1.0
    '100':
      action_message:
        type: message
        value:
          - You have caught rainbow fish for 100 times!
        chance: 1.0

Enchantments on the item

物品带有的附魔

enchantments:
  minecraft:sharpness: 1
  minecraft:flame: 1

Random Durability (only available on damageable items)

随机耐久度

random-durability: false

Random Enchantments Higher level enchantment should be below the lower ones

随机附魔 高等级附魔应写于低等级附魔下方

random-enchantments:
    enchantment_1:
      enchant: minecraft:sharpness
      chance: 0.3
      level: 1
    enchantment_2:
      enchant: minecraft:sharpness
      chance: 0.2
      level: 2
    enchantment_3:
      enchant: minecraft:sharpness
      chance: 0.1
      level: 3
    enchantment_4:
      enchant: minecraft:flame
      chance: 0.5
      level: 1
    enchantment_5:
      enchant: minecraft:unbreaking
      chance: 0.2
      level: 1
    enchantment_6:
      enchant: minecraft:unbreaking
      chance: 0.2
      level: 2

Item flags

物品的额外标签

item_flags:
  - HIDE_ENCHANTS
# - HIDE_ATTRIBUTES
# - HIDE_DESTROYS
# - HIDE_DYE
# - HIDE_PLACED_ON
# - HIDE_UNBREAKABLE
# - HIDE_POTION_EFFECTS

Totem activator

图腾触发器

totem: totem_id

Vanilla Loot Properties

To modify the properties of vanilla loot, you can override its settings by creating a new configuration section called "vanilla."

想要让原版物品能够执行customfishing插件中的各种动作,只需要添加一个物品,与其他物品不同的地方在于,它的键名必须是"vanilla",其他配置均与其他鱼一致。

vanilla:
  disable-stats: false
  disable-bar-mechanic: false
  action:
    success:
      action_command:
        type: command
        value:
          - say {player} caught a vanilla fish
        chance: 1.0

Last updated