package su.a71.new_soviet; import net.fabricmc.api.ClientModInitializer; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.fabricmc.fabric.api.blockrenderlayer.v1.BlockRenderLayerMap; import net.fabricmc.fabric.api.client.rendering.v1.ColorProviderRegistry; import net.minecraft.client.render.RenderLayer; import su.a71.new_soviet.blocks.BoundaryMarkerBlock; import su.a71.new_soviet.registration.NSE_Blocks; import su.a71.new_soviet.registration.NSE_Custom; @Environment(EnvType.CLIENT) public class NewSovietClient implements ClientModInitializer { @Override public void onInitializeClient() { BlockRenderLayerMap.INSTANCE.putBlock(NSE_Blocks.CRATE, RenderLayer.getCutout()); BlockRenderLayerMap.INSTANCE.putBlock(NSE_Blocks.HANDRAIL, RenderLayer.getCutout()); BlockRenderLayerMap.INSTANCE.putBlock(NSE_Custom.TABLE_LAMP, RenderLayer.getCutout()); BlockRenderLayerMap.INSTANCE.putBlock(NSE_Custom.GOLDEN_LAMP, RenderLayer.getCutout()); BlockRenderLayerMap.INSTANCE.putBlock(NSE_Custom.VINTAGE_LAMP, RenderLayer.getCutout()); BlockRenderLayerMap.INSTANCE.putBlock(NSE_Custom.CEILING_FAN, RenderLayer.getCutout()); BlockRenderLayerMap.INSTANCE.putBlock(NSE_Custom.SIREN, RenderLayer.getCutout()); BlockRenderLayerMap.INSTANCE.putBlock(NSE_Custom.CAGED_POST_LAMP, RenderLayer.getCutout()); BlockRenderLayerMap.INSTANCE.putBlock(NSE_Custom.MODERN_POST_LAMP, RenderLayer.getCutout()); BlockRenderLayerMap.INSTANCE.putBlock(NSE_Custom.BIG_POST_LAMP, RenderLayer.getCutout()); BlockRenderLayerMap.INSTANCE.putBlock(NSE_Custom.VINTAGE_POST_LAMP, RenderLayer.getCutout()); BlockRenderLayerMap.INSTANCE.putBlock(NSE_Blocks.BLUE_IRON_BARS, RenderLayer.getCutout()); BlockRenderLayerMap.INSTANCE.putBlock(NSE_Blocks.RUSTY_BLUE_IRON_BARS, RenderLayer.getCutout()); BlockRenderLayerMap.INSTANCE.putBlock(NSE_Blocks.VINTAGE_IRON_BARS, RenderLayer.getCutout()); BlockRenderLayerMap.INSTANCE.putBlock(NSE_Blocks.BARBED_WIRE, RenderLayer.getCutout()); // TODO: Needed? BlockRenderLayerMap.INSTANCE.putBlock(NSE_Blocks.RED_CONCRETE_WITH_BARS, RenderLayer.getCutout()); BlockRenderLayerMap.INSTANCE.putBlock(NSE_Blocks.GREEN_CONCRETE_WITH_BARS, RenderLayer.getCutout()); BlockRenderLayerMap.INSTANCE.putBlock(NSE_Blocks.WHITE_CONCRETE_WITH_BARS, RenderLayer.getCutout()); BlockRenderLayerMap.INSTANCE.putBlock(NSE_Blocks.BEIGE_CONCRETE_WITH_BARS, RenderLayer.getCutout()); BlockRenderLayerMap.INSTANCE.putBlock(NSE_Blocks.YELLOW_CONCRETE_WITH_BARS, RenderLayer.getCutout()); BlockRenderLayerMap.INSTANCE.putBlock(NSE_Blocks.BLUE_CONCRETE_WITH_BARS, RenderLayer.getCutout()); // BlockEntityRendererRegistry.register(NSE_Custom.TV_BLOCK_ENTITY, TVBlockEntityRenderer::new); BlockRenderLayerMap.INSTANCE.putBlock(NSE_Custom.TV, RenderLayer.getCutout()); BlockRenderLayerMap.INSTANCE.putBlock(NSE_Custom.RADIO_RECEIVER, RenderLayer.getCutout()); BlockRenderLayerMap.INSTANCE.putBlock(NSE_Blocks.WHITE_BOUNDARY_MARKER, RenderLayer.getCutout()); BlockRenderLayerMap.INSTANCE.putBlock(NSE_Blocks.LIGHT_GRAY_BOUNDARY_MARKER, RenderLayer.getCutout()); BlockRenderLayerMap.INSTANCE.putBlock(NSE_Blocks.GRAY_BOUNDARY_MARKER, RenderLayer.getCutout()); BlockRenderLayerMap.INSTANCE.putBlock(NSE_Blocks.BLACK_BOUNDARY_MARKER, RenderLayer.getCutout()); BlockRenderLayerMap.INSTANCE.putBlock(NSE_Blocks.BLUE_BOUNDARY_MARKER, RenderLayer.getCutout()); BlockRenderLayerMap.INSTANCE.putBlock(NSE_Blocks.LIGHT_BLUE_BOUNDARY_MARKER, RenderLayer.getCutout()); BlockRenderLayerMap.INSTANCE.putBlock(NSE_Blocks.GREEN_BOUNDARY_MARKER, RenderLayer.getCutout()); BlockRenderLayerMap.INSTANCE.putBlock(NSE_Blocks.LIME_BOUNDARY_MARKER, RenderLayer.getCutout()); BlockRenderLayerMap.INSTANCE.putBlock(NSE_Blocks.BROWN_BOUNDARY_MARKER, RenderLayer.getCutout()); BlockRenderLayerMap.INSTANCE.putBlock(NSE_Blocks.CYAN_BOUNDARY_MARKER, RenderLayer.getCutout()); BlockRenderLayerMap.INSTANCE.putBlock(NSE_Blocks.RED_BOUNDARY_MARKER, RenderLayer.getCutout()); BlockRenderLayerMap.INSTANCE.putBlock(NSE_Blocks.ORANGE_BOUNDARY_MARKER, RenderLayer.getCutout()); BlockRenderLayerMap.INSTANCE.putBlock(NSE_Blocks.YELLOW_BOUNDARY_MARKER, RenderLayer.getCutout()); BlockRenderLayerMap.INSTANCE.putBlock(NSE_Blocks.PINK_BOUNDARY_MARKER, RenderLayer.getCutout()); BlockRenderLayerMap.INSTANCE.putBlock(NSE_Blocks.MAGENTA_BOUNDARY_MARKER, RenderLayer.getCutout()); BlockRenderLayerMap.INSTANCE.putBlock(NSE_Blocks.PURPLE_BOUNDARY_MARKER, RenderLayer.getCutout()); ColorProviderRegistry.BLOCK.register((state, view, pos, tintIndex) -> BoundaryMarkerBlock.getColour(state.get(BoundaryMarkerBlock.COLOUR)), NSE_Blocks.LIGHT_BLUE_BOUNDARY_MARKER, NSE_Blocks.WHITE_BOUNDARY_MARKER, NSE_Blocks.LIGHT_GRAY_BOUNDARY_MARKER, NSE_Blocks.GRAY_BOUNDARY_MARKER, NSE_Blocks.BLACK_BOUNDARY_MARKER, NSE_Blocks.BLUE_BOUNDARY_MARKER, NSE_Blocks.GREEN_BOUNDARY_MARKER, NSE_Blocks.LIME_BOUNDARY_MARKER, NSE_Blocks.BROWN_BOUNDARY_MARKER, NSE_Blocks.CYAN_BOUNDARY_MARKER, NSE_Blocks.RED_BOUNDARY_MARKER, NSE_Blocks.ORANGE_BOUNDARY_MARKER, NSE_Blocks.YELLOW_BOUNDARY_MARKER, NSE_Blocks.PINK_BOUNDARY_MARKER, NSE_Blocks.MAGENTA_BOUNDARY_MARKER, NSE_Blocks.PURPLE_BOUNDARY_MARKER); } }