This guide should cover how to implement recipes and items for the server, the intent is to allow professors an easy template and explanation as to what is possible and what can be changed and implemented.
The server uses Nexo for implementing items, but does have other tools at its disposal! Don't be afraid to reach out to your secretary or staff for more information!
Making Recipes
Vanilla Recipes
Shaped Recipes
This is an example recipe turning Pale Oak logs and leaves into a Pale Oak Sapling
lumberjack_sapling_pale_oak:
# You may leave this for staff to handle
permission: dcrecipes.saplings.pale.oak
# This section is for defining the ingredients found within the recipe
ingredients:
# You can use any character you want for the 'names', this is for use in the shape section below
L:
# The item to represent the 'key' (in this case "L")
minecraft_type: PALE_OAK_LEAVES
W:
minecraft_type: PALE_OAK_LOG
result:
# The item produced when using the recipe
item: PALE_OAK_SAPLING
minecraft_type: PALE_OAK_SAPLING
# the amount to produce
amount: 1
# This defines the shape of the recipe using the letters from ingredients.
shape:
- ' L ' # Blank , Leaves , Blank
- 'LLL' # Leaves , Leaves , Leaves
- ' W ' # Blank , Wood , Blank
Shapeless Recipes
Shapeless recipes are just that, recipes with no shape! You'll define the ingredients, result, amounts, and permissions as above, but
# Name of the item
firework_rocket:
result:
# item type to produce
minecraft_type: FIREWORK_ROCKET
# Amount to produce
amount: 2
# permission to craft the item
permission: dcrecipes.firework.alternate
ingredients:
A:
# amount required to craft this recipe
amount: 1
# item type for this craft
minecraft_type: PAPER
# Each additional unique item can be added
B:
amount: 1
minecraft_type: GUNPOWDER
Nexo Recipes and Items
This section will be used to explain how to add new custom items and recipes for those items.
Nexo Item
The Nexo item we'll be showing off here will be a birthday cake!
# ID of the item
birthday_cake_black:
# Display name of the in-game item
itemname: Birthday Cake - Black
# Lore that wil be displayed on the item
# Formatting may make use of Minimessage!
lore:
- '<green>Feed: 1'
- <gold>[<yellow>Happy Birthday!<gold>]
# Components that may be applied to the item
# There is a wide set of components that may be applied that
# will be explained later, for now let's focus on what's here
Components:
# Denotes this is a food item, and you may provide the nutrition and saturation values
food:
nutrition: 1
saturation: 10
# can_always_eat: false
# Denotes that the item is consumable and allows you to apply the effects
consumable:
effects:
APPLY_EFFECTS:
speed:
amplifier: 13
duration: 2
material: PUMPKIN_PIE
# Assign custom model data
# You can leave this for staff to handle
Pack:
# parent_model: ''
# texture: food:item/birthday_cake_black
# custom_model_data: 000
Nexo Shaped Recipes
Like with the vanilla items, we can define all the same elements, the notable change here is the use of `nexo_item` in the result
# item id
chef_birthday_cake_black:
# Like vanilla items, we can assign permssion to craft nexo items as well
permission: chef.recipes
# ingredients; this will take a CAKE and BLACK CANDLE
ingredients:
C:
minecraft_type: CAKE
L:
minecraft_type: BLACK_CANDLE
result:
# The resulting item should use `nexo_item`, referring to the above nexo item id
nexo_item: birthday_cake_black
shape:
- 'CL '
- ' '
- ' '
Nexo Shapeless Recipes
Just as above in the Nexo Shaped Recipes, the result uses `nexo_item`, and like the Vanilla Shapeless recipes _there is no shape_
# item id
processed_green_dye:
# permission: chef.recipes
result:
nexo_item: processed_green_dye
ingredients:
A:
amount: 4
minecraft_type: GREEN_DYE
Custom Items
Music Discs
Music discs are like items, except they'll also require an entry for the sound! As well, a special component to enable them to be jukebox playable!
Sound
https://docs.nexomc.com/configuration/sounds
https://minecraft.wiki/w/Sounds.json
sounds:
- id: nexo:music.songname # Make sure the songname is all lowercase
sound: music:songname.ogg
stream: true
jukebox_playable:
length_in_seconds: 2.5 # How long track is in seconds - check the file
description: Description # Description that will display on the disc lore & the text on the screen when played. Usually Author - Track
Item
This item format is how to create music discs, you don't need to create a seperate item like seen above in the wiki.
custom_music_disc:
itemname: SongName
material: MUSIC_DISC_CAT
# This is the important bit to enable the item to be playable in a jukebox
Components:
jukebox_playable:
show_in_tooltip: true
song_key: nexo:music.something # Uses the song id
Pack:
# texture: misc:item/
# custom_model_data: 0
Recipes
Notes for music disc recipes:
If the owner of the patent wishes to use any music disc, instead of a specific one, within their recipe, we have a solution. When defining the ingredient, instead of using:
A: minecraft_type: the_item
instead, use this:
A: tag: customtag:music_discs
Then, it will be craftable with all vanilla music discs.
Diminishing Items
The key to diminishing items- or items that can be used and transform into other items, is the use_remainer keyword
Here we'll showcase a 3-step process.
Full Milk -> Half Full Milk -> Glass Bottle
The use_remainer component notes that when the item is used either in crafting or consumption, it will
provide the listed item.
In vanilla this is used for things like drinking potions or buckets, for custom items though we can be more creative!
full_milk:
itemname: 'Milk Bottle'
Components:
use_remainder:
# Here we return a second nexo item to represent the used item
nexo_item: half_full_milk_bottle
half_full_milk_bottle:
itemname: 'Milk Bottle'
Components:
use_remainder:
# Here we return a glass bottle because the milk is empty!
minecraft_type: GLASS_BOTTLE
Potions
Standard Drinkable Potion
potion_of_haste:
customname: Haste Potion
material: POTION
Components:
enchantment_glint_override: true
PotionEffects:
- type: HASTE
duration: 300
amplifier: 1
ambient: true
particles: true
icon: true
effect: haste
use_remainder:
minecraft_type: GLASS_BOTTLE
Standard Splash Potion
potion_of_splash_haste:
customname: Splash Haste
material: SPLASH_POTION
PotionEffects:
- type: HASTE
duration: 300
amplifier: 1
ambient: true
particles: true
icon: true
effect: haste
Components:
enchantment_glint_override: true
Using different vanilla potions in recipes
We can refer to vanilla potions as such.
minecraft_item:
==: org.bukkit.inventory.ItemStack
v: 4189
type: POTION
meta:
==: ItemMeta
meta-type: POTION
# Use an awkward potion
potion-type: minecraft:awkward