feat: update BetterLeaves wiki for 9.3

This commit is contained in:
Martin Prokoph
2025-07-31 00:42:37 +02:00
parent cc9b4ba6e1
commit 1e6fb724c3
2 changed files with 85 additions and 20 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

View File

@@ -9,6 +9,7 @@ import { Icon } from 'astro-icon/components'
import { Notification } from 'accessible-astro-components'
import CustomTabs from "../../components/CustomTabs.astro"
import Difficulty from "../../components/Difficulty.astro"
import BlurryDivider from "../../components/BlurryDivider.astro"
import pythonCodeImage from '../../assets/betterleaves/script.png';
import ingameImage from '../../assets/betterleaves/ingame.png';
@@ -133,6 +134,70 @@ In these cases, you unfortunately have to manually configure exceptions in the /
"dynamicTreesNamespaces": {
"minecraft": "dynamictrees",
"aether": "dtaether"
},
// Force-generate (non-bushy) item models for various blocks
"generateItemModels": [
"biomesoplenty:rainbow_birch_leaves",
"betterend:lacugrove_leaves"
],
// Specify blocks that share the same models
"blockStateCopies": {
"minecraft:oak_leaves": [
"twilightforest:twilight_oak_leaves",
"dynamictrees:oak_undergrowth_leaves"
]
},
// A list of textures that will not be treated as leaf blocks (useful for texture stitching)
"compileOnly": [
"minecraft:block/snow"
]
}
```
<BlurryDivider />
## The .betterleaves.json format
### Block States <Difficulty difficulty="advanced" />
Sometimes, you want models to only apply to specific block states.
This is also useful in cases where you want to combine multiple leaf variant textures into a single blockstate file (in that case, set state to "").
`input/assets/eternal_starlight/northland_leaves.betterleaves.json`:
```json
{
"blockStateData": {
"block": "eternal_starlight:northland_leaves",
"state": "snowy=false"
}
}
```
### Sprite Overrides <Difficulty difficulty="advanced" />
You can override the sprites used in the model. Currently, top and bottom faces of the leaf model will default to the regular texture, but can be overridden this way.
`input/assets/eternal_starlight/northland_leaves_snowy.betterleaves.json`:
```json
{
"spriteOverrides": {
"top": "minecraft:block/snow",
"bottom": "eternal_starlight:block/northland_leaves"
}
...
}
```
### Texture Stitching <Difficulty difficulty="hard" />
Some leaves have textures that consist of different halves for example Blue Wisteria Leaves from Environmental.
This is where texture stitching comes in.
<center><img style="image-rendering: pixelated" alt="Showcase of the texture stitching layout" src="/betterleaves/demo_blue_wisteria_leaves_top.png" width="400"></img></center>
<p class="text-center italic">Texture stitching allows you to use custom sub-textures while generating the bushy texture</p>
`input/assets/environmental/blue_wisteria_leaves_top.betterleaves.json`:
```json
{
"textureStitching": {
"1-3": "environmental:block/wisteria_leaves",
// Unspecified parts will use the regular leaf texture
"7-9": "environmental:block/blue_wisteria_leaves"
}
...
}
```