Skip to content

Commit

Permalink
Add page on Mantle fluid textures
Browse files Browse the repository at this point in the history
  • Loading branch information
KnightMiner committed Nov 4, 2024
1 parent 26e3c3d commit 898fee3
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ The following pages cover data pack concepts specific to in Tinkers' Construct:
### Resource Packs

* [**Armor Models**](json/armor-models): Documentation for the model format for modifiable armor from Tinkers' Construct.
* [**Fluid Textures**](json/fluid-textures): JSON format for defining the textures of fluids for Mantle mods.
* [**Fluid Tooltips**](json/fluid-tooltips): JSON format for defining fluid unit lists for tooltips.

## Other Documentation
Expand Down
22 changes: 22 additions & 0 deletions docs/json/fluid-textures.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
layout: page
title: Fluid Textures
---
By default in Forge, the textures and color for a fluid are hardcoded in Java, restricting the ability for resource packs to modify fluid appearance (especially if a mod makes heavy usage of tinting a solid colored fluid texture). Since 1.19.2, Mantle defines fluid textures in JSON, allowing more control to resource packs.

Note that this feature does not apply to all fluids, a mod must opt-in to this feature by defining their fluid to use the Mantle fluid texture system in Java.

## Fluid Textures

Fluid texture JSON are defined under `assets/<domain>/mantle/fluid_texture/<name>.json` for the fluid with ID `<domain>:<name>`. They have the following format:

<div class="treeview" markdown=1>
* {% include field.html type="object" %} The fluid texture object.
* {% include field.html name="color" type="argb" %} Color tint to apply to the fluid textures, supports alpha. If unset, defaults to `FFFFFFFF` (that is, no tint).
* {% include field.html name="still" type="resource location" %} Path to the still texture, applied when the fluid is not moving. Still texture is a standard resolution texture.
* {% include field.html name="flowing" type="resource location" %} Path to the flowing texture, appplied when the fluid is moving. Flowing texture is a double resolution texture.
* {% include field.html name="overlay" type="resource location" %} Path to the overlay texture, applied when the fluid is adjacent to a non-opaque block. If unset, uses the still or flowing texture.
* {% include field.html name="camera" type="resource location" %} Path to the camera texture, applied when an entity is swimming in the fluid. Does not support animations. If unset, no camera overlay is applied.
</div>

All texture paths are relative to `assets/<domain>/textures/`.

0 comments on commit 898fee3

Please sign in to comment.