From 1e6fb724c370bac11e92011cdde672418671bbe9 Mon Sep 17 00:00:00 2001 From: Martin Prokoph Date: Thu, 31 Jul 2025 00:42:37 +0200 Subject: [PATCH] feat: update BetterLeaves wiki for 9.3 --- .../demo_blue_wisteria_leaves_top.png | Bin 0 -> 9271 bytes src/pages/wiki/betterleaves.mdx | 105 ++++++++++++++---- 2 files changed, 85 insertions(+), 20 deletions(-) create mode 100644 public/betterleaves/demo_blue_wisteria_leaves_top.png diff --git a/public/betterleaves/demo_blue_wisteria_leaves_top.png b/public/betterleaves/demo_blue_wisteria_leaves_top.png new file mode 100644 index 0000000000000000000000000000000000000000..126930bb49e17c3258c9d62ac1731b276bbb1621 GIT binary patch literal 9271 zcmbVxc|4Tg`}b`RNrjYcDzcY^EMce+vJ+X8N=%Y{9V0C=St>-b6e8=SF=QQCv+qXM ztYaHv8)ghM&#lk*`}=-h&+GZ)d7gV-=f2N<&T*e}o$I>Z*ZVr6OpW!pI0QHV0N~QU zaorqzh98tetl+&t)43f0PKMvN(SM+?FAW?5+W_DQSl9s?zzi^ewSxjM{8K-8Vfe2) zBLfq_1a^mmg$b-5j6L`+>wnex{#8F1$H4f{cV2>Z#(&i*{NM|C9s2vD57YkuM-6oK zb-{@aCI@fyQQ#VIh?SL%mE{l{8yh?OA&$emT!%S151%^D!_6x!01*)u5E42qc0uCw zSy@pbAxUK^*^Bauii!{kRSlI(>K7CgFCBb@ft{WGFz4ZuTwEtFoe?^7>Hqnn*8#^4 z9ju9o;Vi&-jDhJG1HBP|fa_#o_Sc zFC6R#n2)g>KO?Wr%46otcGipc($lw}4~bqa`N?PAyC$Y^*E@op;{^Z7Qv&D2B_yS! z6_qY4tEj47yRM_FcSGO6!qV!Nwasl?mwWdgxIT1q_wn`f4+snje)jyu%g9$z$anDx ziSLt=Kcr-4Wq--Z{hF8m9bJkkEB{eZS>Mpu)ZFr`wXLszU~mXG{Ci|-dS-TR9>1`- zw7#*qMcUpWQ+5yJI*{|<*FTc|Z*m<2yTEzP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`#mp+-+X6uvp*E$rGN zhbK&O${p-!#0V@h0l~Y{X4AQu+&e!fI~ei68~o2`8hj}`=Y}{(|Q?c_lY<5 zNr=&>*Edy!mYK$0rpk#NxcX71qc#F{c5hq)f6)_^!tlD#cEziKuRO!$sBO$wCZ?=$ zOauNQ6mpG-h_%TynVWw6x5x!JGKSlJp8lvjOca91*^<&kjFOG#_Lt-65?5;RpYa1b zhzq}3pf9o3#;@J01OFl(gL)anUcnL_1Fy-4fn$=3U~j5b`JhonN(|CqTkbMTjJpP{pN zIfsSSY6si2E@Hw&tht}EK3SEWPF+NdW=(IMPf>6D5Ed3TaJozdqI69;Pc`%qF#{I< zgj-DW@+-EZ*=<94#^bRUIyL0b#it_KU_&dw5z^P9M34Br- zCPd8(GcpZ!oMrk}S6gH5;d8PD7oUO-c~#EM;OZhW)zKA#M{GxNoIR_yUVg^T@#hAI zVGv^)>rV>L?0NU~Fd2?SM~tRHs;36UP=k=Kxei1OYt)&W)N0jhxnCGr#zc!=)SB@9 z;nhyEvwZXTY>zk5FshEPlPTd5;l3lI($9p={1(XotQk*I!#al7sThKKiVvuF{MFTN z@6y8zh0dQjn#@)=hN$)mGv}&19=3RcOD}e{az_k<8PTz{Kr7o$x|5hIdrYr?(sDeJ z#xChTF{`A{d~O^ta%H*?}HziNy-@A(RG^ibX4arCb|?ulsLfnmKbT1N(V|d z2R%>61%_Kb!RPKdTDsudeT`W@s_$nqFs}!NQ_sjJ7@JVNvj83y+h^lkGC@p}E99i! z!02`_4H4L3Gtocm!zdfD5;W6mXFME8?*PTd$DKfYpHYgQ8 j%6(v=V1zV(MrVrtI28KoYug!+A_Mw5#@CCl-ii2MFV=Uq literal 0 HcmV?d00001 diff --git a/src/pages/wiki/betterleaves.mdx b/src/pages/wiki/betterleaves.mdx index 9458765..f354d54 100644 --- a/src/pages/wiki/betterleaves.mdx +++ b/src/pages/wiki/betterleaves.mdx @@ -9,22 +9,23 @@ 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'; # Better Leaves Wiki -Welcome to the Better Leaves wiki. -This documentation aims to help you create your own flavour for any texturepack or mod. +Welcome to the Better Leaves wiki. +This documentation aims to help you create your own flavour for any texturepack or mod.
- + A screenshot showing the Python script code A screenshot of the Better Leaves resourcepack in action ## Getting Started -First of all, you need to download the contents of the GitHub repository. +First of all, you need to download the contents of the GitHub repository. To do so, you can either download the [zip file](https://github.com/TeamMidnightDust/BetterLeavesLite/archive/refs/heads/main.zip), or just execute ```bash git clone https://github.com/TeamMidnightDust/BetterLeavesLite.git @@ -32,23 +33,23 @@ git clone https://github.com/TeamMidnightDust/BetterLeavesLite.git in a terminal window. ## Texturepacks -You can easily create a build for any texturepack. -Just add the pack (as a .zip file or folder) to the input/texturepacks/ folder. +You can easily create a build for any texturepack. +Just add the pack (as a .zip file or folder) to the input/texturepacks/ folder. After that, follow the Building section to get your flavour!
An overview of the input folder
-

