File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
chunky/src/java/se/llbit/chunky/block/minecraft Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change 2424import se .llbit .chunky .world .biome .Biome ;
2525
2626public class Leaves extends AbstractModelBlock {
27+ private final int tint ;
2728
2829 public Leaves (String name , Texture texture ) {
2930 super (name , texture );
3031 solid = false ;
3132 this .model = new LeafModel (texture );
33+ this .tint = -1 ;
3234 }
3335
3436 public Leaves (String name , Texture texture , int tint ) {
3537 super (name , texture );
3638 solid = false ;
3739 this .model = new LeafModel (texture , tint );
40+ this .tint = tint ;
3841 }
3942
4043 @ Override
4144 public int getMapColor (Biome biome ) {
45+ if (this .tint >= 0 ) {
46+ // this leave type has a blending color that is independent from the biome (eg. spruce or birch leaves)
47+ return this .tint | 0xFF000000 ;
48+ }
4249 return biome .foliageColor | 0xFF000000 ;
4350 }
4451}
You can’t perform that action at this time.
0 commit comments