66import net .fabricmc .api .ClientModInitializer ;
77import net .fabricmc .api .EnvType ;
88import net .fabricmc .api .Environment ;
9- import net .fabricmc .fabric .api .blockrenderlayer .v1 .BlockRenderLayerMap ;
109import net .fabricmc .fabric .api .client .particle .v1 .ParticleRenderEvents ;
10+ import net .fabricmc .fabric .api .client .rendering .v1 .BlockRenderLayerMap ;
1111import net .fabricmc .fabric .api .client .rendering .v1 .ColorProviderRegistry ;
1212import net .minecraft .block .Block ;
1313import net .minecraft .client .color .block .BlockColorProvider ;
1414import net .minecraft .client .color .world .BiomeColors ;
15- import net .minecraft .client .render .RenderLayer ;
16- import net .minecraft .client .render .TexturedRenderLayers ;
15+ import net .minecraft .client .render .BlockRenderLayer ;
1716import net .minecraft .util .Identifier ;
1817import net .minecraft .world .biome .FoliageColors ;
1918import net .minecraft .world .biome .GrassColors ;
2019
2120// This class is an entrypoint
2221@ Environment (EnvType .CLIENT )
2322public class TerrestriaClient implements ClientModInitializer {
24- @ SuppressWarnings ("unused" )
25- private static final RenderLayer LEAVES_ITEM_LAYER = TexturedRenderLayers .getEntityCutout ();
26- private static final RenderLayer GRASS_BLOCK_LAYER = RenderLayer .getCutoutMipped ();
27- private static final RenderLayer PLANT_BLOCK_LAYER = RenderLayer .getCutout ();
28- private static final RenderLayer DOOR_BLOCK_LAYER = RenderLayer .getCutout ();
23+ private static final BlockRenderLayer GRASS_BLOCK_LAYER = BlockRenderLayer .CUTOUT_MIPPED ;
24+ private static final BlockRenderLayer PLANT_BLOCK_LAYER = BlockRenderLayer .CUTOUT ;
25+ private static final BlockRenderLayer DOOR_BLOCK_LAYER = BlockRenderLayer .CUTOUT ;
2926
3027 private static final BlockColorProvider FOLIAGE_BLOCK_COLORS =
3128 (block , world , pos , layer ) -> world != null && pos != null ? BiomeColors .getFoliageColor (world , pos ) : FoliageColors .DEFAULT ;
@@ -51,7 +48,7 @@ private void registerEntityRenderers() {
5148 }
5249
5350 private void addColoredGrass (Block grass ) {
54- BlockRenderLayerMap .INSTANCE . putBlock (grass , GRASS_BLOCK_LAYER );
51+ BlockRenderLayerMap .putBlock (grass , GRASS_BLOCK_LAYER );
5552 ColorProviderRegistry .BLOCK .register (GRASS_BLOCK_COLORS , grass );
5653 }
5754}
0 commit comments