Toggle menu
309
640
1
6.7K
DemocracyCraft Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

DOE:Making New Items: Difference between revisions

From DemocracyCraft Wiki
m Sound: Formatting
Tag: Reverted
Line 99: Line 99:
   # Assign custom model data
   # Assign custom model data
   # You can leave this for staff to handle
   # You can leave this for staff to handle
  Pack:
Pack:
    # parent_model: ''
  # parent_model: ''
    # texture: food:item/birthday_cake_black
  # texture: food:item/birthday_cake_black
    # custom_model_data: 000
  # custom_model_data: 000
</pre>
</pre>



Revision as of 21:04, 23 July 2025

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!

https://docs.nexomc.com/

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.something
    sound: nexo:music/something.ogg
    sounds:                                  # Alternative if you have more than 1 sound-file
      - nexo:music/something.ogg
      - nexo:music/something2.ogg
    stream: true                             # Optional, defaults to false
    preload: true                            # Optional, defaults to false
    volume: 1f                               # Optional, defaults to 1f
    pitch: 1f                                # Optional, defaults to 1f
    weight: 1                                # Optional, defaults to 1
    attenuation_distance: 13                 # Optional, defaults to 16
    jukebox_playable:                        # Optional, Used for registering a custom music-disc sound
      comparator_output: 15                  # Optional, defaults to 15, must be in 1..15
      range: X                               # Optional, If omitted, the sound will have a variable range.
      length_in_seconds: 2.5
      description: Description

Item

custom_music_disk:
  itemname: Dirt Dance 
  Components:
    material: MUSIC_DISC_CAT
    # This is the important bit to enable the item to be playable in a jukebox
    jukebox_playable:
      # Point to the songs id
      song_key: nexo:music.something