Ok, I changed it like this, but it gives me an error.
public class EventHandler implements IBlockColor{
@Override
public int getColor(BlockState x, @Nullable IBlockDisplayReader reader, @Nullable BlockPos pos, int u) {
return 0;
}
@SubscribeEvent
public static void registerBlockColorHandler(final ColorHandlerEvent.Block event) {
event.getBlockColors().register((x, reader, pos, u) -> reader != null
&& pos != null ? BiomeColors.getGrassColor(reader, pos)
: GrassColors.get(0.5D, 1.0D), RegistryHandler.MYBLOCK);
}
}