Skip to content

Getting Started

goflishMC edited this page Nov 4, 2024 · 1 revision

Recipe-Features

The following examples provides you parameters that are used in the recipes-section of a professions recipes'.

Show results example
- name: <name> # How the recipe is internally called
  craftingTime: 5 # How long this item takes in seconds
  craftingLimit: 1 # How many times this recipe can be crafted by the player
  category: stone_weapons # Which category this item belongs to (only of category usage is active)
  hiding: # Hiding the recipe from the player by specific occurences
    noPermission: true # If the player has no permission to see this recipe
    noRank: true # If the player has not the rank of the conditions to see this recipe
    recipeLimitReached: true # If the player has reached the crafting limit of this recipe
  results: {...} # Shown below
  costs: {...} # Shown below
  conditions: {...} # Shown below

The hiding optionals are fully optional and can (and should!) be left blank if you dont wont them to override the global configuration. When using those values and global value of noPermission is set to false, all recipes will be hidden where a player has no permission. However, when you but noPermission on true in this recipe it means only this recipe is overriding this option. By left blank we mean to really totally remove this entry from the recipes section.

Specific Sections

Results-Section (Recipes only)

The results section of recipes provides native support for:

  • One specific item that is given
  • Vanilla experience
  • Profession experience
  • Commands that will be executed see more
Show results example
results:
  vanillaExp: 0 # You get no vanilla experience
  item: CROSSBOW:1 # You get one crossbow
  professionExp: 25 # You get 25 profession experience
  commands: # You get a stick through a command
  - delay: 0
    as: PLAYER
    cmd: give {player} minecraft:stick 1

Costs-Section (Recipes & Professions)

Costs are things that will be consumed on crafting. Without having the proper resources of the costs-section, players cant craft the desired item. The costs section of recipes provides native support for:

  • Money (if Vault is installed)
  • Vanilla Experience
  • Items that will be taken see more
Show costs example (easy)
costs:
    money: 15.0 # Crafting costs 15.0 money (using decimals is necessary!! 0 is also -> 0.0)
    exp: 3 # Crafting costs 3 vanilla experience
    items: # Crafting costs the following items
    - STICK:3
    - STRING:2
    - FLINT:2
Show costs example (complex)
costs:
    money: 15.0 # Crafting costs 15.0 money (using decimals is necessary!! 0 is also -> 0.0)
    exp: 3 # Crafting costs 3 vanilla experience
    items: # Crafting costs the following items
    - DIVINITY_cool_item:1 # 1 custom item from Divinity
    - STRING:2 # 2 Vanilla string
    - material: ENCHANTED_BOOK # An enchanted book with unbreaking 3
      amount: 1
      enchants:
        unbreaking: 3
    - material: STICK # An stick with sharpness 5 called 'Mighty Stick'
      amount: 1
      name: 'Mighty Stick'
      enchants:
        sharpness: 5

Conditions-Section (Recipes & Professions)

Conditions are like costs with the difference of no consumption. Those are things like levels in professions, a mastery or even supported plugins.

Show conditions example (easy)
    professionLevel: 15 # The profession level that needs to be achieved first (similar like under the professions-section below where you could modify the same, just for the current profession only)
    mastery: false # Rather this profession has to be mastered first
    rank: null # The rank that is used for the condition (Achievable through `craft.rank.<rank>` permissions)
    professions: {} # There are no profession conditions. (This has to be a '{}' if not used!)
Show conditions example (professions included)
    professionLevel: 0 # The profession level that needs to be achieved first (similar like under the professions-section below where you could modify the same, just for the current profession only)
    mastery: false # Rather this profession has to be mastered first
    rank: null # The rank that is used for the condition (Achievable through `craft.rank.<rank>` permissions)
    professions:
      armor_smithing: 5 # You additionally need to be armor_smithing level 5 or greater
      weapon_smithing: 15 # Here we replaced 'professionLevel' now
Show conditions example (supported plugins included)
    professionLevel: 0 # The profession level that needs to be achieved first (similar like under the professions-section below where you could modify the same, just for the current profession only)
    mastery: false # Rather this profession has to be mastered first
    rank: null # The rank that is used for the condition (Achievable through `craft.rank.<rank>` permissions)
    professions:
      armor_smithing: 5 # You additionally need to be armor_smithing level 5 or greater
      weapon_smithing: 15 # Here we replaced 'professionLevel' now
    mcmmo:
      archery: 50 # Need to have archery lvl 50 from mcMMO
    jobs:
      miner: 25 # Need to have miner lvl 25 from JobsReborn
    fabled:
      warrior: 5 # Need to have warrior lvl 5 from Fabled
    aura-ability:
        fireball: 3 # Need to have fireball lvl 3 from Aura-Ability

Further details on those complex condition possibilities can be seen here.

Others

Delayed Commands

Delayed Commands is a configurable command created by the parameters delay, as and cmd:

Show command example
commands:
  - delay: 5 # 5 ticks delay
    as: console # The caster. Possible ones [PLAYER, CONSOLE]
    cmd: say Hello World! # The command that will be executed

Commands are usually provided as a list, meaning they always start with a - delay: [...] and the other two parameters will be put below on the same level as delay.

