Tutorial:Adding custom paintings
This tutorial explains how to create a data pack and resource pack that adds custom painting variants. It assumes you already know how to create a data pack and resource pack.
Custom painting variants[edit | edit source]
This example adds a new painting variant that can be placed randomly, or by using the item present in the Creative Menu.
Painting variant definition[edit | edit source]
Let's start with the central painting variant file in the painting_variant
folder in the data pack. Adding this file will allow Minecraft to register your custom painting, but it won't be available in survival yet.
/reload
. Always leave and reopen the world to apply the new changes!{
"asset_id": "example:tiles",
"author": "You!",
"title": "Exemplary Tiles",
"height": 1,
"width": 1
}
- [NBT Compound / JSON Object] The root object.
- [String] asset_id: A resource location of the sprite to use. Has to be in the
painting
atlas. - [Int] width: The width of the painting in blocks, between 1 and 16.
- [Int] height: The height of the painting in blocks, between 1 and 16.
- [String][NBT List / JSON Array][NBT Compound / JSON Object] title: Text component to use as this painting's title. See Text component format.
- [String][NBT List / JSON Array][NBT Compound / JSON Object] author: Text component to use as this painting's author. See Text component format.
- [String] asset_id: A resource location of the sprite to use. Has to be in the
Placeable tag[edit | edit source]
The new painting can be added to the #minecraft:placeable
painting variant tag. The game uses this tag to list all placeable paintings, and adding your painting variant here allows it to be placed by vanilla Painting item and be included in Functional Blocks
tab of the Creative inventory. Paintings not included in this tag will be added to the Operator Utilities
tab of Creative inventory.
{
"values": [
"example:tiles"
]
}
Textures[edit | edit source]
The second and final step of creating a painting variant is to create the texture for the painting itself inside the textures/painting folder of your resource pack. It will then be added to the paintings atlas, and can be used by your datapack. The texture for this example can be downloaded and placed here:
External links[edit | edit source]
[edit | edit source]
[hide] | |||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||
|
[hide] | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||
| |||||||||||||||||
| |||||||||||||||||
| |||||||||||||||||
| |||||||||||||||||
| |||||||||||||||||
| |||||||||||||||||
| |||||||||||||||||
|