tutorial:fluids
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| tutorial:fluids [2026/02/20 12:08] – Migrated Names to Mojmap & updated text to 1.21.11 infinitychances | tutorial:fluids [2026/02/23 14:26] (current) – fixed reference infinitychances | ||
|---|---|---|---|
| Line 256: | Line 256: | ||
| } | } | ||
| </ | </ | ||
| + | ===== Adding custom textures to your fluid ===== | ||
| + | To create a fluid with custom textures, you will need at least 2 new textures, with an optional 3rd, overlay texture that is shown when you look at the fluid behind glass or leaves. All textures go in the block textures folder. | ||
| - | If you want to use your own fluid textures, you can refer to vanilla' | + | The first texture should be named YOUR_FLUID_NAME_still.png, |
| + | The second texture should be named YOUR_FLUID_NAME_flowing.png, | ||
| + | The third will be named YOUR_FLUID_NAME_overlay.png, | ||
| + | |||
| + | Using our acid example, the client initializer will look like this: | ||
| + | <code java [enable_line_numbers=" | ||
| + | @Environment(EnvType.CLIENT) | ||
| + | public class TutorialModClient implements ClientModInitializer { | ||
| + | |||
| + | @Override | ||
| + | public void onInitializeClient() { | ||
| + | FluidRenderHandlerRegistry.INSTANCE.register(TutorialMod.ACID_SOURCE, | ||
| + | Identifier.fromNamespaceAndPath(" | ||
| + | Identifier.fromNamespaceAndPath(" | ||
| + | Identifier.fromNamespaceAndPath(" | ||
| + | |||
| + | BlockRenderLayerMap.putFluids(ChunkSectionLayer.TRANSLUCENT, | ||
| + | } | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | You can refer to vanilla' | ||
tutorial/fluids.1771589304.txt.gz · Last modified: 2026/02/20 12:08 by infinitychances