The input folder is all you have to worry about

+

The input folder is all you have to worry about

## Mods -In simple cases, it is enough to put the mod file in the /input/mods folder and continue with the Building section. +In simple cases, it is enough to put the mod file in the /input/mods folder and continue with the Building section.
An overview of the input/mods folder, showing the automatic unpacking process

Put the .jar file into input/mods, and the script will take care of extracting all textures with "leaves" in their name.
The _temp folder is purely symbolic here, it will only exist for a few milliseconds during the extraction process.

## Building -To build your flavour of the pack, you need to have Python installed on your system. -You can get it on any modern operating system. +To build your flavour of the pack, you need to have Python installed on your system. +You can get it on any modern operating system.
Download the latest stable Python 3 release from the official website
- or using winget in PowerShell: + or using winget in PowerShell:
```bash winget install -e --id Python.Python.3.13.1 @@ -74,16 +75,16 @@ You can get it on any modern operating system.
-Now that you have python installed, head back into the BetterLeavesLite directory. -Here, you should now open a terminal window and run +Now that you have python installed, head back into the BetterLeavesLite directory. +Here, you should now open a terminal window and run ```bash pip install -r requirements.txt ``` @@ -100,12 +101,12 @@ To build the pack, execute the script using the following command: ```bash python3 gen_pack.py 1.0 Your Edition ``` -Replace "1.0" with your desired version number and "Your Edition" with the name you'd like to appear in the resourcepack description ingame. +Replace "1.0" with your desired version number and "Your Edition" with the name you'd like to appear in the resourcepack description ingame. And in no time, the script will generate a ready-to-use zip file with your desired content. ## Irregularities and Missing Textures -If you see missing textures when trying your freshly-built pack, the mod you're adding support for has a more complicated asset structure. -In these cases, you unfortunately have to manually configure exceptions in the /input/overrides.json file. +If you see missing textures when trying your freshly-built pack, the mod you're adding support for has a more complicated asset structure. +In these cases, you unfortunately have to manually configure exceptions in the /input/overrides.json file. ```json { // Leaves that should not be tinted based on the biome they're in @@ -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" + ] +} +``` + +## The .betterleaves.json format + +### Block States +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" } } -``` \ No newline at end of file +``` + +### Sprite Overrides +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 +Some leaves have textures that consist of different halves – for example Blue Wisteria Leaves from Environmental. +This is where texture stitching comes in. +
Showcase of the texture stitching layout
+

Texture stitching allows you to use custom sub-textures while generating the bushy texture

+ +`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" + } + ... +} +```