πΌοΈCustom Paintings
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.
{
"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
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