πŸ–ΌοΈCustom Paintings

Nexo only generates the Datapack for 1.21.3+ servers. You can still use Custom Paintings on 1.21.1, but you will need to make the datapack manually.

As of 1.21 you can now make custom paintings via datapacks. Nexo streamlines this process by automating the generation of this datapack based on a Nexo/paintings.yml file.

Here is an example of adding a custom painting:

paintings:
  nexo:custom_painting:
    author: boy0000
    title: <red>Custom Painting
    asset_id: nexo:custom_painting  # This is the path to the PNG, namespace:path
    width: 1     # The width of your painting, in number of blocks it takes up
    height: 1    # The height of your painting, in number of blocks it takes up
    random_place: true # Will place at random from the vanilla painting items
  nexo:animated_painting:
    author: boy0000
    title: <red>Animated Custom Painting
    asset_id: nexo:animated_painting
    width: 1
    height: 1

Then you simply put the Texture of your painting inside Nexo's ResourcePack where your asset_id points to. All Painting-Textures are in assets/NAMESPACE/textures/painting/PATH The config-format is as with everything else NAMESPACE:PATH

For our above example it means we must put the texture inside assets/nexo/textures/painting/custom_painting.png

Animated Paintings

You can also make animated paintings using an MCMETA-file. The width & height properties are the pixel-size of each frame in your PNG. Below is a basic example, Minecraft Wiki has a more in-depth explanation.

animated_painting.png.mcmeta
{
  "animation": {
    "width": 256,
    "height": 256,
    "frametime": 1
    
  }
}

This file needs to be named the same as your texture + .mcmeta For our above example it means we must put the texture inside assets/nexo/textures/painting/animated_painting.png.mcmeta

Static Painting & Animated Painting using MCMeta

NexoItem

When your Custom Painting has been registered, you can make a custom NexoItem which will place the given painting. Below is a basic example

custom_painting:
  itemname: Custom Painting
  material: PAINTING
  Components:
    painting_variant: nexo:custom_painting
animated_painting:
  itemname: Animated Painting
  material: PAINTING
  Components:
    painting_variant: nexo:animated_painting

Last updated