Host your Minecraft server on BisectHosting - get 25% off your first month with code MODRINTH.

Invariable Paintings

⚠️ Invariable Paintings v1/v2🟢 (pre-MC1.21.2) and v3🔴 (post-MC1.21.2) have different mechanics regarding CITs. ⚠️

Overview

Turns each painting variant into its own item. When a painting is broken, it will drop the variant-locked item instead of the blank one. No new item type was added to the game, variant-locked items work the same as the ones available in the vanilla creative menu.

Empty paintings can no longer be placed, but filled ones can be found in various places.

Environment:

Core functionalities are fully server-side.

🔴 Post-1.21.2, client-side is strictly optional, containing only minor cosmetic and QoL changes. Vanilla clients will only need a resource pack for CITs to work.

🟢 Pre-1.21.2 client-side installation is optional, but recommended, because vanilla clients have no options for CITs.

Optional dependencies:

  • [Server-side] Patched is needed in order to add paintings to loot tables, without completely overwritting them.
  • [Client-side] Variants-CIT reproduces the CIT logic from v2. This is not required at all for painting CITs to work, but on v3🔴, it can be helpful when working with modded paintings: it uses a resource format that is less redundant than vanilla, and it handles missing models more gracefully.

Obtaining paintings

Trading

Filled paintings can be bought from Master Shepherds and Wandering Traders. Shepherds no longer sell variantless paintings, but will now require one in their pricing.

The elemental paintings are exclusive to the Wandering Trader, and a few haphazardly chosen others are exclusive to the villagers. Modded paintings will be available to both by default.

Looting

This feature requires Patched.

Filled paintings can be found inside many naturally generated chests, suspicious soils, and while fishing. Some paintings are exclusive to certain location; for example, the Wither painting can only be found in the nether. Modded paintings will be available in most locations by default.

The loot tables are provided as a built-in datapack which can be disabled. Without the datapack, all location-exclusive paintings will instead be available via trading.

Inventory Icons

v2🟢 Pre-1.21.2

With the mod installed client-side, item textures will be searched for at /assets/<namespace>/textures/item/painting/<variant>.png, based on the painting variant's ID.

Paintings that lack a custom icon will fall back to a generic built-in one, instead of using the missing model.

v3🔴 Post-1.21.2

Painting items have their item_model component set based on their variant. The corresponding item models must be placed at /assets/<namespace>/models/item/painting/<variant>.json, based on the painting variant's ID.

Being fully server-side, this logic will assign a unique model to every single painting variant with no regards to available textures. Modded painting will appear as missing models unless you provide additional models for them, even if it's simply to give them a fallback texture. Alternatively, if accomodating for vanilla clients is not a concern, this can be helped by using Variants-CIT, which will reproduce the behaviour from v2.

Miscellaneous changes

Server-side

  • Adds a new loot function invarpaint:lock_variant_randomly.
  • Placement of variant-locked paintings in tight spaces is more forgiving. (Vanilla would require targeting one specific block.)
  • Shows a warning when trying to place a painting in a space that is too small.
  • Fixes MC-257133, whereby failing to place a painting causes an inventory desync, causing the client to believes it has consummed the item.

Client-side

  • Creative players can pick a painting's variant by holding Ctrl.
  • The paintings in the creative inventory now have their item_model component set.
  • Slightly reworked the tooltip for painting items.

Related mods

Collector's Stockbook

Keep your painting collection neatly packed inside a single stack.

No Kebab

Prevents accidentally uninstalled custom paintings from being removed from the world.


Project members

Estecka

Author

Details

Licensed EUPL-1.2
Published a year ago
Updated 3 days ago