Tutorial:Adding custom paintings

Jump to navigation Jump to search
This feature is exclusive to Java Edition.
 

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.

Changes to this file won't be applied when running /reload. Always leave and reopen the world to apply the new changes!

data/example/painting_variant/tiles.json

{
  "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.

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.

data/minecraft/tags/painting_variant/placeable.json

{
  "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]

Navigation[edit | edit source]