Add boundary markers

This commit is contained in:
Andrew-71 2023-10-01 16:27:25 +03:00
parent dfaa80fc16
commit 483f2730e3
88 changed files with 768 additions and 20 deletions

View file

@ -4,18 +4,12 @@ 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.BlockEntityRendererRegistry;
import net.fabricmc.fabric.api.client.rendering.v1.ColorProviderRegistry;
import net.minecraft.block.TallPlantBlock;
import net.minecraft.block.enums.DoubleBlockHalf;
import net.minecraft.client.color.world.BiomeColors;
import net.minecraft.client.color.world.GrassColors;
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;
import net.minecraft.client.color.block.BlockColors;
@Environment(EnvType.CLIENT)
public class NewSovietClient implements ClientModInitializer {
@ -47,6 +41,28 @@ public class NewSovietClient implements ClientModInitializer {
// BlockEntityRendererRegistry.register(NSE_Custom.TV_BLOCK_ENTITY, TVBlockEntityRenderer::new);
ColorProviderRegistry.BLOCK.register((state, view, pos, tintIndex) -> 0xeb4034, NSE_Blocks.BLUE_BOUNDARY_MARKER);
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);
}
}