Show command list example
commands:
  - delay: 5
    as: console
    cmd: say Hello World!
  - delay: 0
    as: console
    cmd: give {player} minecraft:stick 1

Working with ingredient- & result-items

Vanilla

Vanilla Items are simply used by making an item of the material type like STONE, STICK etc. Case-sensitivity doesnt bother here. You can also use VANILLA_<material> for visual purposes which does the same.

Native ItemBuilder

ItemBuilder functions allow for fully customized items used in the plugin. You can use them nearly everywhere (ingredients, results, pattern-items, etc.).

Show a full overview
<item>:
   material: OAK_SIGN # This is an oak sign
   amount: 1 # 1 items will be shown
   durability: 0 # It has 0 durability (can be changed on damagable items)
   unbreakable: false # It is breakable (or unbreakable if 'true')
   name: '§6Armor Smithing: §cLevel $<level>' # The name of the item
   lore: # The lore of the item
     - ' §7The recipes above can be crafted'
     - ' §7with the armor smithing profession.'
     - §8--------------------
     - ' §7You need level §a40 armor smithing'
     - ' §a& $500 to unlock its §7mastery.'
     - ' §7A mastery allows to craft new items.'
   flags: [] # Flags that are applied to the item
   enchants: {} # Enchants that are applied to the item
   data: null # (Probably some meta-data that is not defined yet)
Show a filled item
<item>:
   material: DIAMOND_BOOTS # This is an oak sign
   amount: 1 # 1 items will be shown
   durability: 40 # It has 49 durability
   unbreakable: true # It is unbrealable
   name: '&6Magic Booooots' # The name of the item (colorcodes work with & too.)
   lore: # The lore of the item
     - ' §7The recipes above can be crafted'
     - ' §7with the armor smithing profession.'
     - §8--------------------
     - ' §7You need level §a40 armor smithing'
     - ' §a& $500 to unlock its §7mastery.'
     - ' §7A mastery allows to craft new items.'
   flags: [] # Flags that are applied to the item
   enchants: # Enchants that are applied to the item
     sharpness: 5
     unbreaking: 3
  • Here is a full overview of existing enchantments
  • Here is a full overview of existing flags

Lastly, we look into the special type of enchanted books. You can use enchanted books exactly as those item in the ItemBuilder. We have implemented a custom logic to handle the stored enchants of enchanted books and make them available for ingredient purposes for example. You have seen this above before:

Show an enchanted book
# This is a list-entry from the ingredients in a recipe
- material: ENCHANTED_BOOK # This is the enchanted book
  amount: 3 # You need this item 3 times
  enchants: # Enchants of the book
    efficiency: 5
    unbreaking: 3

Divinity

Divinity is a soft-dependend plugin of us that provides you with a lot of features regarding to items and other modules. We encourage you to use Divinity for your custom items, but you can also use others through the ItemBuilder-Function.

The current possible way of using Divinity items is by using the DIVINITY_<module>_<item> type. The following modules exist:

Module Item (long) Module Item (short) Extras
DIVINITY_ARROWS_[item]:[level]:[amount] DIVINITY_AR_[item]:[level]:[amount]
DIVINITY_CONSUMABLES_[item]:[level]:[amount] DIVINITY_CO_[item]:[level]:[amount]
DIVINITY_CUSTOMITEMS_[item]:[amount] DIVINITY_CI_[item]:[amount]
DIVINITY_DISMANTLE_[item]:[level]:[amount] DIVINITY_DI_[item]:[level]:[amount]
DIVINITY_ESSENCES_[item]:[level]:[amount] DIVINITY_ES_[item]:[level]:[amount]
DIVINITY_EXTRACTOR_[item]:[level]:[amount] DIVINITY_EX_[item]:[level]:[amount]
DIVINITY_FORTIFY_[item]:[level]:[amount] DIVINITY_FO_[item]:[level]:[amount]
DIVINITY_GEMS_[item]:[level]:[amount] DIVINITY_GE_[item]:[level]:[amount]
DIVINITY_IDENTIFY_[item]:[level]:[amount] DIVINITY_ID_[item]:[level]:[amount]
DIVINITY_ITEMGENERATOR_[item]:[level]:[amount]:[type] DIVINITY_IG_[item]:[level]:[amount]:[type]
DIVINITY_MAGICDUST_[item]:[level]:[amount] DIVINITY_MA_[item]:[level]:[amount]
DIVINITY_RUNES_[item]:[level]:[amount] DIVINITY_RU_[item]:[level]:[amount]

Key-Value Conditions + Supported Plugins

Condition Key Possible Condition Values Belong to (Hooks)
professions Any profession of this plugin Natively, Fusion
fabled Class-IDs of Fabled Fabled
mcmmo PrimarySkillTypes of mcMMO mcMMO
jobs Levels of Jobs JobsReborn
aura_abilities Abilities from AuraSkills AuraSkills
aura_mana_abilities Mana Abilities from AuraSkills AuraSkills
aura_skills Skills from AuraSkills AuraSkills
aura_stats Stats from AuraSkills AuraSkills

Clone this wiki locally