Class BlockColorRegistry

java.lang.Object
net.fabricmc.fabric.api.client.rendering.v1.BlockColorRegistry

public final class BlockColorRegistry extends Object
The registry for BlockTintSources.
  • Method Details

    • register

      public static void register(List<net.minecraft.client.color.block.BlockTintSource> layers, net.minecraft.world.level.block.Block... blocks)
      Register a block color for one or more blocks. Overriding existing registrations is allowed.

      Mods must use this method instead of BlockColors.register(List, Block...) during mod initialization as it runs before Minecraft.getBlockColors() is available.

      Parameters:
      layers - A list of BlockTintSources.
      blocks - The blocks which should be colored using the given color.