-
Notifications
You must be signed in to change notification settings - Fork 198
Magic Paintings (WIP)
Magic paintings are an animated counterpart to the paintings found in vanilla Minecraft. While the texture of a vanilla painting can be animated with the use of a .mcmeta file, these animations are quite limited to what is essentially a gif. Magic paintings were created to allow for more creativity, and to facilitate a simple way for Mod and Modpack creator alike to create custom Magic Paintings of their own, with the use of Datapacks and Resource Packs.
The most notable way Magic Paintings differ from normal ones, is the inclusion of Layers.
- A Magic painting can have any amount, each of which can have a unique texture.
- A Layer can either render at normally, or at full brightness.
- A Layer's texture can be larger than the painting itself, which will allow for a Parallax effect. (See below)
- A Layer of any size can also have an Opacity Modifier. (See further below)
Like the name implies, Parallax is a Layer property that enables parallax scrolling, allowing for an illusion of 3D space, where there is none. There are currently 3 implemented ways a Layer can parallax scroll:
- Angle based scrolling, where the layer shifts in response to the camera moving
- Time based scrolling, where the layer slowly shifts in one direction, resetting when it reaches the end of the texture
- Sine wave scrolling, where the layer shifts around in a circular motion as time passes
While unlike in a vanilla painting, a texture is allowed to have semi and fully transparent pixels, there is still some cases where you'd want the transparency of a layer to change dynamically. This is what an Opacity Modifier is for! There are currently 6 types of Opacity Modifiers, all of which can be toggled to act in reverse instead:
- Distance: Changes the opacity of a Layer based on how far away from the painting the camera is.
- Weather: Changes the opacity of a Layer based on the current weather.
- Lightning: Changes the opacity of a layer when lightning strikes.
- Day Time: Slowly changes the opacity based on how long it is until either midnight or noon, where it peaks.
- Day Time Sharp: Sets the opacity to full or zero, depending on what time of day it is.
- Sine Time: The opacity shifts between full and zero at a steady pace.
- Health: The opacity is equal to how much health the player currently has, relative to their max health.
- Hunger: The opacity is equal to how hungry the player currently is.
- Holding item: The layer becomes fully opaque when the player is holding a specific item, the layer is invisible otherwise.
(The item that the player must hold has to be specified via the optional
item_stack
field.)